Commit dd8db704 authored by Forest Bond's avatar Forest Bond Committed by Greg Kroah-Hartman

Staging: vt6656: use net_device_ops for management functions

vt6656: use net_device_ops for management functions
Signed-off-by: default avatarForest Bond <forest@alittletooquiet.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1e28efa3
...@@ -117,7 +117,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) ...@@ -117,7 +117,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
apdev_priv = netdev_priv(pDevice->apdev); apdev_priv = netdev_priv(pDevice->apdev);
*apdev_priv = *pDevice; *apdev_priv = *pDevice;
memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); 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->type = ARPHRD_IEEE80211;
pDevice->apdev->base_addr = dev->base_addr; pDevice->apdev->base_addr = dev->base_addr;
......
...@@ -837,6 +837,17 @@ static int vntwusb_resume(struct usb_interface *intf) ...@@ -837,6 +837,17 @@ static int vntwusb_resume(struct usb_interface *intf)
} }
#endif #endif
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,
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static int static int
...@@ -896,12 +907,8 @@ vntwusb_found1(struct usb_device *udev, UINT interface, const struct usb_device_ ...@@ -896,12 +907,8 @@ vntwusb_found1(struct usb_device *udev, UINT interface, const struct usb_device_
pDevice->tx_80211 = device_dma0_tx_80211; pDevice->tx_80211 = device_dma0_tx_80211;
pDevice->sMgmtObj.pAdapter = (PVOID)pDevice; pDevice->sMgmtObj.pAdapter = (PVOID)pDevice;
netdev->open = device_open; netdev->netdev_ops = &device_netdev_ops;
netdev->hard_start_xmit = device_xmit;
netdev->stop = device_close;
netdev->get_stats = device_get_stats;
netdev->set_multicast_list = device_set_multi;
netdev->do_ioctl = device_ioctl;
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
//2007-0508-01<Add>by MikeLiu //2007-0508-01<Add>by MikeLiu
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment