diff options
author | Arik Nemtsov <arik@wizery.com> | 2010-10-16 11:44:51 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-01-24 15:11:46 -0500 |
commit | 1e05a81888318752e9a6d2158a95ddd6442ae117 (patch) | |
tree | 1ff3513c0a5f037746f7e5334a3eeb7f64bd661c | |
parent | 6177eaea277527e48753d050723cd138494c98a8 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 46 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 45 |
4 files changed, 90 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index 17f6a63fbdea..d6885d7c4256 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -754,7 +754,7 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats) | |||
754 | int wl1271_acx_rate_policies(struct wl1271 *wl) | 754 | int wl1271_acx_rate_policies(struct wl1271 *wl) |
755 | { | 755 | { |
756 | struct acx_rate_policy *acx; | 756 | struct acx_rate_policy *acx; |
757 | struct conf_tx_rate_class *c = &wl->conf.tx.rc_conf; | 757 | struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf; |
758 | int idx = 0; | 758 | int idx = 0; |
759 | int ret = 0; | 759 | int ret = 0; |
760 | 760 | ||
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index 52a6bcd5c309..3b7b8f0a200b 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -490,8 +490,8 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, | |||
490 | cmd->len = cpu_to_le16(buf_len); | 490 | cmd->len = cpu_to_le16(buf_len); |
491 | cmd->template_type = template_id; | 491 | cmd->template_type = template_id; |
492 | cmd->enabled_rates = cpu_to_le32(rates); | 492 | cmd->enabled_rates = cpu_to_le32(rates); |
493 | cmd->short_retry_limit = wl->conf.tx.rc_conf.short_retry_limit; | 493 | cmd->short_retry_limit = wl->conf.tx.tmpl_short_retry_limit; |
494 | cmd->long_retry_limit = wl->conf.tx.rc_conf.long_retry_limit; | 494 | cmd->long_retry_limit = wl->conf.tx.tmpl_long_retry_limit; |
495 | cmd->index = index; | 495 | cmd->index = index; |
496 | 496 | ||
497 | if (buf) | 497 | if (buf) |
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index a16b3616e430..7563ce3a9f66 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -496,6 +496,26 @@ struct conf_rx_settings { | |||
496 | CONF_HW_BIT_RATE_2MBPS) | 496 | CONF_HW_BIT_RATE_2MBPS) |
497 | #define CONF_TX_RATE_RETRY_LIMIT 10 | 497 | #define CONF_TX_RATE_RETRY_LIMIT 10 |
498 | 498 | ||
499 | /* | ||
500 | * Rates supported for data packets when operating as AP. Note the absense | ||
501 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop | ||
502 | * one. The rate dropped is not mandatory under any operating mode. | ||
503 | */ | ||
504 | #define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \ | ||
505 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \ | ||
506 | CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \ | ||
507 | CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \ | ||
508 | CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \ | ||
509 | CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \ | ||
510 | CONF_HW_BIT_RATE_54MBPS) | ||
511 | |||
512 | /* | ||
513 | * Default rates for management traffic when operating in AP mode. This | ||
514 | * should be configured according to the basic rate set of the AP | ||
515 | */ | ||
516 | #define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \ | ||
517 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS) | ||
518 | |||
499 | struct conf_tx_rate_class { | 519 | struct conf_tx_rate_class { |
500 | 520 | ||
501 | /* | 521 | /* |
@@ -636,9 +656,9 @@ struct conf_tx_settings { | |||
636 | 656 | ||
637 | /* | 657 | /* |
638 | * Configuration for rate classes for TX (currently only one | 658 | * Configuration for rate classes for TX (currently only one |
639 | * rate class supported.) | 659 | * rate class supported). Used in non-AP mode. |
640 | */ | 660 | */ |
641 | struct conf_tx_rate_class rc_conf; | 661 | struct conf_tx_rate_class sta_rc_conf; |
642 | 662 | ||
643 | /* | 663 | /* |
644 | * Configuration for access categories for TX rate control. | 664 | * Configuration for access categories for TX rate control. |
@@ -647,6 +667,22 @@ struct conf_tx_settings { | |||
647 | struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT]; | 667 | struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT]; |
648 | 668 | ||
649 | /* | 669 | /* |
670 | * Configuration for rate classes in AP-mode. These rate classes | ||
671 | * are for the AC TX queues | ||
672 | */ | ||
673 | struct conf_tx_rate_class ap_rc_conf[CONF_TX_MAX_AC_COUNT]; | ||
674 | |||
675 | /* | ||
676 | * Management TX rate class for AP-mode. | ||
677 | */ | ||
678 | struct conf_tx_rate_class ap_mgmt_conf; | ||
679 | |||
680 | /* | ||
681 | * Broadcast TX rate class for AP-mode. | ||
682 | */ | ||
683 | struct conf_tx_rate_class ap_bcst_conf; | ||
684 | |||
685 | /* | ||
650 | * Configuration for TID parameters. | 686 | * Configuration for TID parameters. |
651 | */ | 687 | */ |
652 | u8 tid_conf_count; | 688 | u8 tid_conf_count; |
@@ -687,6 +723,12 @@ struct conf_tx_settings { | |||
687 | * Range: CONF_HW_BIT_RATE_* bit mask | 723 | * Range: CONF_HW_BIT_RATE_* bit mask |
688 | */ | 724 | */ |
689 | u32 basic_rate_5; | 725 | u32 basic_rate_5; |
726 | |||
727 | /* | ||
728 | * TX retry limits for templates | ||
729 | */ | ||
730 | u8 tmpl_short_retry_limit; | ||
731 | u8 tmpl_long_retry_limit; | ||
690 | }; | 732 | }; |
691 | 733 | ||
692 | enum { | 734 | enum { |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 062247ef3ad2..788959a5f0de 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -116,11 +116,11 @@ static struct conf_drv_settings default_conf = { | |||
116 | }, | 116 | }, |
117 | .tx = { | 117 | .tx = { |
118 | .tx_energy_detection = 0, | 118 | .tx_energy_detection = 0, |
119 | .rc_conf = { | 119 | .sta_rc_conf = { |
120 | .enabled_rates = 0, | 120 | .enabled_rates = 0, |
121 | .short_retry_limit = 10, | 121 | .short_retry_limit = 10, |
122 | .long_retry_limit = 10, | 122 | .long_retry_limit = 10, |
123 | .aflags = 0 | 123 | .aflags = 0, |
124 | }, | 124 | }, |
125 | .ac_conf_count = 4, | 125 | .ac_conf_count = 4, |
126 | .ac_conf = { | 126 | .ac_conf = { |
@@ -153,6 +153,45 @@ static struct conf_drv_settings default_conf = { | |||
153 | .tx_op_limit = 1504, | 153 | .tx_op_limit = 1504, |
154 | }, | 154 | }, |
155 | }, | 155 | }, |
156 | .ap_rc_conf = { | ||
157 | [0] = { | ||
158 | .enabled_rates = CONF_TX_AP_ENABLED_RATES, | ||
159 | .short_retry_limit = 10, | ||
160 | .long_retry_limit = 10, | ||
161 | .aflags = 0, | ||
162 | }, | ||
163 | [1] = { | ||
164 | .enabled_rates = CONF_TX_AP_ENABLED_RATES, | ||
165 | .short_retry_limit = 10, | ||
166 | .long_retry_limit = 10, | ||
167 | .aflags = 0, | ||
168 | }, | ||
169 | [2] = { | ||
170 | .enabled_rates = CONF_TX_AP_ENABLED_RATES, | ||
171 | .short_retry_limit = 10, | ||
172 | .long_retry_limit = 10, | ||
173 | .aflags = 0, | ||
174 | }, | ||
175 | [3] = { | ||
176 | .enabled_rates = CONF_TX_AP_ENABLED_RATES, | ||
177 | .short_retry_limit = 10, | ||
178 | .long_retry_limit = 10, | ||
179 | .aflags = 0, | ||
180 | }, | ||
181 | }, | ||
182 | .ap_mgmt_conf = { | ||
183 | .enabled_rates = CONF_TX_AP_DEFAULT_MGMT_RATES, | ||
184 | .short_retry_limit = 10, | ||
185 | .long_retry_limit = 10, | ||
186 | .aflags = 0, | ||
187 | }, | ||
188 | .ap_bcst_conf = { | ||
189 | .enabled_rates = CONF_HW_BIT_RATE_1MBPS, | ||
190 | .short_retry_limit = 10, | ||
191 | .long_retry_limit = 10, | ||
192 | .aflags = 0, | ||
193 | }, | ||
194 | |||
156 | .tid_conf_count = 4, | 195 | .tid_conf_count = 4, |
157 | .tid_conf = { | 196 | .tid_conf = { |
158 | [CONF_TX_AC_BE] = { | 197 | [CONF_TX_AC_BE] = { |
@@ -193,6 +232,8 @@ static struct conf_drv_settings default_conf = { | |||
193 | .tx_compl_threshold = 4, | 232 | .tx_compl_threshold = 4, |
194 | .basic_rate = CONF_HW_BIT_RATE_1MBPS, | 233 | .basic_rate = CONF_HW_BIT_RATE_1MBPS, |
195 | .basic_rate_5 = CONF_HW_BIT_RATE_6MBPS, | 234 | .basic_rate_5 = CONF_HW_BIT_RATE_6MBPS, |
235 | .tmpl_short_retry_limit = 10, | ||
236 | .tmpl_long_retry_limit = 10, | ||
196 | }, | 237 | }, |
197 | .conn = { | 238 | .conn = { |
198 | .wake_up_event = CONF_WAKE_UP_EVENT_DTIM, | 239 | .wake_up_event = CONF_WAKE_UP_EVENT_DTIM, |