Commit cea96778 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by Greg Kroah-Hartman

Staging: wlan-ng: convert to netdev_ops

Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7bea3611
...@@ -711,6 +711,20 @@ static int wlan_change_mtu(netdevice_t *dev, int new_mtu) ...@@ -711,6 +711,20 @@ static int wlan_change_mtu(netdevice_t *dev, int new_mtu)
return 0; return 0;
} }
static const struct net_device_ops p80211_netdev_ops = {
.ndo_init = p80211knetdev_init,
.ndo_open = p80211knetdev_open,
.ndo_stop = p80211knetdev_stop,
.ndo_get_stats = p80211knetdev_get_stats,
.ndo_start_xmit = p80211knetdev_hard_start_xmit,
.ndo_set_multicast_list = p80211knetdev_set_multicast_list,
.ndo_do_ioctl = p80211knetdev_do_ioctl,
.ndo_set_mac_address = p80211knetdev_set_mac_address,
.ndo_tx_timeout = p80211knetdev_tx_timeout,
.ndo_change_mtu = wlan_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
/*---------------------------------------------------------------- /*----------------------------------------------------------------
* wlan_setup * wlan_setup
* *
...@@ -756,11 +770,7 @@ int wlan_setup(wlandevice_t *wlandev) ...@@ -756,11 +770,7 @@ int wlan_setup(wlandevice_t *wlandev)
} else { } else {
wlandev->netdev = dev; wlandev->netdev = dev;
dev->ml_priv = wlandev; dev->ml_priv = wlandev;
dev->hard_start_xmit = p80211knetdev_hard_start_xmit; dev->netdev_ops = &p80211_netdev_ops;
dev->get_stats = p80211knetdev_get_stats;
dev->init = p80211knetdev_init;
dev->open = p80211knetdev_open;
dev->stop = p80211knetdev_stop;
mutex_init(&wlandev->ioctl_lock); mutex_init(&wlandev->ioctl_lock);
/* block ioctls until fully initialised. Don't forget to call /* block ioctls until fully initialised. Don't forget to call
......
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