summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/init.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-08-16 10:52:47 (GMT)
committerLuciano Coelho <luca@coelho.fi>2012-09-27 09:13:53 (GMT)
commit001e39a8effd5a9774153ca6ca67849a93b95852 (patch)
treeac108b863deb0a3b6da887bbf31fb97262067ec0 /drivers/net/wireless/ti/wlcore/init.c
parent4137c17c8c88eca51a9e9d53c5eea0ea3d49940e (diff)
downloadlinux-fsl-qoriq-001e39a8effd5a9774153ca6ca67849a93b95852.tar.xz
wlcore: use dynamic keep-alive template ids
Currently, all the (station) roles use the same keep-alive template id (0). However, the klv template ids shouldn't be shared by different roles. Implement a simple klv_templates bitmap, and let each role allocate its own klv template id on role initialization. [Arik - remove invalidation of KLV template when getting into "idle". This is already handled in unjoin] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/init.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/init.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c
index a3c8677..32d157f 100644
--- a/drivers/net/wireless/ti/wlcore/init.c
+++ b/drivers/net/wireless/ti/wlcore/init.c
@@ -141,7 +141,7 @@ int wl1271_init_templates_config(struct wl1271 *wl)
if (ret < 0)
return ret;
- for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) {
+ for (i = 0; i < WLCORE_MAX_KLV_TEMPLATES; i++) {
ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
CMD_TEMPL_KLV, NULL,
sizeof(struct ieee80211_qos_hdr),
@@ -371,15 +371,7 @@ static int wl1271_sta_hw_init_post_mem(struct wl1271 *wl,
struct ieee80211_vif *vif)
{
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
- int ret, i;
-
- /* disable all keep-alive templates */
- for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) {
- ret = wl1271_acx_keep_alive_config(wl, wlvif, i,
- ACX_KEEP_ALIVE_TPL_INVALID);
- if (ret < 0)
- return ret;
- }
+ int ret;
/* disable the keep-alive feature */
ret = wl1271_acx_keep_alive_mode(wl, wlvif, false);