aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMichael Wu <flamingice@sourmilk.net>2007-11-28 01:57:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2007-11-29 18:08:47 -0500
commit8b393f1dc76acbe65a97a4e51f8144f4a65fa1c9 (patch)
treeff1466c1fe5ebd700cc06bde1512900ffcbf5be7 /net
parent01e1f045e65b683fe7203b1e16a915bbb94c15fe (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 8f11c97f13d2..0dc114c4ef2b 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -216,6 +216,7 @@ static int ieee80211_open(struct net_device *dev)
216 res = local->ops->start(local_to_hw(local)); 216 res = local->ops->start(local_to_hw(local));
217 if (res) 217 if (res)
218 return res; 218 return res;
219 ieee80211_hw_config(local);
219 } 220 }
220 221
221 switch (sdata->type) { 222 switch (sdata->type) {
@@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev)
232 netif_tx_unlock_bh(local->mdev); 233 netif_tx_unlock_bh(local->mdev);
233 234
234 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; 235 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
235 ieee80211_hw_config(local);
236 } 236 }
237 break; 237 break;
238 case IEEE80211_IF_TYPE_STA: 238 case IEEE80211_IF_TYPE_STA:
@@ -311,8 +311,7 @@ static int ieee80211_stop(struct net_device *dev)
311 ieee80211_configure_filter(local); 311 ieee80211_configure_filter(local);
312 netif_tx_unlock_bh(local->mdev); 312 netif_tx_unlock_bh(local->mdev);
313 313
314 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; 314 local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP;
315 ieee80211_hw_config(local);
316 } 315 }
317 break; 316 break;
318 case IEEE80211_IF_TYPE_STA: 317 case IEEE80211_IF_TYPE_STA: