[rdkb][common][bsp][Refactor and sync wifi from openwrt]

[Description]
3a2eef0b [MAC80211][Release][Update release note for Filogic 880/860 MLO Beta release]
cfbd2411 [MAC80211][Release][Filogic 880/860 MLO Beta release]
6c180e3f [MAC80211][WiFi7][misc][Add Eagle BE14000 efem default bin]
a55f34db [MAC80211][Release][Prepare for Filogic 880/860 release]
5b45ebca [MAC80211][WiFi7][hostapd][Add puncture bitmap to ucode]
95bbea73 [MAC80211][WiFi6][mt76][Add PID to only report data-frame TX rate]
b15ced26 [MAC80211][WiFi6][hostapd][Fix DFS channel selection issue]
d59133cb [MAC80211][WiFi6][mt76][Fix pse info not correct information]
3921b4b2 [MAC80211][WiFi6][mt76][Fix incomplete QoS-map setting to FW]
4e7690c7 [MAC80211][WiFi6/7][app][Change ATECHANNEL mapping cmd]
eb37af90 [MAC80211][WiFi7][app][Add support for per-packet bw & primary selection]
0ea82adf [MAC80211][WiFi6][core][Fix DFS CAC issue after CSA]

[Release-log]

Change-Id: I9bec97ec1b2e1c49ed43a812a07a5b21fcbb70a6
diff --git a/recipes-wifi/iw/patches-mlo/0001-iw-refactor-frequency-help.patch b/recipes-wifi/iw/patches-mlo/0001-iw-refactor-frequency-help.patch
index d88718b..1b34f78 100644
--- a/recipes-wifi/iw/patches-mlo/0001-iw-refactor-frequency-help.patch
+++ b/recipes-wifi/iw/patches-mlo/0001-iw-refactor-frequency-help.patch
@@ -1,7 +1,7 @@
 From cce989770bf3375bbe4398a5ce80d9a9718460a3 Mon Sep 17 00:00:00 2001
 From: Johannes Berg <johannes.berg@intel.com>
 Date: Fri, 17 May 2024 12:04:06 +0200
-Subject: [PATCH 01/10] iw: refactor frequency help
+Subject: [PATCH 01/13] iw: refactor frequency help
 
 The channel parsing is the same in most places, refactor
 the help strings for that to not duplicate them in all
diff --git a/recipes-wifi/iw/patches-mlo/0002-iw-add-puncturing-support.patch b/recipes-wifi/iw/patches-mlo/0002-iw-add-puncturing-support.patch
index 2ebc109..edfa28e 100644
--- a/recipes-wifi/iw/patches-mlo/0002-iw-add-puncturing-support.patch
+++ b/recipes-wifi/iw/patches-mlo/0002-iw-add-puncturing-support.patch
@@ -1,7 +1,7 @@
 From b29da202bdcbdc75cd75db37175261fb22d1e13b Mon Sep 17 00:00:00 2001
 From: Johannes Berg <johannes.berg@intel.com>
 Date: Fri, 17 May 2024 12:12:10 +0200
-Subject: [PATCH 02/10] iw: add puncturing support
+Subject: [PATCH 02/13] iw: add puncturing support
 
 Parse and pass the puncturing bitmap to the kernel in any
 chandef (except S1G), the kernel will check validity.
diff --git a/recipes-wifi/iw/patches-mlo/0003-util-clarify-comment-about-parsed-pointer.patch b/recipes-wifi/iw/patches-mlo/0003-util-clarify-comment-about-parsed-pointer.patch
index 9ac1723..4d1b745 100644
--- a/recipes-wifi/iw/patches-mlo/0003-util-clarify-comment-about-parsed-pointer.patch
+++ b/recipes-wifi/iw/patches-mlo/0003-util-clarify-comment-about-parsed-pointer.patch
@@ -1,7 +1,7 @@
 From c8b9e772aee35e1db245ec6baa7bce1c7b4110ff Mon Sep 17 00:00:00 2001
 From: Johannes Berg <johannes.berg@intel.com>
 Date: Fri, 17 May 2024 13:19:47 +0200
-Subject: [PATCH 03/10] util: clarify comment about 'parsed' pointer
+Subject: [PATCH 03/13] util: clarify comment about 'parsed' pointer
 
 It took me a while to understand this (again?), so
 clarify the comment here.
diff --git a/recipes-wifi/iw/patches-mlo/0004-iw-remove-sizer-section-and-related-code.patch b/recipes-wifi/iw/patches-mlo/0004-iw-remove-sizer-section-and-related-code.patch
index 909a357..58458e8 100644
--- a/recipes-wifi/iw/patches-mlo/0004-iw-remove-sizer-section-and-related-code.patch
+++ b/recipes-wifi/iw/patches-mlo/0004-iw-remove-sizer-section-and-related-code.patch
@@ -1,7 +1,7 @@
 From 8609336b71a8ae37238dc3f4ddff251a4698a4fc Mon Sep 17 00:00:00 2001
 From: Benjamin Berg <benjamin.berg@intel.com>
 Date: Fri, 3 May 2024 13:12:06 +0200
