1 --- a/hostapd/ieee802_11.c
2 +++ b/hostapd/ieee802_11.c
3 @@ -1586,24 +1586,16 @@ hostapd_get_ht_capab(struct hostapd_data
4 struct ht_cap_ie *ht_cap_ie,
5 struct ht_cap_ie *neg_ht_cap_ie)
9 os_memcpy(neg_ht_cap_ie, ht_cap_ie, sizeof(struct ht_cap_ie));
10 - neg_ht_cap_ie->data.capabilities_info =
11 - ht_cap_ie->data.capabilities_info & hapd->iconf->ht_capab;
13 - neg_ht_cap_ie->data.capabilities_info &= ~HT_CAP_INFO_SMPS_DISABLED;
14 - if ((ht_cap_ie->data.capabilities_info & HT_CAP_INFO_SMPS_DISABLED) ==
15 - (hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED))
16 - neg_ht_cap_ie->data.capabilities_info |=
17 - hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED;
19 - neg_ht_cap_ie->data.capabilities_info |=
20 - HT_CAP_INFO_SMPS_DISABLED;
21 + cap = le_to_host16(neg_ht_cap_ie->data.capabilities_info);
22 + cap &= hapd->iconf->ht_capab;
23 + cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_SMPS_DISABLED);
25 /* FIXME: Rx STBC needs to be handled specially */
26 - neg_ht_cap_ie->data.capabilities_info &= ~HT_CAP_INFO_RX_STBC_MASK;
27 - neg_ht_cap_ie->data.capabilities_info |=
28 - hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK;
29 + cap |= (hapd->iconf->ht_capab & HT_CAP_INFO_RX_STBC_MASK);
30 + neg_ht_cap_ie->data.capabilities_info = host_to_le16(cap);
32 #endif /* CONFIG_IEEE80211N */