wl1271: set radio and general params also for PLT
authorLuciano Coelho <luciano.coelho@nokia.com>
Mon, 23 Nov 2009 21:22:16 +0000 (23:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Nov 2009 20:04:29 +0000 (15:04 -0500)
We need to set the radio and general parameters when starting PLT mode.  This
patch adds calls to TEST_CMD_INI_RADIO_PARAMS and
TEST_CMD_INIT_GENERAL_PARAMS when initializing PLT mode.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271_init.c
drivers/net/wireless/wl12xx/wl1271_init.h
drivers/net/wireless/wl12xx/wl1271_main.c

index 7c2017f480eaee17a47894769349c699acf4c08c..95ee0368438aa00ba5496f334fa17dbe1a7eab2e 100644 (file)
@@ -193,7 +193,7 @@ static int wl1271_init_beacon_broadcast(struct wl1271 *wl)
        return 0;
 }
 
-static int wl1271_init_general_parms(struct wl1271 *wl)
+int wl1271_init_general_parms(struct wl1271 *wl)
 {
        struct wl1271_general_parms *gen_parms;
        struct conf_general_parms *g = &wl->conf.init.genparam;
@@ -224,7 +224,7 @@ static int wl1271_init_general_parms(struct wl1271 *wl)
        return 0;
 }
 
-static int wl1271_init_radio_parms(struct wl1271 *wl)
+int wl1271_init_radio_parms(struct wl1271 *wl)
 {
        struct wl1271_radio_parms *radio_parms;
        struct conf_radio_parms *r = &wl->conf.init.radioparam;
index 6e21ceee76a62e072218ccbea9c0ce980150d126..539b57f207c6990d41ca489a88584eb16507b62a 100644 (file)
@@ -28,6 +28,8 @@
 
 int wl1271_hw_init_power_auth(struct wl1271 *wl);
 int wl1271_hw_init(struct wl1271 *wl);
+int wl1271_init_general_parms(struct wl1271 *wl);
+int wl1271_init_radio_parms(struct wl1271 *wl);
 
 /* These are not really a TEST_CMD, but the ref driver uses them as such */
 #define TEST_CMD_INI_FILE_RADIO_PARAM   0x19
index c8652eed367714fe1422b7305e84d907e9a63bb4..d4e603993996b33480a13312aad47bef01a6d282 100644 (file)
@@ -354,6 +354,17 @@ static int wl1271_plt_init(struct wl1271 *wl)
 {
        int ret;
 
+       /* FIXME: the following parameter setting functions return error
+        * codes - the reason is so far unknown. The -EIO is therefore
+        * ignored for the time being. */
+       ret = wl1271_init_general_parms(wl);
+       if (ret < 0 && ret != -EIO)
+               return ret;
+
+       ret = wl1271_init_radio_parms(wl);
+       if (ret < 0 && ret != -EIO)
+               return ret;
+
        ret = wl1271_acx_init_mem_config(wl);
        if (ret < 0)
                return ret;