Fix non-HT STA addition
35463eaed3
broke non-HT STA add by trying
to se random HT capabilities to mac80211. Fix that by using NULL ht_cap
for non-HT case.
This commit is contained in:
parent
f72750896c
commit
37d8922e58
1 changed files with 8 additions and 3 deletions
|
@ -1562,7 +1562,10 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
||||||
u16 status;
|
u16 status;
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
int new_assoc = 1;
|
int new_assoc = 1;
|
||||||
|
#ifdef CONFIG_IEEE80211N
|
||||||
struct ht_cap_ie ht_cap;
|
struct ht_cap_ie ht_cap;
|
||||||
|
#endif /* CONFIG_IEEE80211N */
|
||||||
|
struct ht_cap_ie *ht_cap_ptr = NULL;
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
|
||||||
|
@ -1612,8 +1615,10 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
||||||
mlme_associate_indication(hapd, sta);
|
mlme_associate_indication(hapd, sta);
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211N
|
#ifdef CONFIG_IEEE80211N
|
||||||
if (sta->flags & WLAN_STA_HT)
|
if (sta->flags & WLAN_STA_HT) {
|
||||||
hostapd_get_ht_capab(hapd, &sta->ht_capabilities, &ht_cap);
|
ht_cap_ptr = &ht_cap;
|
||||||
|
hostapd_get_ht_capab(hapd, &sta->ht_capabilities, ht_cap_ptr);
|
||||||
|
}
|
||||||
#endif /* CONFIG_IEEE80211N */
|
#endif /* CONFIG_IEEE80211N */
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
|
@ -1623,7 +1628,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
||||||
if (hostapd_sta_add(hapd->conf->iface, hapd, sta->addr, sta->aid,
|
if (hostapd_sta_add(hapd->conf->iface, hapd, sta->addr, sta->aid,
|
||||||
sta->capability, sta->supported_rates,
|
sta->capability, sta->supported_rates,
|
||||||
sta->supported_rates_len, 0, sta->listen_interval,
|
sta->supported_rates_len, 0, sta->listen_interval,
|
||||||
&ht_cap))
|
ht_cap_ptr))
|
||||||
{
|
{
|
||||||
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
||||||
HOSTAPD_LEVEL_NOTICE,
|
HOSTAPD_LEVEL_NOTICE,
|
||||||
|
|
Loading…
Reference in a new issue