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 20:41:26 +0000 (12:41 -0800)
commit7cde93f4f7623d0b0dbe93edbd329d22a1ebcc78
treea1d3d5c8ac7ac2cd97104a0fe3cc0d9a14b0378d
parent6bd8c8508282b9db05b9bb5a9f76e051f247a618
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