aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Niehusmann <jan@gondor.com>2008-03-23 15:23:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-01 15:44:07 -0400
commit64f851e410ae37a0990212ae34f0c96b641478f7 (patch)
tree6ff8af643731d195b1d9439f77b4168f53fe0c62
parentf83f1768f833cb45bc93429fdc552252a4f55ac3 (diff)
mac80211: trigger ieee80211_sta_work after opening interface
ieee80211_sta_work is disabled while network interface is down. Therefore, if you configure wireless parameters before bringing the interface up, these configurations are not yet effective and association fails. A workaround from userspace is calling a command like 'iwconfig wlan0 ap any' after the interface is brought up. To fix this behaviour, trigger execution of ieee80211_sta_work from ieee80211_open when in STA or IBSS mode. Signed-off-by: Jan Niehusmann <jan@gondor.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/ieee80211.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 28bcdf9fc3df..8e586390a2ef 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -286,6 +286,18 @@ static int ieee80211_open(struct net_device *dev)
286 if (need_hw_reconfig) 286 if (need_hw_reconfig)
287 ieee80211_hw_config(local); 287 ieee80211_hw_config(local);
288 288
289 /*
290 * ieee80211_sta_work is disabled while network interface
291 * is down. Therefore, some configuration changes may not
292 * yet be effective. Trigger execution of ieee80211_sta_work
293 * to fix this.
294 */
295 if(sdata->vif.type == IEEE80211_IF_TYPE_STA ||
296 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
297 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
298 queue_work(local->hw.workqueue, &ifsta->work);
299 }
300
289 netif_start_queue(dev); 301 netif_start_queue(dev);
290 302
291 return 0; 303 return 0;