diff options
author | David Gnedt <david.gnedt@davizone.at> | 2011-01-30 20:10:57 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-03 16:42:44 -0500 |
commit | c3e334d29484423e78009790a3d3fa78da8b43a1 (patch) | |
tree | e7625921c13441f17962ba94acabc421d3da2ff6 /drivers/net/wireless/wl1251/acx.c | |
parent | bb4793b3c6370a1fed86978c6590241d770cb43e (diff) |
wl1251: enable beacon early termination while in power-saving mode
Port the beacon early termination feature from wl1251 driver version
included in the Maemo Fremantle kernel.
It is enabled when going to power-saving mode and disabled when leaving
power-saving mode.
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl1251/acx.c')
-rw-r--r-- | drivers/net/wireless/wl1251/acx.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl1251/acx.c b/drivers/net/wireless/wl1251/acx.c index 64a0214cfb2..8c943661f2d 100644 --- a/drivers/net/wireless/wl1251/acx.c +++ b/drivers/net/wireless/wl1251/acx.c @@ -978,6 +978,34 @@ out: return ret; } +int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode, + u8 max_consecutive) +{ + struct wl1251_acx_bet_enable *acx; + int ret; + + wl1251_debug(DEBUG_ACX, "acx bet enable"); + + acx = kzalloc(sizeof(*acx), GFP_KERNEL); + if (!acx) { + ret = -ENOMEM; + goto out; + } + + acx->enable = mode; + acx->max_consecutive = max_consecutive; + + ret = wl1251_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx)); + if (ret < 0) { + wl1251_warning("wl1251 acx bet enable failed: %d", ret); + goto out; + } + +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) { |