path: root/src/ap/ieee802_11_ht.c
diff options
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-02-21 15:27:16 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-21 15:27:16 (GMT)
commitf39b07d7ed777a422af5403f68aeb5f1e180e4e8 (patch)
tree4e693631e1b7761724f608d919b07f140ca459c2 /src/ap/ieee802_11_ht.c
parent16a83d29650b88c569c4ff7ad07a0b030a299257 (diff)
hostapd: Allow coexistance of HT BSSes with WEP/TKIP BSSes
In multi BSS setups it wasn't possible to set up an HT BSS in conjunction with a WEP/TKIP BSS. HT needed to be turned off entirely to allow WEP/TKIP BSSes to be used. In order to allow HT BSSes to coexist with non-HT WEP/TKIP BSSes add a new BSS conf attribute "disable_11n" which disables HT capabilities on a single BSS by suppressing HT IEs in the beacon and probe response frames. Furthermore, mark all STAs associated to a WEP/TKIP BSS as non-HT STAs. The disable_11n parameter is used internally; no new entry is parsed from hostapd.conf. This allows a non-HT WEP/TKIP BSS to coexist with a HT BSS without having to disable HT mode entirely. Nevertheless, all STAs associated to the WEP/TKIP BSS will only be served as if they were non-HT STAs. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Diffstat (limited to 'src/ap/ieee802_11_ht.c')
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 7541b83..acb85fe 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -30,7 +30,8 @@ u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid)
struct ieee80211_ht_capabilities *cap;
u8 *pos = eid;
- if (!hapd->iconf->ieee80211n || !hapd->iface->current_mode)
+ if (!hapd->iconf->ieee80211n || !hapd->iface->current_mode ||
+ hapd->conf->disable_11n)
return eid;
*pos++ = WLAN_EID_HT_CAP;
@@ -58,7 +59,7 @@ u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
struct ieee80211_ht_operation *oper;
u8 *pos = eid;
- if (!hapd->iconf->ieee80211n)
+ if (!hapd->iconf->ieee80211n || hapd->conf->disable_11n)
return eid;
@@ -160,11 +161,13 @@ int hostapd_ht_operation_update(struct hostapd_iface *iface)
-u16 copy_sta_ht_capab(struct sta_info *sta, const u8 *ht_capab,
- size_t ht_capab_len)
+u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
+ const u8 *ht_capab, size_t ht_capab_len)
+ /* Disable HT caps for STAs associated to no-HT BSSes. */
if (!ht_capab ||
- ht_capab_len < sizeof(struct ieee80211_ht_capabilities)) {
+ ht_capab_len < sizeof(struct ieee80211_ht_capabilities) ||
+ hapd->conf->disable_11n) {
sta->flags &= ~WLAN_STA_HT;
sta->ht_capabilities = NULL;