aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Karpenko <karpenko@fastmail.com>2020-02-04 08:05:41 (GMT)
committerJouni Malinen <j@w1.fi>2020-02-16 10:41:24 (GMT)
commit8de0ff0fa1decabfe990017c3ce9892bc5911b8d (patch)
tree4b5af44642cda91728a88880b67c9b55453eeef0
parentab8c55358e10ed1492bd37bee8f1c6898382fed6 (diff)
downloadhostap-8de0ff0fa1decabfe990017c3ce9892bc5911b8d.zip
hostap-8de0ff0fa1decabfe990017c3ce9892bc5911b8d.tar.gz
hostap-8de0ff0fa1decabfe990017c3ce9892bc5911b8d.tar.bz2
HE: Add TWT responder extended capabilities field
Set the proper bits inside the extended capabilities field to indicate support for TWT responder. Tested-by: John Crispin <john@phrozen.org> Signed-off-by: Mikhail Karpenko <karpenko@fastmail.com>
-rw-r--r--src/ap/ieee802_11_shared.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index a947bd9..4f7a970 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -377,6 +377,11 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)
wpa_key_mgmt_fils(hapd->conf->wpa_key_mgmt))
*pos |= 0x01;
#endif /* CONFIG_FILS */
+#ifdef CONFIG_IEEE80211AX
+ if (hapd->iconf->ieee80211ax &&
+ hostapd_get_he_twt_responder(hapd, IEEE80211_MODE_AP))
+ *pos |= 0x40; /* Bit 78 - TWT responder */
+#endif /* CONFIG_IEEE80211AX */
break;
case 10: /* Bits 80-87 */
#ifdef CONFIG_SAE
@@ -440,6 +445,11 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
!wpa_key_mgmt_fils(hapd->conf->wpa_key_mgmt)) && len < 10)
len = 10;
#endif /* CONFIG_FILS */
+#ifdef CONFIG_IEEE80211AX
+ if (len < 10 && hapd->iconf->ieee80211ax &&
+ hostapd_get_he_twt_responder(hapd, IEEE80211_MODE_AP))
+ len = 10;
+#endif /* CONFIG_IEEE80211AX */
#ifdef CONFIG_SAE
if (len < 11 && hapd->conf->wpa &&
wpa_key_mgmt_sae(hapd->conf->wpa_key_mgmt) &&