mirror of https://gitee.com/openkylin/linux.git
wl12xx: Add AP related configuration to conf_drv_settings
Rate class configuration has been split up for AP and STA modes. Template related configuration likewise separated. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
6177eaea27
commit
1e05a81888
|
@ -754,7 +754,7 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats)
|
|||
int wl1271_acx_rate_policies(struct wl1271 *wl)
|
||||
{
|
||||
struct acx_rate_policy *acx;
|
||||
struct conf_tx_rate_class *c = &wl->conf.tx.rc_conf;
|
||||
struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf;
|
||||
int idx = 0;
|
||||
int ret = 0;
|
||||
|
||||
|
|
|
@ -490,8 +490,8 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
|
|||
cmd->len = cpu_to_le16(buf_len);
|
||||
cmd->template_type = template_id;
|
||||
cmd->enabled_rates = cpu_to_le32(rates);
|
||||
cmd->short_retry_limit = wl->conf.tx.rc_conf.short_retry_limit;
|
||||
cmd->long_retry_limit = wl->conf.tx.rc_conf.long_retry_limit;
|
||||
cmd->short_retry_limit = wl->conf.tx.tmpl_short_retry_limit;
|
||||
cmd->long_retry_limit = wl->conf.tx.tmpl_long_retry_limit;
|
||||
cmd->index = index;
|
||||
|
||||
if (buf)
|
||||
|
|
|
@ -496,6 +496,26 @@ struct conf_rx_settings {
|
|||
CONF_HW_BIT_RATE_2MBPS)
|
||||
#define CONF_TX_RATE_RETRY_LIMIT 10
|
||||
|
||||
/*
|
||||
* Rates supported for data packets when operating as AP. Note the absense
|
||||
* of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
|
||||
* one. The rate dropped is not mandatory under any operating mode.
|
||||
*/
|
||||
#define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
|
||||
CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
|
||||
CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
|
||||
CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
|
||||
CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
|
||||
CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
|
||||
CONF_HW_BIT_RATE_54MBPS)
|
||||
|
||||
/*
|
||||
* Default rates for management traffic when operating in AP mode. This
|
||||
* should be configured according to the basic rate set of the AP
|
||||
*/
|
||||
#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
|
||||
CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
|
||||
|
||||
struct conf_tx_rate_class {
|
||||
|
||||
/*
|
||||
|
@ -636,9 +656,9 @@ struct conf_tx_settings {
|
|||
|
||||
/*
|
||||
* Configuration for rate classes for TX (currently only one
|
||||
* rate class supported.)
|
||||
* rate class supported). Used in non-AP mode.
|
||||
*/
|
||||
struct conf_tx_rate_class rc_conf;
|
||||
struct conf_tx_rate_class sta_rc_conf;
|
||||
|
||||
/*
|
||||
* Configuration for access categories for TX rate control.
|
||||
|
@ -646,6 +666,22 @@ struct conf_tx_settings {
|
|||
u8 ac_conf_count;
|
||||
struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
|
||||
|
||||
/*
|
||||
* Configuration for rate classes in AP-mode. These rate classes
|
||||
* are for the AC TX queues
|
||||
*/
|
||||
struct conf_tx_rate_class ap_rc_conf[CONF_TX_MAX_AC_COUNT];
|
||||
|
||||
/*
|
||||
* Management TX rate class for AP-mode.
|
||||
*/
|
||||
struct conf_tx_rate_class ap_mgmt_conf;
|
||||
|
||||
/*
|
||||
* Broadcast TX rate class for AP-mode.
|
||||
*/
|
||||
struct conf_tx_rate_class ap_bcst_conf;
|
||||
|
||||
/*
|
||||
* Configuration for TID parameters.
|
||||
*/
|
||||
|
@ -687,6 +723,12 @@ struct conf_tx_settings {
|
|||
* Range: CONF_HW_BIT_RATE_* bit mask
|
||||
*/
|
||||
u32 basic_rate_5;
|
||||
|
||||
/*
|
||||
* TX retry limits for templates
|
||||
*/
|
||||
u8 tmpl_short_retry_limit;
|
||||
u8 tmpl_long_retry_limit;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -116,11 +116,11 @@ static struct conf_drv_settings default_conf = {
|
|||
},
|
||||
.tx = {
|
||||
.tx_energy_detection = 0,
|
||||
.rc_conf = {
|
||||
.sta_rc_conf = {
|
||||
.enabled_rates = 0,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0
|
||||
.aflags = 0,
|
||||
},
|
||||
.ac_conf_count = 4,
|
||||
.ac_conf = {
|
||||
|
@ -153,6 +153,45 @@ static struct conf_drv_settings default_conf = {
|
|||
.tx_op_limit = 1504,
|
||||
},
|
||||
},
|
||||
.ap_rc_conf = {
|
||||
[0] = {
|
||||
.enabled_rates = CONF_TX_AP_ENABLED_RATES,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
[1] = {
|
||||
.enabled_rates = CONF_TX_AP_ENABLED_RATES,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
[2] = {
|
||||
.enabled_rates = CONF_TX_AP_ENABLED_RATES,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
[3] = {
|
||||
.enabled_rates = CONF_TX_AP_ENABLED_RATES,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
},
|
||||
.ap_mgmt_conf = {
|
||||
.enabled_rates = CONF_TX_AP_DEFAULT_MGMT_RATES,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
.ap_bcst_conf = {
|
||||
.enabled_rates = CONF_HW_BIT_RATE_1MBPS,
|
||||
.short_retry_limit = 10,
|
||||
.long_retry_limit = 10,
|
||||
.aflags = 0,
|
||||
},
|
||||
|
||||
.tid_conf_count = 4,
|
||||
.tid_conf = {
|
||||
[CONF_TX_AC_BE] = {
|
||||
|
@ -193,6 +232,8 @@ static struct conf_drv_settings default_conf = {
|
|||
.tx_compl_threshold = 4,
|
||||
.basic_rate = CONF_HW_BIT_RATE_1MBPS,
|
||||
.basic_rate_5 = CONF_HW_BIT_RATE_6MBPS,
|
||||
.tmpl_short_retry_limit = 10,
|
||||
.tmpl_long_retry_limit = 10,
|
||||
},
|
||||
.conn = {
|
||||
.wake_up_event = CONF_WAKE_UP_EVENT_DTIM,
|
||||
|
|
Loading…
Reference in New Issue