Skip to content

Commit 3e3f060

Browse files
authored
Enable/disable 80211be based on mld_ap value (#358)
1 parent 04d6472 commit 3e3f060

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/linux/net/wifi/core/AccessPointControllerLinux.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,16 @@ AccessPointControllerLinux::SetMldAp(bool mldAp) noexcept
683683
return status;
684684
}
685685

686+
// Set the hostapd "ieee80211be" property.
687+
try {
688+
propertyValueToSet = mldAp ? Wpa::ProtocolHostapd::PropertyEnabled : Wpa::ProtocolHostapd::PropertyDisabled;
689+
m_hostapd.SetProperty(Wpa::ProtocolHostapd::PropertyNameIeee80211BE, propertyValueToSet, EnforceConfigurationChange::Now);
690+
} catch (const Wpa::HostapdException& ex) {
691+
status.Code = AccessPointOperationStatusCode::InternalError;
692+
status.Details = std::format("failed to set hostapd property '{}' to '{}' - {}", Wpa::ProtocolHostapd::PropertyNameIeee80211BE, propertyValueToSet, ex.what());
693+
return status;
694+
}
695+
686696
status.Code = AccessPointOperationStatusCode::Succeeded;
687697
return status;
688698
}

src/linux/net/wifi/wpa-controller/WpaCommandStatus.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ WpaStatusResponseParser::ParsePayload()
6969
ParseInt(value, status.Ieee80211ax);
7070
} else if (key == ProtocolHostapd::ResponseStatusPropertyKeyDisableAX) {
7171
ParseInt(value, status.Disable11ax);
72+
} else if (key == ProtocolHostapd::ResponseStatusPropertyKeyIeee80211BE) {
73+
ParseInt(value, status.Ieee80211be);
7274
} else if (key == ProtocolHostapd::PropertyNameBss) {
7375
enforceRequiredBssInfoSize(index.value() + 1);
7476
status.Bss[index.value()].Interface = value;

src/linux/net/wifi/wpa-controller/include/Wpa/ProtocolHostapd.hxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ struct HostapdStatus
476476
int Disable11n{ 0 };
477477
int Disable11ac{ 0 };
478478
int Disable11ax{ 0 };
479+
int Ieee80211be{ 0 };
479480
// int Ieee80211be{ 0 };
480481
// uint16_t BeaconInterval{ 0 };
481482
// int DtimPeriod{ 0 };
@@ -635,6 +636,7 @@ struct ProtocolHostapd :
635636
static constexpr auto PropertyNameDisable11AC = "disable_11ac";
636637
static constexpr auto PropertyNameIeee80211AX = "ieee80211ax";
637638
static constexpr auto PropertyNameDisable11AX = "disable_11ax";
639+
static constexpr auto PropertyNameIeee80211BE = "ieee80211be";
638640
static constexpr auto PropertyNameWmmEnabled = "wmm_enabled";
639641
static constexpr auto PropertyNameState = "state";
640642

@@ -702,6 +704,7 @@ struct ProtocolHostapd :
702704
static constexpr auto ResponseStatusPropertyKeyDisableAC = PropertyNameDisable11AC;
703705
static constexpr auto ResponseStatusPropertyKeyIeee80211AX = PropertyNameIeee80211AX;
704706
static constexpr auto ResponseStatusPropertyKeyDisableAX = PropertyNameDisable11AX;
707+
static constexpr auto ResponseStatusPropertyKeyIeee80211BE = PropertyNameIeee80211BE;
705708

706709
// Response properties for the "GET_CONFIG" command.
707710
// Note: all properties must be terminated with the key-value delimeter (=).

0 commit comments

Comments
 (0)