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)
res = local->ops->start(local_to_hw(local));
if (res)
return res;
ieee80211_hw_config(local);
}
switch (sdata->type) {
......@@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev)
netif_tx_unlock_bh(local->mdev);
local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
ieee80211_hw_config(local);
}
break;
case IEEE80211_IF_TYPE_STA:
......@@ -311,8 +311,7 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_configure_filter(local);
netif_tx_unlock_bh(local->mdev);
local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
ieee80211_hw_config(local);
local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP;
}
break;
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