aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_acx.c
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2010-02-18 06:25:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:42 -0500
commit243eeb51eaa0a33caeff3e2275b2460eea5579ec (patch)
treebf65430f99d0890209772032abd47e7b85e69341 /drivers/net/wireless/wl12xx/wl1271_acx.c
parent30240fc76a57e37a4bb42976ff7162b5e45e6117 (diff)
wl1271: modify wl1271_acx_ac_cfg() to use function parameters
For WMM we need to configure each queue separately so modify wl1271_acx_ac_cfg() to take the configuration from function parameters instead. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.c31
1 files changed, 14 insertions, 17 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: