diff options
author | Forest Bond <forest@alittletooquiet.net> | 2009-06-02 14:44:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:51 -0400 |
commit | 572113540886faf393fd04408c394899df98ada3 (patch) | |
tree | c5c50d50c6b429cc587c416d2bacaa0294c56156 | |
parent | 7bb8dc2d7eb5594ec890e822bb0517446d369698 (diff) |
Staging: vt6655: use net_device_ops for management functions
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>
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 17 | ||||
-rw-r--r-- | drivers/staging/vt6655/hostap.c | 7 |
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index f0e2c7351552..a10ed27acbc2 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c | |||
@@ -968,6 +968,16 @@ static BOOL device_release_WPADEV(PSDevice pDevice) | |||
968 | } | 968 | } |
969 | 969 | ||
970 | 970 | ||
971 | static const struct net_device_ops device_netdev_ops = { | ||
972 | .ndo_open = device_open, | ||
973 | .ndo_stop = device_close, | ||
974 | .ndo_do_ioctl = device_ioctl, | ||
975 | .ndo_get_stats = device_get_stats, | ||
976 | .ndo_start_xmit = device_xmit, | ||
977 | .ndo_set_multicast_list = device_set_multi, | ||
978 | }; | ||
979 | |||
980 | |||
971 | #ifndef PRIVATE_OBJ | 981 | #ifndef PRIVATE_OBJ |
972 | 982 | ||
973 | static int | 983 | static int |
@@ -1134,12 +1144,7 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) | |||
1134 | pDevice->pMgmt = &(pDevice->sMgmtObj); | 1144 | pDevice->pMgmt = &(pDevice->sMgmtObj); |
1135 | 1145 | ||
1136 | dev->irq = pcid->irq; | 1146 | dev->irq = pcid->irq; |
1137 | dev->open = device_open; | 1147 | dev->netdev_ops = &device_netdev_ops; |
1138 | dev->hard_start_xmit = device_xmit; | ||
1139 | dev->stop = device_close; | ||
1140 | dev->get_stats = device_get_stats; | ||
1141 | dev->set_multicast_list = device_set_multi; | ||
1142 | dev->do_ioctl = device_ioctl; | ||
1143 | 1148 | ||
1144 | #ifdef WIRELESS_EXT | 1149 | #ifdef WIRELESS_EXT |
1145 | //Einsn Modify for ubuntu-7.04 | 1150 | //Einsn Modify for ubuntu-7.04 |
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 620b8bd745be..91f189ddeef4 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c | |||
@@ -133,7 +133,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) | |||
133 | apdev_priv = netdev_priv(pDevice->apdev); | 133 | apdev_priv = netdev_priv(pDevice->apdev); |
134 | *apdev_priv = *pDevice; | 134 | *apdev_priv = *pDevice; |
135 | memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); | 135 | memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); |
136 | pDevice->apdev->hard_start_xmit = pDevice->tx_80211; | 136 | |
137 | const struct net_device_ops apdev_netdev_ops = { | ||
138 | .ndo_start_xmit = pDevice->tx_80211, | ||
139 | }; | ||
140 | pDevice->apdev->netdev_ops = &apdev_netdev_ops; | ||
141 | |||
137 | pDevice->apdev->type = ARPHRD_IEEE80211; | 142 | pDevice->apdev->type = ARPHRD_IEEE80211; |
138 | 143 | ||
139 | pDevice->apdev->base_addr = dev->base_addr; | 144 | pDevice->apdev->base_addr = dev->base_addr; |