Rename HT 20/40 coex variable to be more descriptive

is_ht_allowed is a confusing name since this variable is used to track
whether 40 MHz channel bandwidth is allowed instead of whether HT is
allowed in general.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-03-30 12:58:41 +03:00 committed by Jouni Malinen
parent 1d0f42a073
commit df8191d0b8

View file

@ -209,7 +209,7 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
struct hostapd_iface *iface = hapd->iface; struct hostapd_iface *iface = hapd->iface;
struct ieee80211_2040_bss_coex_ie *bc_ie; struct ieee80211_2040_bss_coex_ie *bc_ie;
struct ieee80211_2040_intol_chan_report *ic_report; struct ieee80211_2040_intol_chan_report *ic_report;
int is_ht_allowed = 1; int is_ht40_allowed = 1;
int i; int i;
const u8 *start = (const u8 *) mgmt; const u8 *start = (const u8 *) mgmt;
const u8 *data = start + IEEE80211_HDRLEN + 2; const u8 *data = start + IEEE80211_HDRLEN + 2;
@ -242,7 +242,7 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
HOSTAPD_MODULE_IEEE80211, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG, HOSTAPD_LEVEL_DEBUG,
"20 MHz BSS width request bit is set in BSS coexistence information field"); "20 MHz BSS width request bit is set in BSS coexistence information field");
is_ht_allowed = 0; is_ht40_allowed = 0;
} }
if (bc_ie->coex_param & WLAN_20_40_BSS_COEX_40MHZ_INTOL) { if (bc_ie->coex_param & WLAN_20_40_BSS_COEX_40MHZ_INTOL) {
@ -250,7 +250,7 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
HOSTAPD_MODULE_IEEE80211, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG, HOSTAPD_LEVEL_DEBUG,
"40 MHz intolerant bit is set in BSS coexistence information field"); "40 MHz intolerant bit is set in BSS coexistence information field");
is_ht_allowed = 0; is_ht40_allowed = 0;
} }
if (start + len - data >= 3 && if (start + len - data >= 3 &&
@ -276,13 +276,13 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
HOSTAPD_LEVEL_DEBUG, HOSTAPD_LEVEL_DEBUG,
"20_40_INTOLERANT channel %d reported", "20_40_INTOLERANT channel %d reported",
chan); chan);
is_ht_allowed = 0; is_ht40_allowed = 0;
} }
} }
wpa_printf(MSG_DEBUG, "is_ht_allowed=%d num_sta_ht40_intolerant=%d", wpa_printf(MSG_DEBUG, "is_ht40_allowed=%d num_sta_ht40_intolerant=%d",
is_ht_allowed, iface->num_sta_ht40_intolerant); is_ht40_allowed, iface->num_sta_ht40_intolerant);
if (!is_ht_allowed && if (!is_ht40_allowed &&
(iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) { (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) {
if (iface->conf->secondary_channel) { if (iface->conf->secondary_channel) {
hostapd_logger(hapd, mgmt->sa, hostapd_logger(hapd, mgmt->sa,