wlcore: save last regdom configuration on stop
authorEliad Peller <eliad@wizery.com>
Mon, 9 Sep 2013 09:24:44 +0000 (12:24 +0300)
committerLuciano Coelho <luciano.coelho@intel.com>
Wed, 23 Oct 2013 06:47:45 +0000 (09:47 +0300)
In order to reconfigure the correct reg domain on
recovery, we have to save the current configuration
before clearing it (wl->reg_ch_conf_pending is
considered before configuring a new regdomain).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
drivers/net/wireless/ti/wlcore/main.c

index a9ee23417716c8ecd31ec8172419411b0c3b04ab..0368b9cbfb896d6460da3635b199ef6266805644 100644 (file)
@@ -1949,8 +1949,10 @@ static void wlcore_op_stop_locked(struct wl1271 *wl)
 
        /*
         * FW channels must be re-calibrated after recovery,
-        * clear the last Reg-Domain channel configuration.
+        * save current Reg-Domain channel configuration and clear it.
         */
+       memcpy(wl->reg_ch_conf_pending, wl->reg_ch_conf_last,
+              sizeof(wl->reg_ch_conf_pending));
        memset(wl->reg_ch_conf_last, 0, sizeof(wl->reg_ch_conf_last));
 }