-Subject: [PATCH 04/10] iw: remove sizer section and related code
+Subject: [PATCH 04/13] iw: remove sizer section and related code
 
 With commit 338059ace9d0 ("iw: change __cmd section scheme to fit
 gcc/clang"), the __cmd section only includes pointers to struct cmd
diff --git a/recipes-wifi/iw/patches-mlo/0005-iw-fix-formats-under-MIPS64-PPC.patch b/recipes-wifi/iw/patches-mlo/0005-iw-fix-formats-under-MIPS64-PPC.patch
new file mode 100644
index 0000000..3a4e611
--- /dev/null
+++ b/recipes-wifi/iw/patches-mlo/0005-iw-fix-formats-under-MIPS64-PPC.patch
@@ -0,0 +1,30 @@
+From ae9f84f0225d8499b43c33ffbc590120f4c9e82e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 2 Jul 2024 12:35:44 -0700
+Subject: [PATCH 05/13] iw: fix formats under MIPS64/PPC
+
+__SANE_USERSPACE_TYPES__ needs to be defined to get consistent 64-bit
+type defines and to fix -Wformat warnings.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Link: https://lore.kernel.org/r/20240702193544.5984-1-rosenp@gmail.com
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index 17be33f..2652fac 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,6 +17,7 @@ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall -Wextra -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
+ CFLAGS += -Werror-implicit-function-declaration -Wsign-compare -Wno-unused-parameter
+ CFLAGS += -Wdeclaration-after-statement
++CFLAGS += -D__SANE_USERSPACE_TYPES__
+ CFLAGS += $(CFLAGS_EVAL)
+ CFLAGS += $(EXTRA_CFLAGS)
+ 
+-- 
+2.18.0
+
diff --git a/recipes-wifi/iw/patches-mlo/0006-update-nl80211.h.patch b/recipes-wifi/iw/patches-mlo/0006-update-nl80211.h.patch
new file mode 100644
index 0000000..2c924ac
--- /dev/null
+++ b/recipes-wifi/iw/patches-mlo/0006-update-nl80211.h.patch
@@ -0,0 +1,574 @@
+From b49a539e13572f6ab61834d307d5f9e84c03c929 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Wed, 3 Jul 2024 10:37:44 +0200
+Subject: [PATCH 06/13] update nl80211.h
+
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+---
+ nl80211.h | 242 +++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 130 insertions(+), 112 deletions(-)
+
+diff --git a/nl80211.h b/nl80211.h
+index f23ecbd..6ae3997 100644
+--- a/nl80211.h
++++ b/nl80211.h
+@@ -413,8 +413,8 @@
+  *	are like for %NL80211_CMD_SET_BEACON, and additionally parameters that
+  *	do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL,
+  *	%NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID,
+- *	%NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
+- *	%NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
++ *	%NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHER_SUITES_PAIRWISE,
++ *	%NL80211_ATTR_CIPHER_SUITE_GROUP, %NL80211_ATTR_WPA_VERSIONS,
+  *	%NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
+  *	%NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
+  *	%NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
+@@ -442,20 +442,15 @@
+  *	stations connected and using at least that link as one of its links.
+  *
+  * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to
+- * 	destination %NL80211_ATTR_MAC on the interface identified by
+- * 	%NL80211_ATTR_IFINDEX.
++ *	destination %NL80211_ATTR_MAC on the interface identified by
++ *	%NL80211_ATTR_IFINDEX.
+  * @NL80211_CMD_SET_MPATH:  Set mesh path attributes for mesh path to
+- * 	destination %NL80211_ATTR_MAC on the interface identified by
+- * 	%NL80211_ATTR_IFINDEX.
++ *	destination %NL80211_ATTR_MAC on the interface identified by
++ *	%NL80211_ATTR_IFINDEX.
+  * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by
+  *	%NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP.
+  * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
+  *	%NL80211_ATTR_MAC.
+- * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
+- *	interface identified by %NL80211_ATTR_IFINDEX.
+- * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
+- *	or, if no MAC address given, all mesh paths, on the interface identified
+- *	by %NL80211_ATTR_IFINDEX.
+  * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by
+  *	%NL80211_ATTR_IFINDEX.
+  *
+@@ -476,15 +471,15 @@
+  *	after being queried by the kernel. CRDA replies by sending a regulatory
+  *	domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our
+  *	current alpha2 if it found a match. It also provides
+- * 	NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each
+- * 	regulatory rule is a nested set of attributes  given by
+- * 	%NL80211_ATTR_REG_RULE_FREQ_[START|END] and
+- * 	%NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by
+- * 	%NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and
+- * 	%NL80211_ATTR_REG_RULE_POWER_MAX_EIRP.
++ *	NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each
++ *	regulatory rule is a nested set of attributes  given by
++ *	%NL80211_ATTR_REG_RULE_FREQ_[START|END] and
++ *	%NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by
++ *	%NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and
++ *	%NL80211_ATTR_REG_RULE_POWER_MAX_EIRP.
+  * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain
+- * 	to the specified ISO/IEC 3166-1 alpha2 country code. The core will
+- * 	store this as a valid request and then query userspace for it.
++ *	to the specified ISO/IEC 3166-1 alpha2 country code. The core will
++ *	store this as a valid request and then query userspace for it.
+  *
+  * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the
+  *	interface identified by %NL80211_ATTR_IFINDEX
+@@ -574,31 +569,31 @@
+  * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries.
+  *
+  * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
+- * 	has been changed and provides details of the request information
+- * 	that caused the change such as who initiated the regulatory request
+- * 	(%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
+- * 	(%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
+- * 	the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
+- * 	%NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
+- * 	set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
+- * 	%NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
+- * 	to (%NL80211_ATTR_REG_ALPHA2).
++ *	has been changed and provides details of the request information
++ *	that caused the change such as who initiated the regulatory request
++ *	(%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
++ *	(%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
++ *	the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
++ *	%NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
++ *	set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
++ *	%NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
++ *	to (%NL80211_ATTR_REG_ALPHA2).
+  * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon
+- * 	has been found while world roaming thus enabling active scan or
+- * 	any mode of operation that initiates TX (beacons) on a channel
+- * 	where we would not have been able to do either before. As an example
+- * 	if you are world roaming (regulatory domain set to world or if your
+- * 	driver is using a custom world roaming regulatory domain) and while
+- * 	doing a passive scan on the 5 GHz band you find an AP there (if not
+- * 	on a DFS channel) you will now be able to actively scan for that AP
+- * 	or use AP mode on your card on that same channel. Note that this will
+- * 	never be used for channels 1-11 on the 2 GHz band as they are always
+- * 	enabled world wide. This beacon hint is only sent if your device had
+- * 	either disabled active scanning or beaconing on a channel. We send to
+- * 	userspace the wiphy on which we removed a restriction from
+- * 	(%NL80211_ATTR_WIPHY) and the channel on which this occurred
+- * 	before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER)
+- * 	the beacon hint was processed.
++ *	has been found while world roaming thus enabling active scan or
++ *	any mode of operation that initiates TX (beacons) on a channel
++ *	where we would not have been able to do either before. As an example
++ *	if you are world roaming (regulatory domain set to world or if your
++ *	driver is using a custom world roaming regulatory domain) and while
++ *	doing a passive scan on the 5 GHz band you find an AP there (if not
++ *	on a DFS channel) you will now be able to actively scan for that AP
++ *	or use AP mode on your card on that same channel. Note that this will
++ *	never be used for channels 1-11 on the 2 GHz band as they are always
++ *	enabled world wide. This beacon hint is only sent if your device had
++ *	either disabled active scanning or beaconing on a channel. We send to
++ *	userspace the wiphy on which we removed a restriction from
++ *	(%NL80211_ATTR_WIPHY) and the channel on which this occurred
++ *	before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER)
++ *	the beacon hint was processed.
+  *
+  * @NL80211_CMD_AUTHENTICATE: authentication request and notification.
+  *	This command is used both as a command (request to authenticate) and
+@@ -1120,7 +1115,7 @@
+  *	current configuration is not changed.  If it is present but
+  *	set to zero, the configuration is changed to don't-care
+  *	(i.e. the device can decide what to do).
+- * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported.
++ * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.
+  *	This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
+  *	%NL80211_ATTR_COOKIE.
+  *
+@@ -1715,21 +1710,21 @@ enum nl80211_commands {
+  *	(see &enum nl80211_plink_action).
+  * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
+  * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
+- * 	info given for %NL80211_CMD_GET_MPATH, nested attribute described at
++ *	info given for %NL80211_CMD_GET_MPATH, nested attribute described at
+  *	&enum nl80211_mpath_info.
+  *
+  * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of
+  *      &enum nl80211_mntr_flags.
+  *
+  * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the
+- * 	current regulatory domain should be set to or is already set to.
+- * 	For example, 'CR', for Costa Rica. This attribute is used by the kernel
+- * 	to query the CRDA to retrieve one regulatory domain. This attribute can
+- * 	also be used by userspace to query the kernel for the currently set
+- * 	regulatory domain. We chose an alpha2 as that is also used by the
+- * 	IEEE-802.11 country information element to identify a country.
+- * 	Users can also simply ask the wireless core to set regulatory domain
+- * 	to a specific alpha2.
++ *	current regulatory domain should be set to or is already set to.
++ *	For example, 'CR', for Costa Rica. This attribute is used by the kernel
++ *	to query the CRDA to retrieve one regulatory domain. This attribute can
++ *	also be used by userspace to query the kernel for the currently set
++ *	regulatory domain. We chose an alpha2 as that is also used by the
++ *	IEEE-802.11 country information element to identify a country.
++ *	Users can also simply ask the wireless core to set regulatory domain
++ *	to a specific alpha2.
+  * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory
+  *	rules.
+  *
+@@ -1772,9 +1767,9 @@ enum nl80211_commands {
+  * @NL80211_ATTR_BSS: scan result BSS
+  *
+  * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
+- * 	currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
++ *	currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
+  * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
+- * 	set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
++ *	set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
+  *
+  * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies
+  *	an array of command numbers (i.e. a mapping index to command number)
+@@ -1793,15 +1788,15 @@ enum nl80211_commands {
+  *	a u32
+  *
+  * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change
+- * 	due to considerations from a beacon hint. This attribute reflects
+- * 	the state of the channel _before_ the beacon hint processing. This
+- * 	attributes consists of a nested attribute containing
+- * 	NL80211_FREQUENCY_ATTR_*
++ *	due to considerations from a beacon hint. This attribute reflects
++ *	the state of the channel _before_ the beacon hint processing. This
++ *	attributes consists of a nested attribute containing
++ *	NL80211_FREQUENCY_ATTR_*
+  * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change
+- * 	due to considerations from a beacon hint. This attribute reflects
+- * 	the state of the channel _after_ the beacon hint processing. This
+- * 	attributes consists of a nested attribute containing
+- * 	NL80211_FREQUENCY_ATTR_*
++ *	due to considerations from a beacon hint. This attribute reflects
++ *	the state of the channel _after_ the beacon hint processing. This
++ *	attributes consists of a nested attribute containing
++ *	NL80211_FREQUENCY_ATTR_*
+  *
+  * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported
+  *	cipher suites
+@@ -1862,12 +1857,6 @@ enum nl80211_commands {
+  *	that protected APs should be used. This is also used with NEW_BEACON to
+  *	indicate that the BSS is to use protection.
+  *
+- * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON
+- *	to indicate which unicast key ciphers will be used with the connection
+- *	(an array of u32).
+- * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
+- *	indicate which group key cipher will be used with the connection (a
+- *	u32).
+  * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
+  *	indicate which WPA version(s) the AP we want to associate with is using
+  *	(a u32 with flags from &enum nl80211_wpa_versions).
+@@ -1898,6 +1887,7 @@ enum nl80211_commands {
+  *	with %NL80211_KEY_* sub-attributes
+  *
+  * @NL80211_ATTR_PID: Process ID of a network namespace.
++ * @NL80211_ATTR_NETNS_FD: File descriptor of a network namespace.
+  *
+  * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for
+  *	dumps. This number increases whenever the object list being
+@@ -1952,6 +1942,7 @@ enum nl80211_commands {
+  *
+  * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
+  *	acknowledged by the recipient.
++ * @NL80211_ATTR_ACK_SIGNAL: Station's ack signal strength (s32)
+  *
+  * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values.
+  *
+@@ -2149,6 +2140,9 @@ enum nl80211_commands {
+  * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
+  *      this feature during association. This is a flag attribute.
+  *	Currently only supported in mac80211 drivers.
++ * @NL80211_ATTR_DISABLE_EHT: Force EHT capable interfaces to disable
++ *      this feature during association. This is a flag attribute.
++ *	Currently only supported in mac80211 drivers.
+  * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
+  *      ATTR_HT_CAPABILITY to which attention should be paid.
+  *      Currently, only mac80211 NICs support this feature.
+@@ -2158,6 +2152,12 @@ enum nl80211_commands {
+  *      All values are treated as suggestions and may be ignored
+  *      by the driver as required.  The actual values may be seen in
+  *      the station debugfs ht_caps file.
++ * @NL80211_ATTR_VHT_CAPABILITY_MASK: Specify which bits of the
++ *      ATTR_VHT_CAPABILITY to which attention should be paid.
++ *      Currently, only mac80211 NICs support this feature.
++ *      All values are treated as suggestions and may be ignored
++ *      by the driver as required.  The actual values may be seen in
++ *      the station debugfs vht_caps file.
+  *
+  * @NL80211_ATTR_DFS_REGION: region for regulatory rules which this country
+  *    abides to when initiating radiation on DFS channels. A country maps
+@@ -2416,7 +2416,7 @@ enum nl80211_commands {
+  *	scheduled scan is started.  Or the delay before a WoWLAN
+  *	net-detect scan is started, counting from the moment the
+  *	system is suspended.  This value is a u32, in seconds.
+-
++ *
+  * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device
+  *      is operating in an indoor environment.
+  *
+@@ -3565,7 +3565,7 @@ enum nl80211_sta_flags {
+  * enum nl80211_sta_p2p_ps_status - station support of P2P PS
+  *
+  * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism
+- * @@NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism
++ * @NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism
+  * @NUM_NL80211_P2P_PS_STATUS: number of values
+  */
+ enum nl80211_sta_p2p_ps_status {
+@@ -3603,9 +3603,9 @@ enum nl80211_he_gi {
+ 
+ /**
+  * enum nl80211_he_ltf - HE long training field
+- * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec
+- * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec
+- * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec
++ * @NL80211_RATE_INFO_HE_1XLTF: 3.2 usec
++ * @NL80211_RATE_INFO_HE_2XLTF: 6.4 usec
++ * @NL80211_RATE_INFO_HE_4XLTF: 12.8 usec
+  */
+ enum nl80211_he_ltf {
+ 	NL80211_RATE_INFO_HE_1XLTF,
+@@ -3720,7 +3720,7 @@ enum nl80211_eht_ru_alloc {
+  * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier
+  *	(u8, see &enum nl80211_he_gi)
+  * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
+- * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
++ * @NL80211_RATE_INFO_HE_RU_ALLOC: HE RU allocation, if not present then
+  *	non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
+  * @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate
+  * @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15)
+@@ -3823,7 +3823,7 @@ enum nl80211_sta_bss_param {
+  *	(u64, to this station)
+  * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
+  * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
+- * 	containing info as possible, see &enum nl80211_rate_info
++ *	containing info as possible, see &enum nl80211_rate_info
+  * @NL80211_STA_INFO_RX_PACKETS: total received packet (MSDUs and MMPDUs)
+  *	(u32, from this station)
+  * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (MSDUs and MMPDUs)
+@@ -3852,8 +3852,8 @@ enum nl80211_sta_bss_param {
+  *	Contains a nested array of signal strength attributes (u8, dBm)
+  * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
+  *	Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
+- * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput considering also the
+- *	802.11 header (u32, kbps)
++ * @NL80211_STA_INFO_EXPECTED_THROUGHPUT: expected throughput considering also
++ *	the 802.11 header (u32, kbps)
+  * @NL80211_STA_INFO_RX_DROP_MISC: RX packets dropped for unspecified reasons
+  *	(u64)
+  * @NL80211_STA_INFO_BEACON_RX: number of beacons received from this peer (u64)
+@@ -4039,7 +4039,7 @@ enum nl80211_mpath_flags {
+  * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path
+  * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now
+  * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in
+- * 	&enum nl80211_mpath_flags;
++ *	&enum nl80211_mpath_flags;
+  * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
+  * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
+  * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination
+@@ -4179,7 +4179,7 @@ enum nl80211_band_attr {
+  * @NL80211_WMMR_CW_MAX: Maximum contention window slot.
+  * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space.
+  * @NL80211_WMMR_TXOP: Maximum allowed tx operation time.
+- * @nl80211_WMMR_MAX: highest possible wmm rule.
++ * @NL80211_WMMR_MAX: highest possible wmm rule.
+  * @__NL80211_WMMR_LAST: Internal use.
+  */
+ enum nl80211_wmm_rule {
+@@ -4201,8 +4201,9 @@ enum nl80211_wmm_rule {
+  * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
+  *	regulatory domain.
+  * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation
+- * 	are permitted on this channel, this includes sending probe
+- * 	requests, or modes of operation that require beaconing.
++ *	are permitted on this channel, this includes sending probe
++ *	requests, or modes of operation that require beaconing.
++ * @__NL80211_FREQUENCY_ATTR_NO_IBSS: obsolete, same as _NO_IR
+  * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
+  *	on this channel in current regulatory domain.
+  * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
+@@ -4276,6 +4277,8 @@ enum nl80211_wmm_rule {
+  * @NL80211_FREQUENCY_ATTR_CAN_MONITOR: This channel can be used in monitor
+  *	mode despite other (regulatory) restrictions, even if the channel is
+  *	otherwise completely disabled.
++ * @NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP: This channel can be used for a
++ *	very low power (VLP) AP, despite being NO_IR.
+  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
+  *	currently defined
+  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
+@@ -4319,6 +4322,7 @@ enum nl80211_frequency_attr {
+ 	NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT,
+ 	NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT,
+ 	NL80211_FREQUENCY_ATTR_CAN_MONITOR,
++	NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,
+ 
+ 	/* keep last */
+ 	__NL80211_FREQUENCY_ATTR_AFTER_LAST,
+@@ -4357,16 +4361,16 @@ enum nl80211_bitrate_attr {
+ };
+ 
+ /**
+- * enum nl80211_initiator - Indicates the initiator of a reg domain request
++ * enum nl80211_reg_initiator - Indicates the initiator of a reg domain request
+  * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world
+- * 	regulatory domain.
++ *	regulatory domain.
+  * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the
+- * 	regulatory domain.
++ *	regulatory domain.
+  * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the
+- * 	wireless core it thinks its knows the regulatory domain we should be in.
++ *	wireless core it thinks its knows the regulatory domain we should be in.
+  * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
+- * 	802.11 country information element with regulatory information it
+- * 	thinks we should consider. cfg80211 only processes the country
++ *	802.11 country information element with regulatory information it
++ *	thinks we should consider. cfg80211 only processes the country
+  *	code from the IE, and relies on the regulatory domain information
+  *	structure passed by userspace (CRDA) from our wireless-regdb.
+  *	If a channel is enabled but the country code indicates it should
+@@ -4385,11 +4389,11 @@ enum nl80211_reg_initiator {
+  *	to a specific country. When this is set you can count on the
+  *	ISO / IEC 3166 alpha2 country code being valid.
+  * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory
+- * 	domain.
++ *	domain.
+  * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom
+- * 	driver specific world regulatory domain. These do not apply system-wide
+- * 	and are only applicable to the individual devices which have requested
+- * 	them to be applied.
++ *	driver specific world regulatory domain. These do not apply system-wide
++ *	and are only applicable to the individual devices which have requested
++ *	them to be applied.
+  * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product
+  *	of an intersection between two regulatory domains -- the previously
+  *	set regulatory domain on the system and the last accepted regulatory
+@@ -4406,21 +4410,21 @@ enum nl80211_reg_type {
+  * enum nl80211_reg_rule_attr - regulatory rule attributes
+  * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved
+  * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional
+- * 	considerations for a given frequency range. These are the
+- * 	&enum nl80211_reg_rule_flags.
++ *	considerations for a given frequency range. These are the
++ *	&enum nl80211_reg_rule_flags.
+  * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory
+- * 	rule in KHz. This is not a center of frequency but an actual regulatory
+- * 	band edge.
++ *	rule in KHz. This is not a center of frequency but an actual regulatory
++ *	band edge.
+  * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule
+- * 	in KHz. This is not a center a frequency but an actual regulatory
+- * 	band edge.
++ *	in KHz. This is not a center a frequency but an actual regulatory
++ *	band edge.
+  * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
+  *	frequency range, in KHz.
+  * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
+- * 	for a given frequency range. The value is in mBi (100 * dBi).
+- * 	If you don't have one then don't send this.
++ *	for a given frequency range. The value is in mBi (100 * dBi).
++ *	If you don't have one then don't send this.
+  * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
+- * 	a given frequency range. The value is in mBm (100 * dBm).
++ *	a given frequency range. The value is in mBm (100 * dBm).
+  * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
+  *	If not present or 0 default CAC time will be used.
+  * @NL80211_ATTR_POWER_RULE_PSD: power spectral density (in dBm).
+@@ -4507,8 +4511,9 @@ enum nl80211_sched_scan_match_attr {
+  * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links
+  * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links
+  * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
+- * 	this includes probe requests or modes of operation that require
+- * 	beaconing.
++ *	this includes probe requests or modes of operation that require
++ *	beaconing.
++ * @__NL80211_RRF_NO_IBSS: obsolete, same as NO_IR
+  * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
+  *	base on contiguous rules and wider channels will be allowed to cross
+  *	multiple contiguous/overlapping frequency ranges.
+@@ -4522,11 +4527,13 @@ enum nl80211_sched_scan_match_attr {
+  * @NL80211_RRF_NO_EHT: EHT operation not allowed
+  * @NL80211_RRF_PSD: Ruleset has power spectral density value
+  * @NL80211_RRF_DFS_CONCURRENT: Operation on this channel is allowed for
+-	peer-to-peer or adhoc communication under the control of a DFS master
+-	which operates on the same channel (FCC-594280 D01 Section B.3).
+-	Should be used together with %NL80211_RRF_DFS only.
++ *	peer-to-peer or adhoc communication under the control of a DFS master
++ *	which operates on the same channel (FCC-594280 D01 Section B.3).
++ *	Should be used together with %NL80211_RRF_DFS only.
+  * @NL80211_RRF_NO_6GHZ_VLP_CLIENT: Client connection to VLP AP not allowed
+  * @NL80211_RRF_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP not allowed
++ * @NL80211_RRF_ALLOW_6GHZ_VLP_AP: Very low power (VLP) AP can be permitted
++ *	despite NO_IR configuration.
+  */
+ enum nl80211_reg_rule_flags {
+ 	NL80211_RRF_NO_OFDM		= 1<<0,
+@@ -4551,6 +4558,7 @@ enum nl80211_reg_rule_flags {
+ 	NL80211_RRF_DFS_CONCURRENT	= 1<<21,
+ 	NL80211_RRF_NO_6GHZ_VLP_CLIENT	= 1<<22,
+ 	NL80211_RRF_NO_6GHZ_AFC_CLIENT	= 1<<23,
++	NL80211_RRF_ALLOW_6GHZ_VLP_AP	= 1<<24,
+ };
+ 
+ #define NL80211_RRF_PASSIVE_SCAN	NL80211_RRF_NO_IR
+@@ -4707,8 +4715,8 @@ enum nl80211_mntr_flags {
+  *	alternate between Active and Doze states, but may not wake up
+  *	for neighbor's beacons.
+  *
+- * @__NL80211_MESH_POWER_AFTER_LAST - internal use
+- * @NL80211_MESH_POWER_MAX - highest possible power save level
++ * @__NL80211_MESH_POWER_AFTER_LAST: internal use
++ * @NL80211_MESH_POWER_MAX: highest possible power save level
+  */
+ 
+ enum nl80211_mesh_power_mode {
+@@ -5728,7 +5736,7 @@ struct nl80211_pattern_support {
+  *	"TCP connection wakeup" for more details. This is a nested attribute
+  *	containing the exact information for establishing and keeping alive
+  *	the TCP connection.
+- * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
++ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH: For wakeup reporting only, the
+  *	wakeup packet was received on the TCP connection
+  * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
+  *	TCP connection was lost or failed to be established
+@@ -6077,7 +6085,7 @@ enum nl80211_plink_state {
+  * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
+  * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
+  */
+-enum plink_actions {
++enum nl80211_plink_action {
+ 	NL80211_PLINK_ACTION_NO_ACTION,
+ 	NL80211_PLINK_ACTION_OPEN,
+ 	NL80211_PLINK_ACTION_BLOCK,
+@@ -6404,6 +6412,7 @@ enum nl80211_feature_flags {
+  *	receiving control port frames over nl80211 instead of the netdevice.
+  * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports
+  *	(average) ACK signal strength reporting.
++ * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: Backward-compatible ID
+  * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
+  *      TXQs.
+  * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
+@@ -6787,6 +6796,8 @@ enum nl80211_acl_policy {
+  * @NL80211_SMPS_STATIC: static SMPS (use a single antenna)
+  * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and
+  *	turn on other antennas after CTS/RTS).
++ * @__NL80211_SMPS_AFTER_LAST: internal
++ * @NL80211_SMPS_MAX: highest used enumeration
+  */
+ enum nl80211_smps_mode {
+ 	NL80211_SMPS_OFF,
+@@ -7008,6 +7019,8 @@ enum nl80211_bss_select_attr {
+  * @NL80211_NAN_FUNC_PUBLISH: function is publish
+  * @NL80211_NAN_FUNC_SUBSCRIBE: function is subscribe
+  * @NL80211_NAN_FUNC_FOLLOW_UP: function is follow-up
++ * @__NL80211_NAN_FUNC_TYPE_AFTER_LAST: internal use
++ * @NL80211_NAN_FUNC_MAX_TYPE: internal use
+  */
+ enum nl80211_nan_function_type {
+ 	NL80211_NAN_FUNC_PUBLISH,
+@@ -7168,7 +7181,7 @@ enum nl80211_nan_match_attributes {
+ };
+ 
+ /**
+- * nl80211_external_auth_action - Action to perform with external
++ * enum nl80211_external_auth_action - Action to perform with external
+  *     authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
+  * @NL80211_EXTERNAL_AUTH_START: Start the authentication.
+  * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication.
+@@ -7186,7 +7199,7 @@ enum nl80211_external_auth_action {
+  * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element
+  *	(9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10),
+  *	i.e. starting with the measurement token
+- * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element
++ * @NL80211_FTM_RESP_ATTR_CIVICLOC: The content of Measurement Report Element
+  *	(9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13),
+  *	i.e. starting with the measurement token
+  * @__NL80211_FTM_RESP_ATTR_LAST: Internal
+@@ -7829,6 +7842,7 @@ enum nl80211_sae_pwe_mechanism {
+  *
+  * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
+  *
++ * @NUM_NL80211_SAR_TYPE: internal
+  */
+ enum nl80211_sar_type {
+ 	NL80211_SAR_TYPE_POWER,
+@@ -7842,6 +7856,8 @@ enum nl80211_sar_type {
+ /**
+  * enum nl80211_sar_attrs - Attributes for SAR spec
+  *
++ * @__NL80211_SAR_ATTR_INVALID: Invalid
++ *
+  * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
+  *
+  * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
+@@ -7873,6 +7889,8 @@ enum nl80211_sar_attrs {
+ /**
+  * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
+  *
++ * @__NL80211_SAR_ATTR_SPECS_INVALID: Invalid
++ *
+  * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
+  *	power limit value in units of 0.25 dBm if type is
+  *	NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
+-- 
+2.18.0
+
diff --git a/recipes-wifi/iw/patches-mlo/0005-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch b/recipes-wifi/iw/patches-mlo/0007-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch
similarity index 88%
rename from recipes-wifi/iw/patches-mlo/0005-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch
rename to recipes-wifi/iw/patches-mlo/0007-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch
index 040dfd2..7d5a0f0 100644
--- a/recipes-wifi/iw/patches-mlo/0005-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch
+++ b/recipes-wifi/iw/patches-mlo/0007-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch
@@ -1,7 +1,7 @@
-From 42813f2d9097bce908f1b01982096b550d829ac7 Mon Sep 17 00:00:00 2001
+From aafc8ce9667fe00c16c3095cd3471d60a72fca0c Mon Sep 17 00:00:00 2001
 From: Hauke Mehrtens <hauke@hauke-m.de>
 Date: Sun, 21 Nov 2021 00:02:57 +0100
-Subject: [PATCH 05/10] Revert "iw: allow specifying CFLAGS/LIBS externally"
+Subject: [PATCH 07/13] Revert "iw: allow specifying CFLAGS/LIBS externally"
 
 This reverts commit 1325244b77d56fd7a16d1e35fdae0efc151920b1.
 
@@ -15,10 +15,10 @@
  1 file changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 17be33f..2482b93 100644
+index 2652fac..07289a9 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -46,30 +46,30 @@ NLLIBNAME = libnl-1
+@@ -47,30 +47,30 @@ NLLIBNAME = libnl-1
  endif
  
  ifeq ($(NL2FOUND),Y)
@@ -57,7 +57,7 @@
  NLLIBNAME = libnl-3.1
  endif
  
-@@ -77,8 +77,8 @@ ifeq ($(NLLIBNAME),)
+@@ -78,8 +78,8 @@ ifeq ($(NLLIBNAME),)
  $(error Cannot find development files for any supported version of libnl)
  endif
  
diff --git a/recipes-wifi/iw/patches-mlo/0006-survey-bss-rx-time.patch b/recipes-wifi/iw/patches-mlo/0008-survey-bss-rx-time.patch
similarity index 89%
rename from recipes-wifi/iw/patches-mlo/0006-survey-bss-rx-time.patch
rename to recipes-wifi/iw/patches-mlo/0008-survey-bss-rx-time.patch
index 5b61920..915997f 100644
--- a/recipes-wifi/iw/patches-mlo/0006-survey-bss-rx-time.patch
+++ b/recipes-wifi/iw/patches-mlo/0008-survey-bss-rx-time.patch
@@ -1,7 +1,7 @@
-From a417f83cef66ca22ce0a362e4812954d15721a70 Mon Sep 17 00:00:00 2001
+From c8d3c48f01b0007f7eeb132fb8bc0d2c0cb85ed7 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Mon, 25 Dec 2023 11:24:01 +0800
-Subject: [PATCH 06/10] survey bss rx time
+Subject: [PATCH 08/13] survey bss rx time
 
 ---
  survey.c | 3 +++
diff --git a/recipes-wifi/iw/patches-mlo/0007-iw-support-link-id-in-set-bitrates-command.patch b/recipes-wifi/iw/patches-mlo/0009-iw-support-link-id-in-set-bitrates-command.patch
similarity index 87%
rename from recipes-wifi/iw/patches-mlo/0007-iw-support-link-id-in-set-bitrates-command.patch
rename to recipes-wifi/iw/patches-mlo/0009-iw-support-link-id-in-set-bitrates-command.patch
index 8d0e0a0..1914814 100644
--- a/recipes-wifi/iw/patches-mlo/0007-iw-support-link-id-in-set-bitrates-command.patch
+++ b/recipes-wifi/iw/patches-mlo/0009-iw-support-link-id-in-set-bitrates-command.patch
@@ -1,7 +1,7 @@
-From f885f9be220545bc3d62c369d68ded69e2711b52 Mon Sep 17 00:00:00 2001
+From e243763029729ced434bcf7de3c5f7909d481c41 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Thu, 30 May 2024 10:17:29 +0800
-Subject: [PATCH 07/10] iw: support link id in set bitrates command
+Subject: [PATCH 09/13] iw: support link id in set bitrates command
 
 Since NL80211_CMD_SET_TX_BITRATE_MASK includes flag
 NL80211_FLAG_MLO_VALID_LINK_ID, nl80211_pre_do_it() will check whether
@@ -11,8 +11,6 @@
 Usage:
 iw dev <intf> set bitrates -l <link_id> [legacy | he-gi-xx ...]
 
-CR-Id: WCNCR00261410
-Change-Id: I4984054543f63c9324d9b81a240382023fbc0b0b
 ---
  bitrate.c | 19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/recipes-wifi/iw/patches-mlo/0009-mtk-wifi-iw-dump-links-information-in-station-dump.patch b/recipes-wifi/iw/patches-mlo/0009-mtk-wifi-iw-dump-links-information-in-station-dump.patch
deleted file mode 100644
index f6c01f0..0000000
--- a/recipes-wifi/iw/patches-mlo/0009-mtk-wifi-iw-dump-links-information-in-station-dump.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From be69477058da6305cceb451a8449f41f8f9fe24d Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Tue, 11 Jun 2024 11:18:41 +0800
-Subject: [PATCH 09/10] mtk: wifi: iw: dump links information in station dump
-
-Parse and show the following link information
-1. link address
-2. Rssi
-3. Tx rate
-4. Rx rate
-5. dtim period
-4. beacon interval
-
-CR-Id: WCNCR00240772
-Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
-Change-Id: Ia6122b7938a38ca0b2eb5060c21193f705d48181
----
- station.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 60 insertions(+)
-
-diff --git a/station.c b/station.c
-index bf7c0f5..e91cb73 100644
---- a/station.c
-+++ b/station.c
-@@ -636,6 +636,66 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
- 	}
- 
- 	printf("\n\tcurrent time:\t%llu ms\n", now_ms);
-+
-+	printf("\t*** MLD Information ***");
-+	if (tb[NL80211_ATTR_MLO_LINK_ID])
-+		printf("\n\tSetup link = %d", nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]));
-+
-+	if (tb[NL80211_ATTR_MLD_ADDR]) {
-+		mac_addr_n2a(mac_addr, nla_data(tb[NL80211_ATTR_MLD_ADDR]));
-+		printf("\n\tMLD Address: %s", mac_addr);
-+	}
-+
-+	if (tb[NL80211_ATTR_MLO_LINKS]) {
-+		struct nlattr *link;
-+		char buf[100];
-+		int rem;
-+
-+		nla_for_each_nested(link, tb[NL80211_ATTR_MLO_LINKS], rem) {
-+			struct nlattr *tb_link[NL80211_ATTR_MAX + 1];
-+
-+			nla_parse_nested(tb_link, NL80211_ATTR_MAX, link, NULL);
-+
-+			if (tb_link[NL80211_ATTR_MLO_LINK_ID])
-+				printf("\n\t***** Link ID: %2d *****",
-+				       nla_get_u32(tb_link[NL80211_ATTR_MLO_LINK_ID]));
-+			if (tb_link[NL80211_ATTR_MAC]) {
-+				mac_addr_n2a(buf, nla_data(tb_link[NL80211_ATTR_MAC]));
-+				printf("\n\tLink addr: %s", buf);
-+			}
-+			if (nla_parse_nested(sinfo, NL80211_STA_INFO_MAX,
-+					     tb_link[NL80211_ATTR_STA_INFO],
-+					     stats_policy)) {
-+				fprintf(stderr, "failed to parse nested attributes!\n");
-+				return NL_SKIP;
-+			}
-+			if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
-+				parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE],
-+					      buf, sizeof(buf));
-+				printf("\n\ttx bitrate:\t%s", buf);
-+			}
-+			if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
-+				parse_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE],
-+					      buf, sizeof(buf));
-+				printf("\n\trx bitrate:\t%s", buf);
-+			}
-+			chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL]);
-+			if (sinfo[NL80211_STA_INFO_SIGNAL])
-+				printf("\n\tsignal:  \t%d %sdBm",
-+					(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]),
-+					chain);
-+
-+			chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL_AVG]);
-+			if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
-+				printf("\n\tsignal avg:\t%d %sdBm",
-+					(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]),
-+					chain);
-+
-+			if (sinfo[NL80211_STA_INFO_BSS_PARAM])
-+				parse_bss_param(sinfo[NL80211_STA_INFO_BSS_PARAM]);
-+		}
-+	}
-+	printf("\n");
- 	return NL_SKIP;
- }
- 
--- 
-2.18.0
-
diff --git a/recipes-wifi/iw/patches-mlo/0008-iw-add-per-link-txpower-config.patch b/recipes-wifi/iw/patches-mlo/0010-iw-add-per-link-txpower-config.patch
similarity index 96%
rename from recipes-wifi/iw/patches-mlo/0008-iw-add-per-link-txpower-config.patch
rename to recipes-wifi/iw/patches-mlo/0010-iw-add-per-link-txpower-config.patch
index 61bf8e0..0195296 100644
--- a/recipes-wifi/iw/patches-mlo/0008-iw-add-per-link-txpower-config.patch
+++ b/recipes-wifi/iw/patches-mlo/0010-iw-add-per-link-txpower-config.patch
@@ -1,11 +1,10 @@
-From 248f4644bcfcf5701fb3ab576736091b6eb4f662 Mon Sep 17 00:00:00 2001
+From 32c260621b73c5662442dd29bdfddbf5269e831b Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 5 Jun 2024 22:10:24 +0800
-Subject: [PATCH 08/10] iw: add per-link txpower config
+Subject: [PATCH 10/13] iw: add per-link txpower config
 
 Add per-link txpower config & info dump
 
-CR-Id: WCNCR00274293
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
  ieee80211.h |  3 +++
diff --git a/recipes-wifi/iw/patches-mlo/0011-mtk-wifi-iw-dump-links-information-in-station-dump.patch b/recipes-wifi/iw/patches-mlo/0011-mtk-wifi-iw-dump-links-information-in-station-dump.patch
new file mode 100644
index 0000000..aff9a72
--- /dev/null
+++ b/recipes-wifi/iw/patches-mlo/0011-mtk-wifi-iw-dump-links-information-in-station-dump.patch
@@ -0,0 +1,139 @@
+From 8857b2c2e18abe3b00ed6aa11d821ece68f6c468 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Tue, 11 Jun 2024 11:18:41 +0800
+Subject: [PATCH 11/13] mtk: wifi: iw: dump links information in station dump
+
+Parse and show the following link information
+1. link address
+2. Rssi
+3. Tx rate
+4. Rx rate
+5. dtim period
+4. beacon interval
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ station.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 100 insertions(+)
+
+diff --git a/station.c b/station.c
+index bf7c0f5..8e4f67d 100644
+--- a/station.c
++++ b/station.c
+@@ -329,6 +329,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
+ 		[NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 },
+ 		[NL80211_STA_INFO_BEACON_RX] = { .type = NLA_U64},
+ 		[NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
++		[NL80211_STA_INFO_SIGNAL_AVG] = { .type = NLA_U8 },
+ 		[NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
+ 		[NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
+ 		[NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED },
+@@ -636,6 +637,105 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
+ 	}
+ 
+ 	printf("\n\tcurrent time:\t%llu ms\n", now_ms);
++
++	printf("\t*** MLD Information ***");
++	if (tb[NL80211_ATTR_MLO_LINK_ID])
++		printf("\n\tSetup link = %d", nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]));
++
++	if (tb[NL80211_ATTR_MLD_ADDR]) {
++		mac_addr_n2a(mac_addr, nla_data(tb[NL80211_ATTR_MLD_ADDR]));
++		printf("\n\tMLD Address: %s", mac_addr);
++	}
++
++	if (tb[NL80211_ATTR_MLO_LINKS]) {
++		struct nlattr *link;
++		char buf[100];
++		int rem;
++
++		nla_for_each_nested(link, tb[NL80211_ATTR_MLO_LINKS], rem) {
++			struct nlattr *tb_link[NL80211_ATTR_MAX + 1];
++
++			nla_parse_nested(tb_link, NL80211_ATTR_MAX, link, NULL);
++
++			if (tb_link[NL80211_ATTR_MLO_LINK_ID])
++				printf("\n\t***** Link ID: %2d *****",
++				       nla_get_u32(tb_link[NL80211_ATTR_MLO_LINK_ID]));
++			if (tb_link[NL80211_ATTR_MAC]) {
++				mac_addr_n2a(buf, nla_data(tb_link[NL80211_ATTR_MAC]));
++				printf("\n\tLink addr: %s", buf);
++			}
++			if (nla_parse_nested(sinfo, NL80211_STA_INFO_MAX,
++					     tb_link[NL80211_ATTR_STA_INFO],
++					     stats_policy)) {
++				fprintf(stderr, "failed to parse nested attributes!\n");
++				return NL_SKIP;
++			}
++
++			if (sinfo[NL80211_STA_INFO_RX_BYTES64])
++				printf("\n\trx bytes:\t%llu",
++				       nla_get_u64(sinfo[NL80211_STA_INFO_RX_BYTES64]));
++			if (sinfo[NL80211_STA_INFO_RX_MPDUS])
++				printf("\n\trx mpdus:\t%u",
++				       nla_get_u32(sinfo[NL80211_STA_INFO_RX_MPDUS]));
++			if (sinfo[NL80211_STA_INFO_FCS_ERROR_COUNT])
++				printf("\n\trx fcs errors:\t%u",
++				       nla_get_u32(sinfo[NL80211_STA_INFO_FCS_ERROR_COUNT]));
++
++			if (sinfo[NL80211_STA_INFO_TX_BYTES64])
++				printf("\n\ttx bytes:\t%llu",
++				       nla_get_u64(sinfo[NL80211_STA_INFO_TX_BYTES64]));
++			if (sinfo[NL80211_STA_INFO_TX_RETRIES])
++				printf("\n\ttx retries:\t%u",
++				       nla_get_u32(sinfo[NL80211_STA_INFO_TX_RETRIES]));
++			if (sinfo[NL80211_STA_INFO_TX_FAILED])
++				printf("\n\ttx failed:\t%u",
++				       nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
++
++			chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL]);
++			if (sinfo[NL80211_STA_INFO_SIGNAL])
++				printf("\n\tsignal:  \t%d %sdBm",
++				       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]),
++				       chain);
++
++			chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL_AVG]);
++			if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
++				printf("\n\tsignal avg:\t%d %sdBm",
++				       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]),
++				       chain);
++
++			if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
++				parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE],
++					      buf, sizeof(buf));
++				printf("\n\ttx bitrate:\t%s", buf);
++			}
++
++			if (sinfo[NL80211_STA_INFO_TX_DURATION])
++				printf("\n\ttx duration:\t%llu us",
++				       nla_get_u64(sinfo[NL80211_STA_INFO_TX_DURATION]));
++
++			if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
++				parse_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE],
++					      buf, sizeof(buf));
++				printf("\n\trx bitrate:\t%s", buf);
++			}
++
++			if (sinfo[NL80211_STA_INFO_RX_DURATION])
++				printf("\n\trx duration:\t%llu us",
++				       nla_get_u64(sinfo[NL80211_STA_INFO_RX_DURATION]));
++
++			if (sinfo[NL80211_STA_INFO_ACK_SIGNAL])
++				printf("\n\tlast ack signal:%d dBm",
++				       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL]));
++
++			if (sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG])
++				printf("\n\tavg ack signal:\t%d dBm",
++				       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG]));
++
++			if (sinfo[NL80211_STA_INFO_BSS_PARAM])
++				parse_bss_param(sinfo[NL80211_STA_INFO_BSS_PARAM]);
++		}
++	}
++	printf("\n");
+ 	return NL_SKIP;
+ }
+ 
+-- 
+2.18.0
+
diff --git a/recipes-wifi/iw/patches-mlo/0010-iw-add-per-radio-antenna-config.patch b/recipes-wifi/iw/patches-mlo/0012-iw-add-per-radio-antenna-config.patch
similarity index 96%
rename from recipes-wifi/iw/patches-mlo/0010-iw-add-per-radio-antenna-config.patch
rename to recipes-wifi/iw/patches-mlo/0012-iw-add-per-radio-antenna-config.patch
index 8a009fe..1d915e1 100644
--- a/recipes-wifi/iw/patches-mlo/0010-iw-add-per-radio-antenna-config.patch
+++ b/recipes-wifi/iw/patches-mlo/0012-iw-add-per-radio-antenna-config.patch
@@ -1,7 +1,7 @@
-From a050861779a1e01ad2079830336b67d926ed7af7 Mon Sep 17 00:00:00 2001
+From ecfbe0e44f98de44dc7a1e3d8566cf9eb9987458 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 13 Jun 2024 16:48:00 +0800
-Subject: [PATCH 10/10] iw: add per-radio antenna config
+Subject: [PATCH 12/13] iw: add per-radio antenna config
 
 Add per-radio antenna config & info dump
 Currently, there is no radio index or supported band bitmap in wiphy data struct
@@ -9,9 +9,7 @@
 Therefore, we just use NL80211_BANDS_XX to specify the radio we desire
 to config.
 
-CR-Id: WCNCR00274293
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Change-Id: Ibf0b3efb99b7568ba2195358cbb5483f2d91794a
 ---
  info.c | 49 +++++++++++++++++++++++++++++++++++++++++--------
  phy.c  | 50 ++++++++++++++++++++++++++++++++++++++++----------
diff --git a/recipes-wifi/iw/patches-mlo/0013-iw-add-link_id-for-offchannel-operation.patch b/recipes-wifi/iw/patches-mlo/0013-iw-add-link_id-for-offchannel-operation.patch
new file mode 100644
index 0000000..c9f6cf9
--- /dev/null
+++ b/recipes-wifi/iw/patches-mlo/0013-iw-add-link_id-for-offchannel-operation.patch
@@ -0,0 +1,59 @@
+From 1bc783af16926b73f98f0c1b67ab90cf39e030a1 Mon Sep 17 00:00:00 2001
+From: Michael-CY Lee <michael-cy.lee@mediatek.com>
+Date: Thu, 27 Jun 2024 08:37:52 +0800
+Subject: [PATCH 13/13] iw: add link_id for offchannel operation
+
+NL80211_CMD_REMAIN_ON_CANNEL has flag NL80211_FLAG_MLO_VALID_LINK_ID, so
+a link_id is necessary when the interface is MLD.
+
+Usage:
+iw dev <ifname> offchannel [-l link_id] <freq> <duration>
+
+Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
+---
+ offch.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/offch.c b/offch.c
+index 19e170e..3858ccd 100644
+--- a/offch.c
++++ b/offch.c
+@@ -14,6 +14,26 @@ static int offchannel(struct nl80211_state *state,
+ 		      enum id_input id)
+ {
+ 	char *end;
++	unsigned int link_id;
++
++	if (argc < 2)
++		return 1;
++
++	/* link id */
++	if (!strcmp(argv[0], "-l")) {
++		link_id = strtol(argv[1], &end, 10);
++		if (*end)
++			return 1;
++
++		if (link_id >= IEEE80211_MLD_MAX_NUM_LINKS) {
++			printf("link id %d exceeds max number of links\n",
++				link_id);
++			return 2;
++		}
++		NLA_PUT_U8(msg, NL80211_ATTR_MLO_LINK_ID, link_id);
++		argv += 2;
++		argc -= 2;
++	}
+ 
+ 	if (argc < 2)
+ 		return 1;
+@@ -42,6 +62,6 @@ static int offchannel(struct nl80211_state *state,
+ 	return -ENOSPC;
+ }
+ 
+-TOPLEVEL(offchannel, "<freq> <duration>", NL80211_CMD_REMAIN_ON_CHANNEL, 0,
+-	 CIB_NETDEV, offchannel,
++TOPLEVEL(offchannel, "[-l link_id] <freq> <duration>",
++	 NL80211_CMD_REMAIN_ON_CHANNEL, 0, CIB_NETDEV, offchannel,
+ 	 "Leave operating channel and go to the given channel for a while.");
+-- 
+2.18.0
+
diff --git a/recipes-wifi/iw/patches-mlo/patches.inc b/recipes-wifi/iw/patches-mlo/patches.inc
index 5c18fcd..963d304 100644
--- a/recipes-wifi/iw/patches-mlo/patches.inc
+++ b/recipes-wifi/iw/patches-mlo/patches.inc
@@ -4,10 +4,13 @@
     file://0002-iw-add-puncturing-support.patch \
     file://0003-util-clarify-comment-about-parsed-pointer.patch \
     file://0004-iw-remove-sizer-section-and-related-code.patch \
-    file://0005-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch \
-    file://0006-survey-bss-rx-time.patch \
-    file://0007-iw-support-link-id-in-set-bitrates-command.patch \
-    file://0008-iw-add-per-link-txpower-config.patch \
-    file://0009-mtk-wifi-iw-dump-links-information-in-station-dump.patch \
-    file://0010-iw-add-per-radio-antenna-config.patch \
+    file://0005-iw-fix-formats-under-MIPS64-PPC.patch \
+    file://0006-update-nl80211.h.patch \
+    file://0007-Revert-iw-allow-specifying-CFLAGS-LIBS-externally.patch \
+    file://0008-survey-bss-rx-time.patch \
+    file://0009-iw-support-link-id-in-set-bitrates-command.patch \
+    file://0010-iw-add-per-link-txpower-config.patch \
+    file://0011-mtk-wifi-iw-dump-links-information-in-station-dump.patch \
+    file://0012-iw-add-per-radio-antenna-config.patch \
+    file://0013-iw-add-link_id-for-offchannel-operation.patch \
     "