Staging: vt6655: use net_device_ops for management functions
authorForest Bond <forest@alittletooquiet.net>
Tue, 2 Jun 2009 18:44:33 +0000 (14:44 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:51 +0000 (11:00 -0700)
vt6655: use net_device_ops for management functions

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/hostap.c

index f0e2c7351552158261e74e4b806f7697cd09292a..a10ed27acbc2028ad1cf683f2fa3bd0d121286d2 100644 (file)
@@ -968,6 +968,16 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
 }
 
 
+static const struct net_device_ops device_netdev_ops = {
+    .ndo_open               = device_open,
+    .ndo_stop               = device_close,
+    .ndo_do_ioctl           = device_ioctl,
+    .ndo_get_stats          = device_get_stats,
+    .ndo_start_xmit         = device_xmit,
+    .ndo_set_multicast_list = device_set_multi,
+};
+
+
 #ifndef PRIVATE_OBJ
 
 static int
@@ -1134,12 +1144,7 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
     pDevice->pMgmt = &(pDevice->sMgmtObj);
 
     dev->irq                = pcid->irq;
-    dev->open               = device_open;
-    dev->hard_start_xmit    = device_xmit;
-    dev->stop               = device_close;
-    dev->get_stats          = device_get_stats;
-    dev->set_multicast_list = device_set_multi;
-    dev->do_ioctl           = device_ioctl;
+    dev->netdev_ops         = &device_netdev_ops;
 
 #ifdef WIRELESS_EXT
 //Einsn Modify for ubuntu-7.04
index 620b8bd745be7e6b66ac701b362e66cc2233d94d..91f189ddeef48e1efb0f3273e2ce293bd7b678c8 100644 (file)
@@ -133,7 +133,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
     apdev_priv = netdev_priv(pDevice->apdev);
     *apdev_priv = *pDevice;
        memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
-       pDevice->apdev->hard_start_xmit = pDevice->tx_80211;
+
+    const struct net_device_ops apdev_netdev_ops = {
+        .ndo_start_xmit         = pDevice->tx_80211,
+    };
+    pDevice->apdev->netdev_ops = &apdev_netdev_ops;
+
        pDevice->apdev->type = ARPHRD_IEEE80211;
 
        pDevice->apdev->base_addr = dev->base_addr;