2011-10-19 12:18:54

by Janusz Dziedzic

[permalink] [raw]
Subject: mac80211: ROC timeout and back to oper channel when associated

Hello,

I am doing such test with wpa_supplicant:
1) p2p_connect to GO (GO oper channel different than our listen
channel) - connected state
2) p2p_find
3) p2p_stop_find (we left on listen channel and didn't back oper channel).

Seems in case we have empty work queue in mac80211 we will not back to
oper channel (we are connected with GO).
In case after step 3 I will trigger some action, eg. scan we will
back to oper channel correctly.

My driver don't have HW_ROC callbacks.

I don't know ieee80211_work_work() code well and all flags we have
inside, so probably this patch don't cover all cases but generally
works.
Could you help with fix for that problem?

--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -1089,6 +1089,8 @@ static void ieee80211_work_work(struct work_struct *work)
list_del_rcu(&wk->list);
synchronize_rcu();
list_add(&wk->list, &free_work);
+ if (!ieee80211_cfg_on_oper_channel(local))
+ ieee80211_hw_config(local, 0);
break;
default:


BR
Janusz