summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/wl1251_acx.c
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-11-30 10:18:19 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:55:55 -0500
commit86dff7a7955f1e14c1f2c142312462fae70ea7e4 (patch)
tree04b4401a2c8467dcbf00e219c2b222ff45cf20b8 /drivers/net/wireless/wl12xx/wl1251_acx.c
parentcdd1e9a91ea55594cbcc9847dbb9392e341cbefd (diff)
downloadlinux-86dff7a7955f1e14c1f2c142312462fae70ea7e4.tar.gz
wl1251: implement acx_ac_cfg to configure hardware queues
Needed for WMM. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_acx.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.c b/drivers/net/wireless/wl12xx/wl1251_acx.c
index acfa086dbfc5..b409c75499dd 100644
--- a/drivers/net/wireless/wl12xx/wl1251_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_acx.c
@@ -976,3 +976,36 @@ out:
kfree(acx);
return ret;
}
+
+int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
+ u8 aifs, u16 txop)
+{
+ struct wl1251_acx_ac_cfg *acx;
+ int ret = 0;
+
+ wl1251_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d "
+ "aifs %d txop %d", ac, cw_min, cw_max, aifs, txop);
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->ac = ac;
+ acx->cw_min = cw_min;
+ acx->cw_max = cw_max;
+ acx->aifsn = aifs;
+ acx->txop_limit = txop;
+
+ ret = wl1251_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1251_warning("acx ac cfg failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}