[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
1dacd97b [MAC80211][WiFi6][Misc][Fix patch fail]
7c02334a [MAC80211][WiFi7][Misc][Fix build fail because of mt76 version upgradation]
7a073097 [MAC80211][WiFi7][misc][ensure the first MLD bss is bss[0]]
27e2304c [MAC80211][WiFi6][mt76][Refactor due to atenl change]
1e1eb98e [MAC80211][WiFi6/7][app][Add single wiphy support for atenl & iwpriv wrapper]
d4101c33 [MAC80211][WiFi7][mt76][enable lftp for wifi7 r1 cert]
55f5732f [MAC80211][WiFi7][hostapd][set ctrl_interface for all bss]
[Release-log]
Change-Id: I9cad01561c310576a9e5bdc9f1b8eec3025e51d9
diff --git a/recipes-wifi/hostapd/files/hostapd.uc b/recipes-wifi/hostapd/files/hostapd.uc
index 7e9fde4..48f12c5 100644
--- a/recipes-wifi/hostapd/files/hostapd.uc
+++ b/recipes-wifi/hostapd/files/hostapd.uc
@@ -730,6 +730,19 @@
}
f.close();
+ let first_mld_bss = 0;
+ for (first_mld_bss = 0; first_mld_bss < length(config.bss); first_mld_bss++) {
+ if (config.bss[first_mld_bss].mld_ap == 1)
+ break;
+ }
+
+ if (config.bss[0].mld_ap != 1 && first_mld_bss != length(config.bss)) {
+ let tmp_bss = config.bss[0];
+ config.bss[0] = config.bss[first_mld_bss];
+ config.bss[first_mld_bss] = tmp_bss;
+ hostapd.printf(`mtk: ucode: switch bss[${first_mld_bss}] to first`);
+ }
+
return config;
}