Commit 8a08048a authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

wl1271: Move default FW config struct away from stack

Move the default FW config into a module global static variable, instead
of being a stack variable.
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 47fab7d5
......@@ -46,9 +46,7 @@
#include "wl1271_cmd.h"
#include "wl1271_boot.h"
static void wl1271_conf_init(struct wl1271 *wl)
{
struct conf_drv_settings conf = {
static struct conf_drv_settings default_conf = {
.sg = {
.per_threshold = 7500,
.max_scan_compensation_time = 120000,
......@@ -77,8 +75,7 @@ static void wl1271_conf_init(struct wl1271 *wl)
.tx = {
.tx_energy_detection = 0,
.rc_conf = {
.enabled_rates =
CONF_TX_RATE_MASK_UNSPECIFIED,
.enabled_rates = CONF_TX_RATE_MASK_UNSPECIFIED,
.short_retry_limit = 10,
.long_retry_limit = 10,
.aflags = 0
......@@ -185,8 +182,7 @@ static void wl1271_conf_init(struct wl1271 *wl)
.bcn_filt_ie = {
[0] = {
.ie = WLAN_EID_CHANNEL_SWITCH,
.rule =
CONF_BCN_RULE_PASS_ON_APPEARANCE,
.rule = CONF_BCN_RULE_PASS_ON_APPEARANCE,
}
},
.synch_fail_thold = 5,
......@@ -231,22 +227,22 @@ static void wl1271_conf_init(struct wl1271 *wl)
.len = 7,
.upper_limit = 0x03,
.values = {
0x18, 0x10, 0x05, 0xfb,
0xf0, 0xe8, 0x00 }
0x18, 0x10, 0x05, 0xfb, 0xf0, 0xe8,
0x00 }
},
[1] = {
.len = 7,
.upper_limit = 0x03,
.values = {
0x18, 0x10, 0x05, 0xf6,
0xf0, 0xe8, 0x00 }
0x18, 0x10, 0x05, 0xf6, 0xf0, 0xe8,
0x00 }
},
[2] = {
.len = 7,
.upper_limit = 0x03,
.values = {
0x18, 0x10, 0x05, 0xfb,
0xf0, 0xe8, 0x00 }
0x18, 0x10, 0x05, 0xfb, 0xf0, 0xe8,
0x00 }
}
},
.sr_enable = 1,
......@@ -275,10 +271,8 @@ static void wl1271_conf_init(struct wl1271 *wl)
0xec, 0xf6, 0x00, 0x0c, 0x18, 0xf8,
0xfc, 0x00, 0x08, 0x10, 0xf0, 0xf8,
0x00, 0x0a, 0x14 },
.rx_trace_loss_5 = {
0, 0, 0, 0, 0, 0, 0 },
.tx_trace_loss_5 = {
0, 0, 0, 0, 0, 0, 0 },
.rx_trace_loss_5 = { 0, 0, 0, 0, 0, 0, 0 },
.tx_trace_loss_5 = { 0, 0, 0, 0, 0, 0, 0 },
.rx_rssi_and_proc_compens_5 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
......@@ -303,12 +297,9 @@ static void wl1271_conf_init(struct wl1271 *wl)
.tx_ibias = {
0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x27 },
.rx_fem_insertion_loss = 0x14,
.tx_ref_pd_voltage_5 = {
0, 0, 0, 0, 0, 0, 0 },
.tx_ref_power_5 = {
0, 0, 0, 0, 0, 0, 0 },
.tx_offset_db_5 = {
0, 0, 0, 0, 0, 0, 0 },
.tx_ref_pd_voltage_5 = { 0, 0, 0, 0, 0, 0, 0 },
.tx_ref_power_5 = { 0, 0, 0, 0, 0, 0, 0 },
.tx_offset_db_5 = {0, 0, 0, 0, 0, 0, 0 },
.tx_rate_limits_normal_5 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
.tx_rate_limits_degraded_5 = {
......@@ -324,11 +315,13 @@ static void wl1271_conf_init(struct wl1271 *wl)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
.tx_ibias_5 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
.rx_fem_insertion_loss_5 = {
0, 0, 0, 0, 0, 0, 0 }
.rx_fem_insertion_loss_5 = { 0, 0, 0, 0, 0, 0, 0 }
}
}
};
};
static void wl1271_conf_init(struct wl1271 *wl)
{
/*
* This function applies the default configuration to the driver. This
......@@ -341,7 +334,7 @@ static void wl1271_conf_init(struct wl1271 *wl)
*/
/* apply driver default configuration */
memcpy(&wl->conf, &conf, sizeof(conf));
memcpy(&wl->conf, &default_conf, sizeof(default_conf));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment