[amazon] Update to kernel 2.6.30
[openwrt.git] / package / hostapd / patches / 150-ht_cap_endian.patch
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)
6 {
7 + u16 cap;
8
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;
12 -
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;
18 - else
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);
24
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);
31 }
32 #endif /* CONFIG_IEEE80211N */
33
This page took 0.056772 seconds and 5 git commands to generate.