diff --git a/hostapd/config_file.c b/hostapd/config_file.c index e05c81366..9bc1dc775 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3511,6 +3511,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->he_op.he_default_pe_duration = atoi(pos); } else if (os_strcmp(buf, "he_twt_required") == 0) { conf->he_op.he_twt_required = atoi(pos); + } else if (os_strcmp(buf, "he_twt_responder") == 0) { + conf->he_op.he_twt_responder = atoi(pos); } else if (os_strcmp(buf, "he_rts_threshold") == 0) { conf->he_op.he_rts_threshold = atoi(pos); } else if (os_strcmp(buf, "he_basic_mcs_nss_set") == 0) { diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index a89ce9b36..b5d15061f 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -831,6 +831,11 @@ wmm_ac_vo_acm=0 # 1 = required #he_twt_required=0 +#he_twt_responder: Whether TWT (HE) responder is enabled +# 0 = disabled +# 1 = enabled if supported by the driver (default) +#he_twt_responder=1 + #he_rts_threshold: Duration of STA transmission # 0 = not set (default) # unsigned integer = duration in units of 16 us diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 7b6249bbe..7b6d54c35 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -274,6 +274,7 @@ struct hostapd_config * hostapd_config_defaults(void) conf->he_op.he_bss_color_disabled = 1; conf->he_op.he_bss_color_partial = 0; conf->he_op.he_bss_color = 1; + conf->he_op.he_twt_responder = 1; conf->he_6ghz_max_mpdu = 2; conf->he_6ghz_max_ampdu_len_exp = 7; conf->he_6ghz_rx_ant_pat = 1; diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 95bd79873..ced36f9cc 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -914,6 +914,7 @@ struct he_operation { u8 he_bss_color_partial; u8 he_default_pe_duration; u8 he_twt_required; + u8 he_twt_responder; u16 he_rts_threshold; u16 he_basic_mcs_nss_set; }; diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 8ff383594..cbe5e6395 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -514,5 +514,6 @@ int hostapd_get_he_twt_responder(struct hostapd_data *hapd, mac_cap = hapd->iface->current_mode->he_capab[mode].mac_cap; - return !!(mac_cap[HE_MAC_CAPAB_0] & HE_MACCAP_TWT_RESPONDER); + return !!(mac_cap[HE_MAC_CAPAB_0] & HE_MACCAP_TWT_RESPONDER) && + hapd->iface->conf->he_op.he_twt_responder; }