From ef04247ec3e413a8c923171e5960b04c2cb4001f Mon Sep 17 00:00:00 2001 From: Vidhya Govindan Date: Tue, 17 Nov 2009 18:49:08 +0200 Subject: [PATCH] --- yaml --- r: 171867 b: refs/heads/master c: d531cf303f765bf3477330e58fbeab75da668931 h: refs/heads/master i: 171865: 0220b747010a6086b0d7d92e218e888ecc2fffd3 171863: f4c878a7bc352f64555fe05ca7cbabad40102c8f v: v3 --- [refs] | 2 +- .../drivers/net/wireless/wl12xx/wl1251_acx.c | 28 +++++++++++++++++++ .../drivers/net/wireless/wl12xx/wl1251_acx.h | 18 ++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f5879d6ad96a..d7765f04a33f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2410378a4c8e978823354ab3e44cd07c3c18a237 +refs/heads/master: d531cf303f765bf3477330e58fbeab75da668931 diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c index 50633e043cfd..acfa086dbfc5 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.c @@ -948,3 +948,31 @@ int wl1251_acx_mem_cfg(struct wl1251 *wl) 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; +} diff --git a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.h b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.h index ce1c995e08d8..44a4b0494592 100644 --- a/trunk/drivers/net/wireless/wl12xx/wl1251_acx.h +++ b/trunk/drivers/net/wireless/wl12xx/wl1251_acx.h @@ -1149,6 +1149,23 @@ struct wl1251_acx_mem_map { u32 num_rx_mem_blocks; } __attribute__ ((packed)); + +struct wl1251_acx_wr_tbtt_and_dtim { + + struct acx_header header; + + /* Time in TUs between two consecutive beacons */ + u16 tbtt; + + /* + * DTIM period + * For BSS: Number of TBTTs in a DTIM period (range: 1-10) + * For IBSS: value shall be set to 1 + */ + u8 dtim; + u8 padding; +} __attribute__ ((packed)); + /************************************************************************* Host Interrupt Register (WiLink -> Host) @@ -1304,5 +1321,6 @@ int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats); int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime); int wl1251_acx_rate_policies(struct wl1251 *wl); int wl1251_acx_mem_cfg(struct wl1251 *wl); +int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim); #endif /* __WL1251_ACX_H__ */