summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_acx.c
diff options
context:
space:
mode:
authorVidhya Govindan <vidhya.govindan@nokia.com>2009-11-17 18:49:08 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:21 -0500
commitd531cf303f765bf3477330e58fbeab75da668931 (patch)
treeaca8935d61cc243faed99201a3063a484b37cc0c /drivers/net/wireless/wl12xx/wl1251_acx.c
parent2410378a4c8e978823354ab3e44cd07c3c18a237 (diff)
wl1251: Add acx command to set tbtt and dtim period
The dtim period obtained from the mac80211 is not set to the firmware. This patch implements the acx command to set correct tbtt and dtim value to the firmware. Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@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.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.c b/drivers/net/wireless/wl12xx/wl1251_acx.c
index 50633e043cf..acfa086dbfc 100644
--- a/drivers/net/wireless/wl12xx/wl1251_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_acx.c
@@ -948,3 +948,31 @@ out:
kfree(mem_conf);
return ret;
}
+
+int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim)
+{
+ struct wl1251_acx_wr_tbtt_and_dtim *acx;
+ int ret;
+
+ wl1251_debug(DEBUG_ACX, "acx tbtt and dtim");
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->tbtt = tbtt;
+ acx->dtim = dtim;
+
+ ret = wl1251_cmd_configure(wl, ACX_WR_TBTT_AND_DTIM,
+ acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1251_warning("failed to set tbtt and dtim: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}