diff --git a/hostapd/sta_info.c b/hostapd/sta_info.c index 7992c84bb..a3589b8d9 100644 --- a/hostapd/sta_info.c +++ b/hostapd/sta_info.c @@ -288,12 +288,23 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx) sta->flags |= WLAN_STA_PENDING_POLL; #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)); - hdr.frame_control = - IEEE80211_FC(WLAN_FC_TYPE_DATA, WLAN_FC_STYPE_DATA); + if (hapd->driver && + 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); os_memcpy(hdr.IEEE80211_DA_FROMDS, sta->addr, ETH_ALEN); os_memcpy(hdr.IEEE80211_BSSID_FROMDS, hapd->own_addr,