Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300932
b: refs/heads/master
c: 5453dc1
h: refs/heads/master
v: v3
  • Loading branch information
Luciano Coelho committed Apr 12, 2012
1 parent ec3eec8 commit 3fcded3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 166b213626067c3128e196a558a0cb318344b411
refs/heads/master: 5453dc105a1f0b3204d61eda9af75faba6ae4df4
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ struct wl12xx_conf_rf {

struct wl12xx_priv_conf {
struct wl12xx_conf_rf rf;
struct conf_memory_settings mem_wl127x;
};

#endif /* __WL12XX_CONF_H__ */
49 changes: 38 additions & 11 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,12 @@ static struct wlcore_conf wl12xx_conf = {
.inactivity_timeout = 10000,
.tx_ba_tid_bitmap = CONF_TX_BA_ENABLED_TID_BITMAP,
},
.mem_wl127x = {
.num_stations = 1,
.ssid_profiles = 1,
.rx_block_num = 70,
.tx_min_block_num = 40,
.dynamic_memory = 1,
.min_req_tx_blocks = 100,
.min_req_rx_blocks = 22,
.tx_min = 27,
},
.mem_wl128x = {
/*
* Memory config for wl127x chips is given in the
* wl12xx_default_priv_conf struct. The below configuration is
* for wl128x chips.
*/
.mem = {
.num_stations = 1,
.ssid_profiles = 1,
.rx_block_num = 40,
Expand Down Expand Up @@ -367,6 +362,29 @@ static struct wlcore_conf wl12xx_conf = {
},
};

static struct wl12xx_priv_conf wl12xx_default_priv_conf = {
.rf = {
.tx_per_channel_power_compensation_2 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
},
.tx_per_channel_power_compensation_5 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
},
},
.mem_wl127x = {
.num_stations = 1,
.ssid_profiles = 1,
.rx_block_num = 70,
.tx_min_block_num = 40,
.dynamic_memory = 1,
.min_req_tx_blocks = 100,
.min_req_rx_blocks = 22,
.tx_min = 27,
},

};

#define WL12XX_TX_HW_BLOCK_SPARE_DEFAULT 1
#define WL12XX_TX_HW_BLOCK_GEM_SPARE 2
Expand Down Expand Up @@ -609,6 +627,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS;
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
memcpy(&wl->conf.mem, &wl12xx_default_priv_conf.mem_wl127x,
sizeof(wl->conf.mem));

/* read data preparation is only needed by wl127x */
wl->ops->prepare_read = wl127x_prepare_read;
Expand All @@ -626,6 +646,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
wl->plt_fw_name = WL127X_PLT_FW_NAME;
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
memcpy(&wl->conf.mem, &wl12xx_default_priv_conf.mem_wl127x,
sizeof(wl->conf.mem));

/* read data preparation is only needed by wl127x */
wl->ops->prepare_read = wl127x_prepare_read;
Expand Down Expand Up @@ -1172,8 +1194,13 @@ static int wl12xx_hw_init(struct wl1271 *wl)

static void wl12xx_conf_init(struct wl1271 *wl)
{
struct wl12xx_priv *priv = wl->priv;

/* apply driver default configuration */
memcpy(&wl->conf, &wl12xx_conf, sizeof(wl12xx_conf));

/* apply default private configuration */
memcpy(&priv->conf, &wl12xx_default_priv_conf, sizeof(priv->conf));
}

static bool wl12xx_mac_in_fuse(struct wl1271 *wl)
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/net/wireless/ti/wlcore/acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,7 @@ int wl12xx_acx_mem_cfg(struct wl1271 *wl)
goto out;
}

if (wl->chip.id == CHIP_ID_1283_PG20)
mem = &wl->conf.mem_wl128x;
else
mem = &wl->conf.mem_wl127x;
mem = &wl->conf.mem;

/* memory config */
mem_conf->num_stations = mem->num_stations;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ti/wlcore/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,7 @@ struct wlcore_conf {
struct conf_scan_settings scan;
struct conf_sched_scan_settings sched_scan;
struct conf_ht_setting ht;
struct conf_memory_settings mem_wl127x;
struct conf_memory_settings mem_wl128x;
struct conf_memory_settings mem;
struct conf_fm_coex fm_coex;
struct conf_rx_streaming_settings rx_streaming;
struct conf_fwlog fwlog;
Expand Down

0 comments on commit 3fcded3

Please sign in to comment.