]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/b44.c
netdev: convert bulk of drivers to netdev_tx_t
[mirror_ubuntu-artful-kernel.git] / drivers / net / b44.c
index 36d4d377ec2fc5df3a78a96f609aa6055e7ad167..bee510177a3fd8d08a9c3eb3b5e3ff4dd0e3cf9d 100644 (file)
@@ -946,7 +946,7 @@ static void b44_tx_timeout(struct net_device *dev)
        netif_wake_queue(dev);
 }
 
-static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct b44 *bp = netdev_priv(dev);
        int rc = NETDEV_TX_OK;
@@ -1297,7 +1297,8 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind)
        switch (sdev->bus->bustype) {
        case SSB_BUSTYPE_SSB:
                bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE |
-                    (((ssb_clockspeed(sdev->bus) + (B44_MDC_RATIO / 2)) / B44_MDC_RATIO)
+                    (DIV_ROUND_CLOSEST(ssb_clockspeed(sdev->bus),
+                                       B44_MDC_RATIO)
                     & MDIO_CTRL_MAXF_MASK)));
                break;
        case SSB_BUSTYPE_PCI:
@@ -1756,15 +1757,15 @@ static void b44_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *inf
        struct b44 *bp = netdev_priv(dev);
        struct ssb_bus *bus = bp->sdev->bus;
 
-       strncpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
-       strncpy(info->version, DRV_MODULE_VERSION, sizeof(info->driver));
+       strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
        switch (bus->bustype) {
        case SSB_BUSTYPE_PCI:
-               strncpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info));
+               strlcpy(info->bus_info, pci_name(bus->host_pci), sizeof(info->bus_info));
                break;
        case SSB_BUSTYPE_PCMCIA:
        case SSB_BUSTYPE_SSB:
-               strncpy(info->bus_info, "SSB", sizeof(info->bus_info));
+               strlcpy(info->bus_info, "SSB", sizeof(info->bus_info));
                break;
        }
 }