[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]

[Description]
Refactor and sync kernel/wifi from Openwrt

[Release-log]
N/A

diff --git a/recipes-connectivity/wpa-supplicant/files/patches/800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch b/recipes-connectivity/wpa-supplicant/files/patches/800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch
new file mode 100644
index 0000000..96ebdef
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant/files/patches/800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch
@@ -0,0 +1,58 @@
+From 37528a5205cb0b9e2238b7d97fb2ff5457448f1c Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Thu, 8 Sep 2022 01:45:41 +0200
+Subject: [PATCH] acs: don't select indoor channel on outdoor operation
+
+Don't select channels designated for exclusive-indoor use when the
+country3 element is set on outdoor operation.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ src/ap/acs.c | 9 +++++++++
+ src/ap/dfs.c | 3 +++
+ 2 files changed, 12 insertions(+)
+
+--- a/src/ap/acs.c
++++ b/src/ap/acs.c
+@@ -552,6 +552,9 @@ static void acs_survey_mode_interference
+ 		if (chan->max_tx_power < iface->conf->min_tx_power)
+ 			continue;
+ 
++		if (chan->flag & HOSTAPD_CHAN_INDOOR_ONLY && iface->conf->country[2] == 0x4f)
++			continue;
++
+ 		wpa_printf(MSG_DEBUG, "ACS: Survey analysis for channel %d (%d MHz)",
+ 			   chan->chan, chan->freq);
+ 
+@@ -686,6 +689,9 @@ acs_find_ideal_chan_mode(struct hostapd_
+ 		if (chan->max_tx_power < iface->conf->min_tx_power)
+ 			continue;
+ 
++		if (chan->flag & HOSTAPD_CHAN_INDOOR_ONLY && iface->conf->country[2] == 0x4f)
++			continue;
++
+ 		if (!chan_bw_allowed(chan, bw, 1, 1)) {
+ 			wpa_printf(MSG_DEBUG,
+ 				   "ACS: Channel %d: BW %u is not supported",
+@@ -1065,6 +1071,9 @@ static int * acs_request_scan_add_freqs(
+ 		if (chan->max_tx_power < iface->conf->min_tx_power)
+ 			continue;
+ 
++		if (chan->flag & HOSTAPD_CHAN_INDOOR_ONLY && iface->conf->country[2] == 0x4f)
++			continue;
++
+ 		*freq++ = chan->freq;
+ 	}
+ 
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -282,6 +282,9 @@ static int dfs_find_channel(struct hosta
+ 		if (chan->max_tx_power < iface->conf->min_tx_power)
+ 			continue;
+ 
++		if (chan->flag & HOSTAPD_CHAN_INDOOR_ONLY && iface->conf->country[2] == 0x4f)
++			continue;
++
+ 		if (ret_chan && idx == channel_idx) {
+ 			wpa_printf(MSG_DEBUG, "Selected channel %d (%d)",
+ 				   chan->freq, chan->chan);
diff --git a/recipes-connectivity/wpa-supplicant/files/patches/patches.inc b/recipes-connectivity/wpa-supplicant/files/patches/patches.inc
index 5651ea4..a00a464 100644
--- a/recipes-connectivity/wpa-supplicant/files/patches/patches.inc
+++ b/recipes-connectivity/wpa-supplicant/files/patches/patches.inc
@@ -50,6 +50,7 @@
     file://740-snoop_iface.patch \
     file://750-qos_map_set_without_interworking.patch \
     file://751-qos_map_ignore_when_unsupported.patch \
+    file://800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch \
     file://902-master-Add-hostapd_neighbor_count-and-hostapd_neighbor_inse.patch \
     file://903-master-Support-including-neighbor-report-elements-in-ANQP-r.patch \
     file://904-master-Support-including-neignbor-report-elements-in-BTM-re.patch \