Commit a0cb7be4 authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

wl1271: Don't generate null func template for ad-hoc

The null func template is not needed for ad-hoc, and it's generation is not
supported for ad-hoc (mac80211 will WARN about it.)
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 14b228a0
...@@ -709,18 +709,30 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, ...@@ -709,18 +709,30 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
int wl1271_cmd_build_null_data(struct wl1271 *wl) int wl1271_cmd_build_null_data(struct wl1271 *wl)
{ {
struct sk_buff *skb; struct sk_buff *skb = NULL;
int ret = 0; int size;
void *ptr;
int ret = -ENOMEM;
skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, skb->data, if (wl->bss_type == BSS_TYPE_IBSS) {
skb->len); size = sizeof(struct wl12xx_null_data_template);
ptr = NULL;
} else {
skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;
size = skb->len;
ptr = skb->data;
}
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size);
out: out:
dev_kfree_skb(skb); dev_kfree_skb(skb);
if (ret)
wl1271_warning("cmd buld null data failed %d", ret);
return ret; return ret;
} }
......
...@@ -1619,12 +1619,10 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1619,12 +1619,10 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
*/ */
memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) { memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
ret = wl1271_cmd_build_null_data(wl); ret = wl1271_cmd_build_null_data(wl);
if (ret < 0) { if (ret < 0)
wl1271_warning("cmd buld null data failed %d",
ret);
goto out_sleep; goto out_sleep;
}
/* filter out all packets not from this BSSID */ /* filter out all packets not from this BSSID */
wl1271_configure_filters(wl, 0); wl1271_configure_filters(wl, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment