AP MLD: Update all partner links' beacons
Whenever there is a beacon update for any one of the affiliated link, all the other partner links' beacon should be refreshed. Signed-off-by: Sriram R <quic_srirrama@quicinc.com> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
This commit is contained in:
parent
a518810322
commit
4a1197acde
1 changed files with 15 additions and 8 deletions
|
@ -2663,7 +2663,7 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
|
||||||
struct hostapd_iface *iface = hapd->iface;
|
struct hostapd_iface *iface = hapd->iface;
|
||||||
int ret;
|
int ret;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
bool is_6g;
|
bool is_6g, hapd_mld = false;
|
||||||
|
|
||||||
ret = __ieee802_11_set_beacon(hapd);
|
ret = __ieee802_11_set_beacon(hapd);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
@ -2672,26 +2672,33 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
|
||||||
if (!iface->interfaces || iface->interfaces->count <= 1)
|
if (!iface->interfaces || iface->interfaces->count <= 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
hapd_mld = hapd->conf->mld_ap;
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
|
|
||||||
/* Update Beacon frames in case of 6 GHz colocation or AP MLD */
|
/* Update Beacon frames in case of 6 GHz colocation or AP MLD */
|
||||||
is_6g = is_6ghz_op_class(iface->conf->op_class);
|
is_6g = is_6ghz_op_class(iface->conf->op_class);
|
||||||
for (j = 0; j < iface->interfaces->count; j++) {
|
for (j = 0; j < iface->interfaces->count; j++) {
|
||||||
struct hostapd_iface *other;
|
struct hostapd_iface *other;
|
||||||
bool mld_ap = false;
|
bool other_iface_6g;
|
||||||
|
|
||||||
other = iface->interfaces->iface[j];
|
other = iface->interfaces->iface[j];
|
||||||
if (other == iface || !other || !other->conf)
|
if (other == iface || !other || !other->conf)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211BE
|
other_iface_6g = is_6ghz_op_class(other->conf->op_class);
|
||||||
if (hostapd_is_ml_partner(hapd, other->bss[0]))
|
|
||||||
mld_ap = true;
|
|
||||||
#endif /* CONFIG_IEEE80211BE */
|
|
||||||
|
|
||||||
if (is_6g == is_6ghz_op_class(other->conf->op_class) &&
|
if (is_6g == other_iface_6g && !hapd_mld)
|
||||||
!mld_ap)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (i = 0; i < other->num_bss; i++) {
|
for (i = 0; i < other->num_bss; i++) {
|
||||||
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
if (is_6g == other_iface_6g &&
|
||||||
|
!(hapd_mld && other->bss[i]->conf->mld_ap &&
|
||||||
|
hostapd_is_ml_partner(hapd, other->bss[i])))
|
||||||
|
continue;
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
|
|
||||||
if (other->bss[i] && other->bss[i]->started)
|
if (other->bss[i] && other->bss[i]->started)
|
||||||
__ieee802_11_set_beacon(other->bss[i]);
|
__ieee802_11_set_beacon(other->bss[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue