aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.c31
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.h3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.c14
3 files changed, 26 insertions, 22 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index 0b3434843476..4b052eedbd4b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -830,12 +830,14 @@ out:
830 return ret; 830 return ret;
831} 831}
832 832
833int wl1271_acx_ac_cfg(struct wl1271 *wl) 833int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
834 u8 aifsn, u16 txop)
834{ 835{
835 struct acx_ac_cfg *acx; 836 struct acx_ac_cfg *acx;
836 int i, ret = 0; 837 int ret = 0;
837 838
838 wl1271_debug(DEBUG_ACX, "acx access category config"); 839 wl1271_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d "
840 "aifs %d txop %d", ac, cw_min, cw_max, aifsn, txop);
839 841
840 acx = kzalloc(sizeof(*acx), GFP_KERNEL); 842 acx = kzalloc(sizeof(*acx), GFP_KERNEL);
841 843
@@ -844,21 +846,16 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl)
844 goto out; 846 goto out;
845 } 847 }
846 848
847 for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { 849 acx->ac = ac;
848 struct conf_tx_ac_category *c = &(wl->conf.tx.ac_conf[i]); 850 acx->cw_min = cw_min;
849 acx->ac = c->ac; 851 acx->cw_max = cpu_to_le16(cw_max);
850 acx->cw_min = c->cw_min; 852 acx->aifsn = aifsn;
851 acx->cw_max = cpu_to_le16(c->cw_max); 853 acx->tx_op_limit = cpu_to_le16(txop);
852 acx->aifsn = c->aifsn;
853 acx->reserved = 0;
854 acx->tx_op_limit = cpu_to_le16(c->tx_op_limit);
855 854
856 ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx)); 855 ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
857 if (ret < 0) { 856 if (ret < 0) {
858 wl1271_warning("Setting of access category " 857 wl1271_warning("acx ac cfg failed: %d", ret);
859 "config: %d", ret); 858 goto out;
860 goto out;
861 }
862 } 859 }
863 860
864out: 861out:
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index 1bb63af64f0e..e5f5cbd7f0ea 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -1070,7 +1070,8 @@ int wl1271_acx_cts_protect(struct wl1271 *wl,
1070 enum acx_ctsprotect_type ctsprotect); 1070 enum acx_ctsprotect_type ctsprotect);
1071int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats); 1071int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats);
1072int wl1271_acx_rate_policies(struct wl1271 *wl); 1072int wl1271_acx_rate_policies(struct wl1271 *wl);
1073int wl1271_acx_ac_cfg(struct wl1271 *wl); 1073int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
1074 u8 aifsn, u16 txop);
1074int wl1271_acx_tid_cfg(struct wl1271 *wl); 1075int wl1271_acx_tid_cfg(struct wl1271 *wl);
1075int wl1271_acx_frag_threshold(struct wl1271 *wl); 1076int wl1271_acx_frag_threshold(struct wl1271 *wl);
1076int wl1271_acx_tx_config_options(struct wl1271 *wl); 1077int wl1271_acx_tx_config_options(struct wl1271 *wl);
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index c9848eecb767..2b56a9ecd7f2 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -195,7 +195,8 @@ static int wl1271_init_beacon_broadcast(struct wl1271 *wl)
195 195
196int wl1271_hw_init(struct wl1271 *wl) 196int wl1271_hw_init(struct wl1271 *wl)
197{ 197{
198 int ret; 198 struct conf_tx_ac_category *conf_ac;
199 int ret, i;
199 200
200 ret = wl1271_cmd_general_parms(wl); 201 ret = wl1271_cmd_general_parms(wl);
201 if (ret < 0) 202 if (ret < 0)
@@ -279,9 +280,14 @@ int wl1271_hw_init(struct wl1271 *wl)
279 goto out_free_memmap; 280 goto out_free_memmap;
280 281
281 /* Default AC configuration */ 282 /* Default AC configuration */
282 ret = wl1271_acx_ac_cfg(wl); 283 for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
283 if (ret < 0) 284 conf_ac = &wl->conf.tx.ac_conf[i];
284 goto out_free_memmap; 285 ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min,
286 conf_ac->cw_max, conf_ac->aifsn,
287 conf_ac->tx_op_limit);
288 if (ret < 0)
289 goto out_free_memmap;
290 }
285 291
286 /* Configure TX rate classes */ 292 /* Configure TX rate classes */
287 ret = wl1271_acx_rate_policies(wl); 293 ret = wl1271_acx_rate_policies(wl);