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

wl1271: mask aid bits 14 and 15 in ps-poll template

In ps-poll template aid bits 14 and 15 were not masked as required by
the standard. Mask them so that aid is sent in correct format.

This patch is a direct port of the respective patch for the wl1251
driver by Kalle Valo.
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarVidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 37b70a81
...@@ -682,7 +682,10 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid) ...@@ -682,7 +682,10 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid)
memcpy(template.bssid, wl->bssid, ETH_ALEN); memcpy(template.bssid, wl->bssid, ETH_ALEN);
memcpy(template.ta, wl->mac_addr, ETH_ALEN); memcpy(template.ta, wl->mac_addr, ETH_ALEN);
template.aid = aid;
/* aid in PS-Poll has its two MSBs each set to 1 */
template.aid = cpu_to_le16(1 << 15 | 1 << 14 | aid);
template.fc = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL); template.fc = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL);
return wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, &template, return wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, &template,
......
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