cfg80211: put core regulatory request into queue
Luis R. Rodriguez [Thu, 18 Nov 2010 05:46:06 +0000 (21:46 -0800)]
This will simplify the synchronization for pending requests.
Without this we have a race between the core and when we
restore regulatory settings, although this is unlikely
its best to just avoid that race altogether.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

net/wireless/reg.c

index 3be18d9..9830db6 100644 (file)
@@ -1530,12 +1530,7 @@ static int regulatory_hint_core(const char *alpha2)
        request->alpha2[1] = alpha2[1];
        request->initiator = NL80211_REGDOM_SET_BY_CORE;
 
-       /*
-        * This ensures last_request is populated once modules
-        * come swinging in and calling regulatory hints and
-        * wiphy_apply_custom_regulatory().
-        */
-       reg_process_hint(request);
+       queue_regulatory_request(request);
 
        return 0;
 }