u16 status;
struct sta_info *sta;
int new_assoc = 1;
+#ifdef CONFIG_IEEE80211N
struct ht_cap_ie ht_cap;
+#endif /* CONFIG_IEEE80211N */
+ struct ht_cap_ie *ht_cap_ptr = NULL;
if (!ok) {
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
mlme_associate_indication(hapd, sta);
#ifdef CONFIG_IEEE80211N
- if (sta->flags & WLAN_STA_HT)
- hostapd_get_ht_capab(hapd, &sta->ht_capabilities, &ht_cap);
+ if (sta->flags & WLAN_STA_HT) {
+ ht_cap_ptr = &ht_cap;
+ hostapd_get_ht_capab(hapd, &sta->ht_capabilities, ht_cap_ptr);
+ }
#endif /* CONFIG_IEEE80211N */
#ifdef CONFIG_IEEE80211W
if (hostapd_sta_add(hapd->conf->iface, hapd, sta->addr, sta->aid,
sta->capability, sta->supported_rates,
sta->supported_rates_len, 0, sta->listen_interval,
- &ht_cap))
+ ht_cap_ptr))
{
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_NOTICE,