mac80211: move roc cookie assignment earlier
authorEliad Peller <eliad@wizery.com>
Sun, 12 Jan 2014 09:06:37 +0000 (11:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 21:32:25 +0000 (13:32 -0800)
commit6f912f7351c1240780b9e212b00e1cd118ba5bd9
treee0aab3a8c648cb8fd7a7c92498085d28a75d1ed8
parent05cdb9ef5488a3f40868d435b82982ee9a3690fa
mac80211: move roc cookie assignment earlier

commit 2f617435c3a6fe3f39efb9ae2baa77de2d6c97b8 upstream.

ieee80211_start_roc_work() might add a new roc
to existing roc, and tell cfg80211 it has already
started.

However, this might happen before the roc cookie
was set, resulting in REMAIN_ON_CHANNEL (started)
event with null cookie. Consequently, it can make
wpa_supplicant go out of sync.

Fix it by setting the roc cookie earlier.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/cfg.c