Commit 8b393f1d authored by Michael Wu's avatar Michael Wu Committed by John W. Linville

mac80211: Fix behavior of ieee80211_open and ieee80211_close

This patch fixes:
- Incorrect calls to ieee80211_hw_config when the radiotap flag is set.
- Failure to actually unset the radiotap flag when all monitors are down.
- Failure to call ieee80211_hw_config after successful interface start.
Signed-off-by: default avatarMichael Wu <flamingice@sourmilk.net>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 01e1f045
...@@ -216,6 +216,7 @@ static int ieee80211_open(struct net_device *dev) ...@@ -216,6 +216,7 @@ static int ieee80211_open(struct net_device *dev)
res = local->ops->start(local_to_hw(local)); res = local->ops->start(local_to_hw(local));
if (res) if (res)
return res; return res;
ieee80211_hw_config(local);
} }
switch (sdata->type) { switch (sdata->type) {
...@@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev) ...@@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev)
netif_tx_unlock_bh(local->mdev); netif_tx_unlock_bh(local->mdev);
local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
ieee80211_hw_config(local);
} }
break; break;
case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_STA:
...@@ -311,8 +311,7 @@ static int ieee80211_stop(struct net_device *dev) ...@@ -311,8 +311,7 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_configure_filter(local); ieee80211_configure_filter(local);
netif_tx_unlock_bh(local->mdev); netif_tx_unlock_bh(local->mdev);
local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP;
ieee80211_hw_config(local);
} }
break; break;
case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_STA:
......
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