mac80211: convert to net_device_ops
PATCH 1/1 mac80211: convert to net_device_ops
Convert to new net_device_ops in 2.6.28 and later.
net/mac80211/iface.c +10 -7
@@ -569,18 +569,21 @@ static void ieee80211_set_multicast_listdev_mc_sync (local->mdev, dev); } +static const struct net_device_ops ieee80211_netdev_ops = { + .ndo_open = ieee80211_open, + .ndo_stop = ieee80211_stop, + .ndo_start_xmit = ieee80211_subif_start_xmit, + .ndo_set_multicast_list = ieee80211_set_multicast_list, + .ndo_change_mtu = ieee80211_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +static void ieee80211_if_setup (struct net_device *dev) {ether_setup (dev); - dev->hard_start_xmit = ieee80211_subif_start_xmit; + dev->netdev_ops = &ieee80211_netdev_ops; dev->wireless_handlers = &ieee80211_iw_handler_def; - dev->set_multicast_list = ieee80211_set_multicast_list; - dev->change_mtu = ieee80211_change_mtu; - dev->open = ieee80211_open; - dev->stop = ieee80211_stop; dev->destructor = free_netdev; -/* we will validate the address ourselves in ->open */ - dev->validate_addr =NULL ; }/* * Called when the netdev is removed or, by the code below, before
Quoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>
Quoted 33 lines
net/mac80211/iface.c +10
-7@@ -569,18 +569,21 @@ static void ieee80211_set_multicast_listdev_mc_sync (local->mdev, dev); } +static const struct net_device_ops ieee80211_netdev_ops = { + .ndo_open = ieee80211_open, + .ndo_stop = ieee80211_stop, + .ndo_start_xmit = ieee80211_subif_start_xmit, + .ndo_set_multicast_list = ieee80211_set_multicast_list, + .ndo_change_mtu = ieee80211_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; +static void ieee80211_if_setup (struct net_device *dev) {ether_setup (dev); - dev->hard_start_xmit = ieee80211_subif_start_xmit; + dev->netdev_ops = &ieee80211_netdev_ops; dev->wireless_handlers = &ieee80211_iw_handler_def; - dev->set_multicast_list = ieee80211_set_multicast_list; - dev->change_mtu = ieee80211_change_mtu; - dev->open = ieee80211_open; - dev->stop = ieee80211_stop; dev->destructor = free_netdev; -/* we will validate the address ourselves in ->open */ - dev->validate_addr =NULL ; }/* * Called when the netdev is removed or, by the code below, before
Johannes Berg
maintainerQuoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>
John, please revert this commit for now, it's breaking monitor mode injection (and thus AP mode) because the xmit handler assignment in ieee80211_setup_sdata is not effective.
johannes
Johannes Berg
maintainerQuoted 8 lines · Johannes Berg
Quoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>John, please revert this commit for now, it's breaking monitor mode injection (and thus AP mode) because the xmit handler assignment in
ieee80211_setup_sdatais not effective.
This also broke calling our uninit function so we have memory and debugfs file leaks.
johannes
Quoted 8 lines · Johannes Berg
Quoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>John, please revert this commit for now, it's breaking monitor mode injection (and thus AP mode) because the xmit handler assignment in
ieee80211_setup_sdatais not effective.
Oh, for reference:
commit e22cab741afdd1e9857ea9fe51e28a6fe3c97b90
Author: Stephen Hemminger <[email protected]> Date: Tue Jan 27 05:29:25 2009 +1100
mac80211: convert to net_device_ops
Convert to new net_device_ops in 2.6.28 and later.
And yes, it's my fault, sorry!
johannes
Quoted 15 lines · ext Johannes Berg
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>John, please revert this commit for now, it's breaking monitor mode injection (and thus AP mode) because the xmit handler assignment in
ieee80211_setup_sdatais not effective.Oh, for reference:
commit
e22cab741afdd1e9857ea9fe51e28a6fe3c97b90Author: Stephen Hemminger <[email protected]> Date: Tue Jan 27 05:29:25 2009 +1100
Quoted 7 lines
mac80211: convert to
net_device_opsConvert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>Acked-by Johannes Berg <[email protected]>Signed-off-by John W. Linville <[email protected]>
Yes, I can confirm that reverting this commit solves the hostapd problems I have been seeing.
Kalle
Quoted 8 lines · Johannes Berg
Quoted 3 lines · Stephen Hemminger
Convert to new
net_device_opsin 2.6.28 and later.Signed-off-by Stephen Hemminger <[email protected]>John, please revert this commit for now, it's breaking monitor mode injection (and thus AP mode) because the xmit handler assignment in
ieee80211_setup_sdatais not effective.
Ok, done. I reverted the hostap one as well, as I think it is incomplete and could use more review.
Thanks,
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.