diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-03-29 11:31:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 14:06:25 -0400 |
commit | cea96778196dcf7127d6bbbf296c1651848650f2 (patch) | |
tree | 190d89ffece97943108a53fda70e34ade45df957 | |
parent | 7bea36118ee888f0428d22ea6a5560de33e6e739 (diff) |
Staging: wlan-ng: convert to netdev_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/wlan-ng/p80211netdev.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index b2a606a36936..393e4df70dfd 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c | |||
@@ -711,6 +711,20 @@ static int wlan_change_mtu(netdevice_t *dev, int new_mtu) | |||
711 | return 0; | 711 | return 0; |
712 | } | 712 | } |
713 | 713 | ||
714 | static const struct net_device_ops p80211_netdev_ops = { | ||
715 | .ndo_init = p80211knetdev_init, | ||
716 | .ndo_open = p80211knetdev_open, | ||
717 | .ndo_stop = p80211knetdev_stop, | ||
718 | .ndo_get_stats = p80211knetdev_get_stats, | ||
719 | .ndo_start_xmit = p80211knetdev_hard_start_xmit, | ||
720 | .ndo_set_multicast_list = p80211knetdev_set_multicast_list, | ||
721 | .ndo_do_ioctl = p80211knetdev_do_ioctl, | ||
722 | .ndo_set_mac_address = p80211knetdev_set_mac_address, | ||
723 | .ndo_tx_timeout = p80211knetdev_tx_timeout, | ||
724 | .ndo_change_mtu = wlan_change_mtu, | ||
725 | .ndo_validate_addr = eth_validate_addr, | ||
726 | }; | ||
727 | |||
714 | /*---------------------------------------------------------------- | 728 | /*---------------------------------------------------------------- |
715 | * wlan_setup | 729 | * wlan_setup |
716 | * | 730 | * |
@@ -756,11 +770,7 @@ int wlan_setup(wlandevice_t *wlandev) | |||
756 | } else { | 770 | } else { |
757 | wlandev->netdev = dev; | 771 | wlandev->netdev = dev; |
758 | dev->ml_priv = wlandev; | 772 | dev->ml_priv = wlandev; |
759 | dev->hard_start_xmit = p80211knetdev_hard_start_xmit; | 773 | dev->netdev_ops = &p80211_netdev_ops; |
760 | dev->get_stats = p80211knetdev_get_stats; | ||
761 | dev->init = p80211knetdev_init; | ||
762 | dev->open = p80211knetdev_open; | ||
763 | dev->stop = p80211knetdev_stop; | ||
764 | 774 | ||
765 | mutex_init(&wlandev->ioctl_lock); | 775 | mutex_init(&wlandev->ioctl_lock); |
766 | /* block ioctls until fully initialised. Don't forget to call | 776 | /* block ioctls until fully initialised. Don't forget to call |