Use Data::Data only with Host AP driver; mac80211 can use Data::Nullfunc
The inactivity poll was originally supposed to use Data::Nullfunc, but due to Prism2/2.5/3 firmware issues, this was changed to an empty Data::Data frame. mac80211 does not have such an issue, so change the inactivity poll frame to be Data::Nullfunc by default and use the Data::Data workaround only with Host AP driver.
This commit is contained in:
parent
f01a6b1e3e
commit
1e14526571
1 changed files with 16 additions and 5 deletions
|
@ -288,12 +288,23 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
|
||||||
sta->flags |= WLAN_STA_PENDING_POLL;
|
sta->flags |= WLAN_STA_PENDING_POLL;
|
||||||
|
|
||||||
#ifndef CONFIG_NATIVE_WINDOWS
|
#ifndef CONFIG_NATIVE_WINDOWS
|
||||||
/* FIX: WLAN_FC_STYPE_NULLFUNC would be more appropriate, but
|
|
||||||
* it is apparently not retried so TX Exc events are not
|
|
||||||
* received for it */
|
|
||||||
os_memset(&hdr, 0, sizeof(hdr));
|
os_memset(&hdr, 0, sizeof(hdr));
|
||||||
hdr.frame_control =
|
if (hapd->driver &&
|
||||||
IEEE80211_FC(WLAN_FC_TYPE_DATA, WLAN_FC_STYPE_DATA);
|
os_strcmp(hapd->driver->name, "hostap") == 0) {
|
||||||
|
/*
|
||||||
|
* WLAN_FC_STYPE_NULLFUNC would be more appropriate,
|
||||||
|
* but it is apparently not retried so TX Exc events
|
||||||
|
* are not received for it.
|
||||||
|
*/
|
||||||
|
hdr.frame_control =
|
||||||
|
IEEE80211_FC(WLAN_FC_TYPE_DATA,
|
||||||
|
WLAN_FC_STYPE_DATA);
|
||||||
|
} else {
|
||||||
|
hdr.frame_control =
|
||||||
|
IEEE80211_FC(WLAN_FC_TYPE_DATA,
|
||||||
|
WLAN_FC_STYPE_NULLFUNC);
|
||||||
|
}
|
||||||
|
|
||||||
hdr.frame_control |= host_to_le16(WLAN_FC_FROMDS);
|
hdr.frame_control |= host_to_le16(WLAN_FC_FROMDS);
|
||||||
os_memcpy(hdr.IEEE80211_DA_FROMDS, sta->addr, ETH_ALEN);
|
os_memcpy(hdr.IEEE80211_DA_FROMDS, sta->addr, ETH_ALEN);
|
||||||
os_memcpy(hdr.IEEE80211_BSSID_FROMDS, hapd->own_addr,
|
os_memcpy(hdr.IEEE80211_BSSID_FROMDS, hapd->own_addr,
|
||||||
|
|
Loading…
Reference in a new issue