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: Michael Wu <flamingice@sourmilk.net> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
01e1f045e6
commit
8b393f1dc7
@@ -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)
|
|||||||
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)
|
|||||||
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:
|
||||||
|
Reference in New Issue
Block a user