wl12xx: remove TIM ie from probe response
wl12xx uses the beacon as the probe response template. However, the beacon includes a TIM ie, which shouldn't exist in the probe response. Delete it from the skb before configuring the probe response template. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
06b660e1a3
commit
d48055d9fc
@ -3069,6 +3069,20 @@ static int wl1271_ssid_set(struct wl1271 *wl, struct sk_buff *skb,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void wl12xx_remove_ie(struct sk_buff *skb, u8 eid, int ieoffset)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
const u8 *next, *end = skb->data + skb->len;
|
||||||
|
u8 *ie = (u8 *)cfg80211_find_ie(eid, skb->data + ieoffset,
|
||||||
|
skb->len - ieoffset);
|
||||||
|
if (!ie)
|
||||||
|
return;
|
||||||
|
len = ie[1] + 2;
|
||||||
|
next = ie + len;
|
||||||
|
memmove(ie, next, end - next);
|
||||||
|
skb_trim(skb, skb->len - len);
|
||||||
|
}
|
||||||
|
|
||||||
static int wl1271_bss_erp_info_changed(struct wl1271 *wl,
|
static int wl1271_bss_erp_info_changed(struct wl1271 *wl,
|
||||||
struct ieee80211_bss_conf *bss_conf,
|
struct ieee80211_bss_conf *bss_conf,
|
||||||
u32 changed)
|
u32 changed)
|
||||||
@ -3151,6 +3165,9 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* remove TIM ie from probe response */
|
||||||
|
wl12xx_remove_ie(beacon, WLAN_EID_TIM, ieoffset);
|
||||||
|
|
||||||
hdr = (struct ieee80211_hdr *) beacon->data;
|
hdr = (struct ieee80211_hdr *) beacon->data;
|
||||||
hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
|
hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
|
||||||
IEEE80211_STYPE_PROBE_RESP);
|
IEEE80211_STYPE_PROBE_RESP);
|
||||||
|
Loading…
Reference in New Issue
Block a user