wl1271: updated general parameters structure for newer firmwares
authorLuciano Coelho <luciano.coelho@nokia.com>
Fri, 11 Dec 2009 13:40:41 +0000 (15:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Dec 2009 21:31:29 +0000 (16:31 -0500)
In revision 6.1.0.0.288 the general parameters structure has changed.  This
patch updates the driver code accordingly.

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_cmd.c
drivers/net/wireless/wl12xx/wl1271_cmd.h
drivers/net/wireless/wl12xx/wl1271_conf.h
drivers/net/wireless/wl12xx/wl1271_main.c

index 886a9bc39cc1ddb87bd24d1a4a173c7b798af4f7..fe9b187f476ecbe5c472ae477999d25b8907f892 100644 (file)
@@ -209,6 +209,26 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
        gen_parms->tx_bip_fem_manufacturer = g->tx_bip_fem_manufacturer;
        gen_parms->settings = g->settings;
 
+       gen_parms->sr_state = g->sr_state;
+
+       memcpy(gen_parms->srf1,
+              g->srf1,
+              CONF_MAX_SMART_REFLEX_PARAMS);
+       memcpy(gen_parms->srf2,
+              g->srf2,
+              CONF_MAX_SMART_REFLEX_PARAMS);
+       memcpy(gen_parms->srf3,
+              g->srf3,
+              CONF_MAX_SMART_REFLEX_PARAMS);
+       memcpy(gen_parms->sr_debug_table,
+              g->sr_debug_table,
+              CONF_MAX_SMART_REFLEX_PARAMS);
+
+       gen_parms->sr_sen_n_p = g->sr_sen_n_p;
+       gen_parms->sr_sen_n_p_gain = g->sr_sen_n_p_gain;
+       gen_parms->sr_sen_nrn = g->sr_sen_nrn;
+       gen_parms->sr_sen_prn = g->sr_sen_prn;
+
        ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0);
        if (ret < 0)
                wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
index de23c08738a0ee90caa645232030dac0591dcf5e..057f925db2aa62fc93abd379c96530ea6bb79a49 100644 (file)
@@ -437,6 +437,21 @@ struct wl1271_general_parms_cmd {
        u8 tx_bip_fem_autodetect;
        u8 tx_bip_fem_manufacturer;
        u8 settings;
+
+       u8 sr_state;
+
+       s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS];
+       s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS];
+       s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS];
+
+       s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS];
+
+       u8 sr_sen_n_p;
+       u8 sr_sen_n_p_gain;
+       u8 sr_sen_nrn;
+       u8 sr_sen_prn;
+
+       u8 padding[3];
 } __attribute__ ((packed));
 
 struct wl1271_radio_parms_cmd {
index 565373ede2652a4b711a5f6a5a233847ba79ec85..5e36cd90d0c6d0bea0988080b98e99a0ff2472a9 100644 (file)
@@ -759,6 +759,9 @@ enum single_dual_band_enum {
        CONF_DUAL_BAND
 };
 
+
+#define CONF_MAX_SMART_REFLEX_PARAMS 16
+
 struct conf_general_parms {
        /*
         * RF Reference Clock type / speed
@@ -815,6 +818,20 @@ struct conf_general_parms {
         * Range: Unknown
         */
        u8 settings;
+
+       /* Smart reflex settings */
+       u8 sr_state;
+
+       s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS];
+       s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS];
+       s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS];
+
+       s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS];
+
+       u8 sr_sen_n_p;
+       u8 sr_sen_n_p_gain;
+       u8 sr_sen_nrn;
+       u8 sr_sen_prn;
 };
 
 #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
index b62c00ff42fe0c3a724e6030d93421b1ae75a8bf..7ab45c446ab85b2938a61661623388c62c7ab09b 100644 (file)
@@ -259,6 +259,19 @@ static struct conf_drv_settings default_conf = {
                        .tx_bip_fem_autodetect = 0,
                        .tx_bip_fem_manufacturer = 1,
                        .settings = 1,
+                       .sr_state = 1,
+                       .srf1 = { 0, 0, 0, 0, 0, 0, 0, 0,
+                                 0, 0, 0, 0, 0, 0, 0, 0 },
+                       .srf2 = { 0, 0, 0, 0, 0, 0, 0, 0,
+                                 0, 0, 0, 0, 0, 0, 0, 0 },
+                       .srf3 = { 0, 0, 0, 0, 0, 0, 0, 0,
+                                 0, 0, 0, 0, 0, 0, 0, 0 },
+                       .sr_debug_table = { 0, 0, 0, 0, 0, 0, 0, 0,
+                                           0, 0, 0, 0, 0, 0, 0, 0 },
+                       .sr_sen_n_p = 0,
+                       .sr_sen_n_p_gain = 0,
+                       .sr_sen_nrn = 0,
+                       .sr_sen_prn = 0,
                },
                .radioparam = {
                        .rx_trace_loss       = 10,