pos = hostapd_eid_wpa(hapd, pos, epos - pos, sta);
/* Wi-Fi Wireless Multimedia Extensions */
- if (hapd->conf->wme_enabled)
- pos = hostapd_eid_wme(hapd, pos);
+ pos = hostapd_eid_wme(hapd, pos);
-#ifdef CONFIG_IEEE80211N
- if (hapd->conf->ieee80211n) {
- pos = hostapd_eid_ht_capabilities_info(hapd, pos);
- pos = hostapd_eid_ht_operation(hapd, pos);
- }
-#endif /* CONFIG_IEEE80211N */
+ pos = hostapd_eid_ht_capabilities_info(hapd, pos);
+ pos = hostapd_eid_ht_operation(hapd, pos);
if (hostapd_send_mgmt_frame(hapd, resp, pos - (u8 *) resp, 0) < 0)
perror("handle_probe_req: send");
tailpos, NULL);
/* Wi-Fi Wireless Multimedia Extensions */
- if (hapd->conf->wme_enabled)
- tailpos = hostapd_eid_wme(hapd, tailpos);
+ tailpos = hostapd_eid_wme(hapd, tailpos);
#ifdef CONFIG_IEEE80211N
- if (hapd->conf->ieee80211n) {
+ if (hapd->iconf->ieee80211n) {
u8 *start;
start = tailpos;
tailpos = hostapd_eid_ht_capabilities_info(hapd, tailpos);
conf->wme_ac_params[3] = ac_vo;
#ifdef CONFIG_IEEE80211N
- SET_2BIT_LE16(&bss->ht_capab,
+ SET_2BIT_LE16(&conf->ht_capab,
HT_CAP_INFO_MIMO_PWR_SAVE_OFFSET,
MIMO_PWR_NO_LIMIT_ON_MIMO_SEQS);
- bss->ht_capab |= HT_CAP_INFO_GREEN_FIELD;
+ conf->ht_capab |= HT_CAP_INFO_GREEN_FIELD;
#endif /* CONFIG_IEEE80211N */
return conf;
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_IEEE80211N
} else if (os_strcmp(buf, "ieee80211n") == 0) {
- bss->ieee80211n = atoi(pos);
+ conf->ieee80211n = atoi(pos);
#endif /* CONFIG_IEEE80211N */
} else if (os_strcmp(buf, "max_listen_interval") == 0) {
bss->max_listen_interval = atoi(pos);
}
-#ifdef CONFIG_IEEE80211N
-
u8 * hostapd_eid_ht_capabilities_info(struct hostapd_data *hapd, u8 *eid)
{
+#ifdef CONFIG_IEEE80211N
struct ieee80211_ht_capability *cap;
u8 *pos = eid;
- if (!hapd->conf->ieee80211n)
+ if (!hapd->iconf->ieee80211n)
return eid;
*pos++ = WLAN_EID_HT_CAP;
MAC_HT_PARAM_INFO_MAX_RX_AMPDU_FACTOR_OFFSET,
MAX_RX_AMPDU_FACTOR_64KB);
- cap->capabilities_info = host_to_le16(hapd->conf->ht_capab);
+ cap->capabilities_info = host_to_le16(hapd->iconf->ht_capab);
cap->supported_mcs_set[0] = 0xff;
cap->supported_mcs_set[1] = 0xff;
pos += sizeof(*cap);
return pos;
+#else /* CONFIG_IEEE80211N */
+ return eid;
+#endif /* CONFIG_IEEE80211N */
}
u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
{
+#ifdef CONFIG_IEEE80211N
struct ieee80211_ht_operation *oper;
u8 *pos = eid;
- if (!hapd->conf->ieee80211n)
+ if (!hapd->iconf->ieee80211n)
return eid;
*pos++ = WLAN_EID_HT_OPERATION;
pos += sizeof(*oper);
return pos;
+#else /* CONFIG_IEEE80211N */
+ return eid;
+#endif /* CONFIG_IEEE80211N */
}
+#ifdef CONFIG_IEEE80211N
+
/*
op_mode
Set to 0 (HT pure) under the followign conditions
{
u16 cur_op_mode, new_op_mode;
int op_mode_changes = 0;
- struct hostapd_data *hapd = iface->bss[0];
-
- /* TODO: should hapd pointer really be used here? This should most
- * likely be per radio, not per BSS.. */
- if (!hapd->conf->ieee80211n || hapd->conf->ht_op_mode_fixed)
+ if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed)
return 0;
wpa_printf(MSG_DEBUG, "%s current operation mode=0x%X",
if (iface->num_sta_no_ht ||
(iface->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT))
new_op_mode = OP_MODE_MIXED;
- else if ((hapd->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) &&
- iface->num_sta_ht_20mhz)
+ else if ((iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)
+ && iface->num_sta_ht_20mhz)
new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED;
else if (iface->olbc_ht)
new_op_mode = OP_MODE_MAY_BE_LEGACY_STAS;
}
} else {
hapd->iface->num_sta_no_ht++;
- if (hapd->conf->ieee80211n) {
+ if (hapd->iconf->ieee80211n) {
wpa_printf(MSG_DEBUG, "%s STA " MACSTR
" - no HT, num of non-HT stations %d",
__func__, MAC2STR(sta->addr),
if (sta->flags & WLAN_STA_WME)
p = hostapd_eid_wme(hapd, p);
-#ifdef CONFIG_IEEE80211N
- if (hapd->conf->ieee80211n) {
- p = hostapd_eid_ht_capabilities_info(hapd, p);
- p = hostapd_eid_ht_operation(hapd, p);
- }
-#endif /* CONFIG_IEEE80211N */
+ p = hostapd_eid_ht_capabilities_info(hapd, p);
+ p = hostapd_eid_ht_operation(hapd, p);
#ifdef CONFIG_IEEE80211R
if (resp == WLAN_STATUS_SUCCESS) {