[rdkb][common][conf][Add filogic830 onewifi build support]
[Description]
Add filogic830 onewifi build support
[Release-log]
Change-Id: I5db0bc298ecfbc84c4338bf6dac77a15ddd3474e
diff --git a/conf/machine/filogic830-onewifi.conf b/conf/machine/filogic830-onewifi.conf
new file mode 100644
index 0000000..958fe48
--- /dev/null
+++ b/conf/machine/filogic830-onewifi.conf
@@ -0,0 +1,90 @@
+#@TYPE: Machine
+#@NAME: mediatek filogic
+#@NEEDED_BSPLAYERS: meta-filogic
+#@DESCRIPTION: Machine configuration for running a RDK broadband on mediatek filogic
+#@RDK_FLAVOR: rdkb
+
+include conf/machine/filogic.conf
+
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+MACHINE_IMAGE_NAME = "rdkb-generic-broadband-image"
+
+MACHINEOVERRIDES .= ":broadband:filogic:mt7986:aarch64"
+
+PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
+
+PREFERRED_VERSION_xfsprogs = "4.8.0"
+PREFERRED_VERSION_php_dunfell = "7.1.%"
+PREFERRED_VERSION_php-native_dunfell = "7.1.%"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-mediatek"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
+PREFERRED_VERSION_linux-mediatek = "5.4.%"
+PREFERRED_VERSION_linux-libc-headers = "5.4"
+
+PREFERRED_PROVIDER_virtual/wifi-hal ?= "wifi-hal-generic"
+#PREFERRED_PROVIDER_hal-wifi = "hal-wifi-mt76"
+PREFERRED_VERSION_iw_filogic = "5.%"
+#wifi bsp from openwrt
+PREFERRED_VERSION_hostapd = "2.10"
+PREFERRED_VERSION_wpa-supplicant = "2.10"
+PREFERRED_VERSION_linux-mac80211 = "5.15.%"
+PREFERRED_VERSION_linux-mt76 = "2.%"
+PREFERRED_VERSION_lua = "5.3.%"
+#masking files for dunfell build
+require conf/include/filogic-bbmasks.inc
+#require conf/include/rdk-external-src-platform.inc
+
+DISTRO_FEATURES_append = " meshwifi"
+DISTRO_FEATURES_append = " ipv6"
+DISTRO_FEATURES_append = " kernel_in_ubi"
+#DISTRO_FEATURES_append = " switch_gsw_mode"
+DISTRO_FEATURES_append = " fwupgrade_manager"
+DISTRO_FEATURES_append = " mt76"
+DISTRO_FEATURES_append = " flow_offload"
+#DISTRO_FEATURES_append = " logan"
+#DISTRO_FEATURES_append = " mtk_easymesh"
+# kernel 5.4 gold linker 'arm-rdk-linux-gnueabi-ld' not supported
+#DISTRO_FEATURES_append = " referencepltfm "
+#DISTRO_FEATURES_remove = " ld-is-gold"
+BBMASK .= "|meta-filogic-logan/recipes-wifi/"
+BBMASK .= "|meta-filogic/recipes-wifi/hal/"
+BBMASK .= "|meta-filogic/recipes-wifi/wpa-supplicant/"
+BBMASK .= "|meta-filogic/recipes-wifi/hostapd/"
+#for sdk support
+INHERIT_append = " uninative"
+
+BOOT_SUFFIX = "bin"
+MACHINE_FEATURES = "ext2 ipsec nfs pci smbfs usbgadget usbhost vfat"
+
+#for secure boot support
+#DISTRO_FEATURES_append = " secure_boot"
+MACHINEOVERRIDES .="${@bb.utils.contains('DISTRO_FEATURES','secure_boot',':secureboot','',d)}"
+SECURE_BOOT_KEYNAME_secureboot = "fit_key"
+SECURE_BOOT_KEYDIR_secureboot = "${TOPDIR}/../keys"
+FIT_HASH_ALG_secureboot ="sha1"
+HASHED_BOOT_DEVICE_secureboot = "252:0"
+
+# for efuse tools
+#DISTRO_FEATURES_append = " efuse_tools"
+
+DISTRO_FEATURES_append_broadband = " rdkb_xdsl_ppp_manager"
+# REFPLTB-1546 : WiFi HAL 3.0 support for RPI
+DISTRO_FEATURES_append_broadband = " halVersion3"
+
+# Fix MeshAgent build errors
+DISTRO_FEATURES_append_broadband = " WanFailOverSupportEnable"
+
+#rdk-wifi-libhostap support for broadband
+DISTRO_FEATURES_append_broadband = " HOSTAPD_2_10"
+
+# OneWifi feature
+DISTRO_FEATURES_append_broadband = " OneWifi"
+
+# REFPLTB-1775: Sky team's fix for erouter0 IP issue
+DISTRO_FEATURES_append_broadband = " RbusBuildFlagEnable"
+
+INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
+PACKAGECONFIG_remove_pn-gdb = "readline"
+#DISTRO_FEATURES_append_broadband = " offchannel_scan_5g"
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/ccsp-common-library.bbappend b/recipes-ccsp/ccsp/ccsp-common-library.bbappend
index 801ad2a..932e45d 100644
--- a/recipes-ccsp/ccsp/ccsp-common-library.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-common-library.bbappend
@@ -19,12 +19,11 @@
file://utopia.service \
"
-SRC_URI_remove = "file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
+SRC_URI_remove_dunfell = "file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
SRC_URI += "file://0003-add-dependency-to-pandm.patch;apply=no"
-SRC_URI += "file://0004-fix-out-of-array-access.patch;apply=no"
-SRC_URI_append = " file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch;apply=no"
+SRC_URI_append_dunfell = " file://0001-DBusLoop-SSL_state-TLS_ST_OK.patch;apply=no"
# we need to patch to code for Filogic
@@ -33,10 +32,11 @@
if [ ! -e patch_applied ]; then
bbnote "Patching 0003-add-dependency-to-pandm.patch"
patch -p1 < ${WORKDIR}/0003-add-dependency-to-pandm.patch
- patch -p1 < ${WORKDIR}/0004-fix-out-of-array-access.patch
- bbnote "Patching 0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
- patch -p1 < ${WORKDIR}/0001-DBusLoop-SSL_state-TLS_ST_OK.patch
+ if [ "${@bb.utils.contains('DISTRO_CODENAME', 'dunfell', 'dunfell', '', d)}" = "dunfell" ] ; then
+ bbnote "Patching 0001-DBusLoop-SSL_state-TLS_ST_OK.patch"
+ patch -p1 < ${WORKDIR}/0001-DBusLoop-SSL_state-TLS_ST_OK.patch
+ fi
touch patch_applied
fi
}
@@ -73,9 +73,8 @@
install -D -m 0644 ${S}/systemd_units/CcspLMLite.service ${D}${systemd_unitdir}/system/CcspLMLite.service
install -D -m 0644 ${S}/systemd_units/CcspTr069PaSsp.service ${D}${systemd_unitdir}/system/CcspTr069PaSsp.service
install -D -m 0644 ${S}/systemd_units/snmpSubAgent.service ${D}${systemd_unitdir}/system/snmpSubAgent.service
- install -D -m 0644 ${S}/systemd_units/snmpSubAgent.service ${D}${systemd_unitdir}/system/snmpSubAgent.service
install -D -m 0644 ${S}/systemd_units/CcspEthAgent.service ${D}${systemd_unitdir}/system/CcspEthAgent.service
-
+ install -D -m 0644 ${S}/systemd_units/CcspTelemetry.service ${D}${systemd_unitdir}/system/CcspTelemetry.service
#rfc service file
install -D -m 0644 ${S}/systemd_units/rfc.service ${D}${systemd_unitdir}/system/rfc.service
@@ -109,6 +108,13 @@
#change for Filogic
sed -i 's/PIDFile/#&/' ${D}${systemd_unitdir}/system/CcspPandMSsp.service
+ #Telemetry support
+ sed -i "/Type=oneshot/a EnvironmentFile=\/etc/\device.properties" ${D}${systemd_unitdir}/system/CcspTelemetry.service
+ sed -i "/EnvironmentFile=\/etc\/device.properties/a EnvironmentFile=\/etc\/dcm.properties" ${D}${systemd_unitdir}/system/CcspTelemetry.service
+ sed -i "/EnvironmentFile=\/etc\/dcm.properties/a ExecStartPre=\/bin\/sh -c '\/bin\/touch \/rdklogs\/logs\/dcmscript.log'" ${D}${systemd_unitdir}/system/CcspTelemetry.service
+ sed -i "s/ExecStart=\/bin\/sh -c '\/lib\/rdk\/dcm.service \&'/ExecStart=\/bin\/sh -c '\/lib\/rdk\/StartDCM.sh \>\> \/rdklogs\/logs\/telemetry.log \&'/g" ${D}${systemd_unitdir}/system/CcspTelemetry.service
+ sed -i "s/wan-initialized.target/multi-user.target/g" ${D}${systemd_unitdir}/system/CcspTelemetry.service
+
#WanManager - RdkWanManager.service
DISTRO_WAN_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','rdkb_wan_manager','true','false',d)}"
if [ $DISTRO_WAN_ENABLED = 'true' ]; then
@@ -119,7 +125,6 @@
install -D -m 0644 ${WORKDIR}/utopia.service ${D}${systemd_unitdir}/system/utopia.service
install -D -m 0644 ${S}/systemd_units/RdkTelcoVoiceManager.service ${D}${systemd_unitdir}/system/RdkTelcoVoiceManager.service
install -D -m 0644 ${S}/systemd_units/RdkVlanManager.service ${D}${systemd_unitdir}/system/RdkVlanManager.service
- sed -i "s/After=CcspCrSsp.service/After=CcspCrSsp.service utopia.service PsmSsp.service CcspEthAgent.service/g" ${D}${systemd_unitdir}/system/RdkVlanManager.service
fi
DISTRO_FW_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','fwupgrade_manager','true','false',d)}"
@@ -133,6 +138,16 @@
ethtool -s erouter0 speed 1000 \
fi' ${D}/usr/ccsp/ccspPAMCPCheck.sh
+ DISTRO_OneWiFi_ENABLED="${@bb.utils.contains('DISTRO_FEATURES','OneWifi','true','false',d)}"
+ if [ $DISTRO_OneWiFi_ENABLED = 'true' ]; then
+ install -D -m 0644 ${S}/systemd_units/onewifi.service ${D}${systemd_unitdir}/system/onewifi.service
+ sed -i "s/Unit=ccspwifiagent.service/Unit=onewifi.service/g" ${D}${systemd_unitdir}/system/filogicwifiinitialized.path
+ sed -i "/OSW_DRV_TARGET_DISABLED=1/a ExecStartPre=\/bin\/sh \/usr\/ccsp\/wifi\/onewifi_pre_start.sh" ${D}${systemd_unitdir}/system/onewifi.service
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'webconfig_bin', 'true', 'false', d)}; then
+ install -D -m 0644 ${S}/systemd_units/webconfig.service ${D}${systemd_unitdir}/system/webconfig.service
+ fi
}
do_install_append_dunfell_class-target () {
@@ -140,7 +155,6 @@
sed -i '/CcspCrSsp.service/c After=CcspCrSsp.service gwprovethwan.service' ${D}${systemd_unitdir}/system/PsmSsp.service
}
-SYSTEMD_SERVICE_${PN} += "ccspwifiagent.service"
SYSTEMD_SERVICE_${PN} += "CcspCrSsp.service"
SYSTEMD_SERVICE_${PN} += "CcspPandMSsp.service"
SYSTEMD_SERVICE_${PN} += "PsmSsp.service"
@@ -159,8 +173,11 @@
SYSTEMD_SERVICE_${PN} += "ProcessResetDetect.path"
SYSTEMD_SERVICE_${PN} += "ProcessResetDetect.service"
SYSTEMD_SERVICE_${PN} += "rfc.service"
+SYSTEMD_SERVICE_${PN} += "CcspTelemetry.service"
SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', 'RdkWanManager.service utopia.service RdkVlanManager.service ', '', d)}"
SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'fwupgrade_manager', 'RdkFwUpgradeManager.service ', '', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', 'onewifi.service ', 'ccspwifiagent.service', d)}"
+SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'webconfig_bin', 'webconfig.service', '', d)}"
FILES_${PN}_append = " \
/usr/ccsp/ccspSysConfigEarly.sh \
@@ -168,7 +185,6 @@
/usr/ccsp/utopiaInitCheck.sh \
/usr/ccsp/ccspPAMCPCheck.sh \
/usr/ccsp/ProcessResetCheck.sh \
- ${systemd_unitdir}/system/ccspwifiagent.service \
${systemd_unitdir}/system/CcspCrSsp.service \
${systemd_unitdir}/system/CcspPandMSsp.service \
${systemd_unitdir}/system/PsmSsp.service \
@@ -187,6 +203,8 @@
${systemd_unitdir}/system/ProcessResetDetect.path \
${systemd_unitdir}/system/ProcessResetDetect.service \
${systemd_unitdir}/system/rfc.service \
+ ${systemd_unitdir}/system/CcspTelemetry.service \
"
FILES_${PN}_append = "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', ' ${systemd_unitdir}/system/RdkWanManager.service ${systemd_unitdir}/system/utopia.service ${systemd_unitdir}/system/RdkVlanManager.service ${systemd_unitdir}/system/RdkTelcoVoiceManager.service ', '', d)}"
-FILES_${PN}_append = "${@bb.utils.contains('DISTRO_FEATURES', 'fwupgrade_manager', ' ${systemd_unitdir}/system/RdkFwUpgradeManager.service ', '', d)}"
\ No newline at end of file
+FILES_${PN}_append = "${@bb.utils.contains('DISTRO_FEATURES', 'fwupgrade_manager', ' ${systemd_unitdir}/system/RdkFwUpgradeManager.service ', '', d)}"
+FILES_${PN}_append = "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', ' ${systemd_unitdir}/system/onewifi.service ', ' ${systemd_unitdir}/system/ccspwifiagent.service ', d)}"
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend b/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend
new file mode 100644
index 0000000..95e2050
--- /dev/null
+++ b/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend
@@ -0,0 +1,40 @@
+require ccsp_common_filogic.inc
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/ccsp-wifi-agent:${THISDIR}/files:"
+
+DEPENDS_remove = " opensync-2.4.1"
+DEPENDS_append = " opensync mesh-agent"
+
+CFLAGS_append = " -DWIFI_HAL_VERSION_3 -Wno-unused-function -DCONFIG_MBO"
+LDFLAGS_append = " -ldl "
+CFLAGS_remove = " -Wno-mismatched-dealloc -Wno-enum-conversion "
+CFLAGS_append_aarch64 = " -Wno-error "
+
+SRC_URI += " \
+ file://checkonewifi.sh \
+ file://bridge_mode.sh \
+ file://onewifi_pre_start.sh \
+ file://mac80211.sh \
+ file://init-uci-config.service \
+"
+#SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+SYSTEMD_SERVICE_${PN} += " init-uci-config.service"
+
+do_install_append(){
+ install -m 777 ${WORKDIR}/checkonewifi.sh ${D}/usr/ccsp/wifi/checkwifi.sh
+ install -m 777 ${WORKDIR}/bridge_mode.sh ${D}/usr/ccsp/wifi/
+ install -m 777 ${WORKDIR}/onewifi_pre_start.sh ${D}/usr/ccsp/wifi/
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/init-uci-config.service ${D}${systemd_unitdir}/system
+ install -m 777 ${WORKDIR}/mac80211.sh ${D}/usr/ccsp/wifi/
+}
+
+FILES_${PN} += " \
+ ${prefix}/ccsp/wifi/checkwifi.sh \
+ ${prefix}/ccsp/wifi/bridge_mode.sh \
+ ${prefix}/ccsp/wifi/onewifi_pre_start.sh \
+ ${prefix}/ccsp/wifi/mac80211.sh \
+ ${systemd_unitdir}/system/init-uci-config.service \
+ /usr/bin/wifi_events_consumer \
+"
+
diff --git a/recipes-ccsp/ccsp/ccsp-wifi-agent/bridge_mode.sh b/recipes-ccsp/ccsp/ccsp-wifi-agent/bridge_mode.sh
new file mode 100644
index 0000000..6534722
--- /dev/null
+++ b/recipes-ccsp/ccsp/ccsp-wifi-agent/bridge_mode.sh
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+########################### FOR BRIDGE MODE SET UP ##############################
+
+sleep 5
+
+BRIDGE_MODE=`dmcli eRT getv Device.X_CISCO_COM_DeviceControl.LanManagementEntry.1.LanMode | grep value | cut -d ':' -f3 | cut -d ' ' -f2`
+PRIVATE_WIFI_2G=`cat /nvram/hostapd0.conf | grep interface= | head -n1 | cut -d '=' -f2`
+PRIVATE_WIFI_5G=`cat /nvram/hostapd1.conf | grep interface= | head -n1 | cut -d '=' -f2`
+echo "BRIDGE MODE is $BRIDGE_MODE"
+if [ "$BRIDGE_MODE" = "bridge-static" ] ; then
+ sysevent set lan-stop
+ hostapd_cli -i$PRIVATE_WIFI_2G disable
+ hostapd_cli -i$PRIVATE_WIFI_5G disable
+ ps aux | grep hostapd1 | grep -v grep | awk '{print $1}' | xargs kill -9
+ ps aux | grep hostapd0 | grep -v grep | awk '{print $1}' | xargs kill -9
+else
+ echo "Running in Router Mode"
+fi
+
+################# Make Persistent after reboot ################
+
+
+######## SSID status
+pri_2g=`cat /var/Get2gssidEnable.txt`
+pri_5g=`cat /var/Get5gssidEnable.txt`
+pub_2g=`cat /var/GetPub2gssidEnable.txt`
+pub_5g=`cat /var/GetPub5gssidEnable.txt`
+
+######## Radio Status
+Rad_2g=`cat /var/Get2gRadioEnable.txt`
+Rad_5g=`cat /var/Get5gRadioEnable.txt`
+
+######### Current Wireless interfaces names
+pri_wifi_2g=`grep interface= /nvram/hostapd0.conf | cut -d '=' -f2 | head -n 1`
+pri_wifi_5g=`grep interface= /nvram/hostapd1.conf | cut -d '=' -f2 | head -n 1`
+pub_wifi_2g=`grep interface= /nvram/hostapd4.conf | cut -d '=' -f2 | head -n 1`
+pub_wifi_5g=`grep interface= /nvram/hostapd5.conf | cut -d '=' -f2 | head -n 1`
+
+echo "wireless interface names : $pri_wifi_2g $pri_wifi_5g $pub_wifi_2g $pub_wifi_5g"
+
+Disable_WiFi ()
+{
+ wifi_status=`ifconfig $1 | grep RUNNING | wc -l`
+ if [ $wifi_status == 1 ] ; then
+ hostapd_cli -i$1 disable
+ fi
+}
+
+if [ $Rad_2g == 0 ] ; then
+ Disable_WiFi $pri_wifi_2g
+ Disable_WiFi $pub_wifi_2g
+else
+ if [ $pub_2g == 0 ] ; then
+ Disable_WiFi $pub_wifi_2g
+ fi
+ if [ $pri_2g == 0 ] ; then
+ Disable_WiFi $pri_wifi_2g
+ fi
+fi
+
+if [ $Rad_5g == 0 ] ; then
+ Disable_WiFi $pri_wifi_5g
+ Disable_WiFi $pub_wifi_5g
+else
+ if [ $pri_5g == 0 ] ; then
+ Disable_WiFi $pri_wifi_5g
+ fi
+ if [ $pub_5g == 0 ] ; then
+ Disable_WiFi $pub_wifi_5g
+ fi
+fi
+
+##Added workaround fix for LAN connection issue
+
+ETH_INTERFACE=`ifconfig eth0 | grep eth0 | wc -l`
+if [ $ETH_INTERFACE == 1 ] ; then
+ ifconfig eth0 down
+ ip link set dev eth0 name eth1
+fi
+
+ETH_INTERFACE=`ifconfig eth1 | grep eth1 | wc -l`
+if [ $ETH_INTERFACE == 1 ] ; then
+ ifconfig eth1 up
+ brctl addif brlan0 eth1
+fi
diff --git a/recipes-ccsp/ccsp/ccsp-wifi-agent/checkonewifi.sh b/recipes-ccsp/ccsp/ccsp-wifi-agent/checkonewifi.sh
new file mode 100644
index 0000000..ae00a02
--- /dev/null
+++ b/recipes-ccsp/ccsp/ccsp-wifi-agent/checkonewifi.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+wifi_wlan0=`iwconfig wlan0|grep IEEE\ 802.11 | wc -l`
+wifi_wlan1=`iwconfig wlan1|grep IEEE\ 802.11 | wc -l`
+wifi_wlan2=`iwconfig wlan2|grep IEEE\ 802.11 | wc -l`
+wifi_wlan3=`iwconfig wlan3|grep IEEE\ 802.11 | wc -l`
+
+if [ $wifi_wlan0 == "1" ] ; then
+ flag=wlan0
+ wlan0=$(iwconfig wlan0|grep IEEE\ 802.11)
+elif [ $wifi_wlan1 == "1" ]; then
+ flag=wlan1
+ wlan0=$(iwconfig wlan1|grep IEEE\ 802.11)
+elif [ $wifi_wlan2 == "1" ]; then
+ flag=wlan2
+ wlan0=$(iwconfig wlan2|grep IEEE\ 802.11)
+elif [ $wifi_wlan3 == "1" ]; then
+ flag=wlan3
+ wlan0=$(iwconfig wlan3|grep IEEE\ 802.11)
+fi
+
+wifi_driver_init=${#wlan0}
+check_dual_band=1
+if [ $wifi_driver_init != 0 ]; then
+ echo "Wifi (single band) driver is initialized"
+ while [ $check_dual_band -le 5 ]
+ do
+ echo "checking for dual band support:$check_dual_band"
+ if [ $flag == "wlan0" ]; then
+ wifi_dual_band=1
+ elif [ $flag == "wlan1" ]; then
+ wifi_dual_band=1
+ elif [ $flag == "wlan2" ]; then
+ wifi_dual_band=1
+ elif [ $flag == "wlan3" ]; then
+ wifi_dual_band=1
+ fi
+ echo "$wifi_dual_band"
+ if [ $wifi_dual_band == 1 ]; then
+ break
+ fi
+ check_dual_band=`expr $check_dual_band + 1`
+ sleep 1;
+ done
+ sleep 1;
+ touch /tmp/wifi_driver_initialized
+else
+ echo "Wifi driver is not initialized"
+fi
diff --git a/recipes-ccsp/ccsp/ccsp_common_filogic.inc b/recipes-ccsp/ccsp/ccsp_common_filogic.inc
index c2e0619..88eb483 100644
--- a/recipes-ccsp/ccsp/ccsp_common_filogic.inc
+++ b/recipes-ccsp/ccsp/ccsp_common_filogic.inc
@@ -10,5 +10,7 @@
CFLAGS_append_aarch64 = " -D_64BIT_ARCH_SUPPORT_ "
+LDFLAGS_append = " -lpthread -lcrypto"
+
DEPENDS += "breakpad-wrapper"
LDFLAGS += "-lbreakpadwrapper"
diff --git a/recipes-ccsp/ccsp/files/init-uci-config.service b/recipes-ccsp/ccsp/files/init-uci-config.service
new file mode 100644
index 0000000..c8e732d
--- /dev/null
+++ b/recipes-ccsp/ccsp/files/init-uci-config.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Init UCI wireless config
+DefaultDependencies=no
+Before=onewifi.service
+After=CcspPandMSsp.service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh /usr/ccsp/wifi/mac80211.sh
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/recipes-ccsp/ccsp/files/mac80211.sh b/recipes-ccsp/ccsp/files/mac80211.sh
new file mode 100644
index 0000000..6449516
--- /dev/null
+++ b/recipes-ccsp/ccsp/files/mac80211.sh
@@ -0,0 +1,238 @@
+#!/bin/sh
+
+#append DRIVERS "mac80211"
+
+lookup_phy() {
+ [ -n "$phy" ] && {
+ [ -d /sys/class/ieee80211/$phy ] && return
+ }
+
+ local devpath
+ config_get devpath "$device" path
+ [ -n "$devpath" ] && {
+ phy="$(iwinfo nl80211 phyname "path=$devpath")"
+ [ -n "$phy" ] && return
+ }
+
+ local macaddr="$(config_get "$device" macaddr | tr 'A-Z' 'a-z')"
+ [ -n "$macaddr" ] && {
+ for _phy in /sys/class/ieee80211/*; do
+ [ -e "$_phy" ] || continue
+
+ [ "$macaddr" = "$(cat ${_phy}/macaddress)" ] || continue
+ phy="${_phy##*/}"
+ return
+ done
+ }
+ phy=
+ return
+}
+
+find_mac80211_phy() {
+ local device="$1"
+
+ config_get phy "$device" phy
+ lookup_phy
+ [ -n "$phy" -a -d "/sys/class/ieee80211/$phy" ] || {
+ echo "PHY for wifi device $1 not found"
+ return 1
+ }
+ config_set "$device" phy "$phy"
+
+ config_get macaddr "$device" macaddr
+ [ -z "$macaddr" ] && {
+ config_set "$device" macaddr "$(cat /sys/class/ieee80211/${phy}/macaddress)"
+ }
+
+ return 0
+}
+
+check_mac80211_device() {
+ config_get phy "$1" phy
+ [ -z "$phy" ] && {
+ find_mac80211_phy "$1" >/dev/null || return 0
+ config_get phy "$1" phy
+ }
+ [ "$phy" = "$dev" ] && found=1
+}
+
+
+__get_band_defaults() {
+ local phy="$1"
+
+ ( iw phy "$phy" info; echo ) | awk '
+BEGIN {
+ bands = ""
+}
+
+($1 == "Band" || $1 == "") && band {
+ if (channel) {
+ mode="NOHT"
+ if (ht) mode="HT20"
+ if (vht && band != "1:") mode="VHT80"
+ if (he) mode="HE80"
+ if (he && band == "1:") mode="HE20"
+ sub("\\[", "", channel)
+ sub("\\]", "", channel)
+ bands = bands band channel ":" mode " "
+ }
+ band=""
+}
+
+$1 == "Band" {
+ band = $2
+ channel = ""
+ vht = ""
+ ht = ""
+ he = ""
+}
+
+$0 ~ "Capabilities:" {
+ ht=1
+}
+
+$0 ~ "VHT Capabilities" {
+ vht=1
+}
+
+$0 ~ "HE Iftypes" {
+ he=1
+}
+
+$1 == "*" && $3 == "MHz" && $0 !~ /disabled/ && band && !channel {
+ channel = $4
+}
+
+END {
+ print bands
+}'
+}
+
+get_band_defaults() {
+ local phy="$1"
+
+ for c in $(__get_band_defaults "$phy"); do
+ local band="${c%%:*}"
+ c="${c#*:}"
+ local chan="${c%%:*}"
+ c="${c#*:}"
+ local mode="${c%%:*}"
+
+ case "$band" in
+ 1) band=2g;;
+ 2) band=5g;;
+ 3) band=60g;;
+ 4) band=6g;;
+ *) band="";;
+ esac
+
+ [ -n "$band" ] || continue
+ [ -n "$mode_band" -a "$band" = "6g" ] && return
+
+ mode_band="$band"
+ channel="$chan"
+ htmode="$mode"
+ if [ "$band" = "6g" ]
+ then
+ encryption=sae
+ key=12345678
+ else
+ encryption=none
+ fi
+ done
+}
+
+detect_mac80211() {
+ devidx=0
+ #config_load wireless
+ while :; do
+ #config_get type "radio$devidx" type
+ [ -n "$type" ] || break
+ devidx=$(($devidx + 1))
+ done
+
+ if [ ! -f /etc/config/wireless ]; then
+ mkdir -p /etc/config
+ echo -n > /etc/config/wireless
+ fi
+
+ pcieCheck="$(uci get wireless.radio1.path)"
+ checkpath="$(realpath /sys/class/ieee80211/phy1/device | cut -d/ -f4-)"
+
+ if [[ "$pcieCheck"* != "$checkpath"* ]]; then
+ echo -n > /etc/config/wireless
+ rm /nvram/hostapd*
+ fi
+
+ old_path=""
+ for _dev in /sys/class/ieee80211/*; do
+ [ -e "$_dev" ] || continue
+
+ dev="${_dev##*/}"
+
+ found="$(uci get wireless.radio${devidx})"
+
+
+ if [ "$found" == "wifi-device" ]; then
+ devidx=$(($devidx + 1))
+ continue
+ fi
+
+ mode_band=""
+ channel=""
+ htmode=""
+ ht_capab=""
+
+
+ get_band_defaults "$dev"
+
+ path="$(realpath /sys/class/ieee80211/"$dev"/device | cut -d/ -f4-)"
+ if [ -n "$path" ]; then
+ if [ "$path" == "$old_path" ]; then
+ dev_id="set wireless.radio${devidx}.path='$path'+1"
+ else
+ dev_id="set wireless.radio${devidx}.path='$path'"
+ fi
+ else
+ dev_id="set wireless.radio${devidx}.macaddr=$(cat /sys/class/ieee80211/${dev}/macaddress)"
+ fi
+
+ if [ "$(cat /sys/class/ieee80211/"$dev"/device/device)" == "0x7906" ]; then
+ isMerlin=1
+ fi
+
+ if [ "$mode_band" = "6g" ]; then
+ channel="37"
+ fi
+ setdisable="set wireless.radio${devidx}.disabled=0"
+
+
+ if [ "$isMerlin" == "1" ] && [ "$devidx" == "2" ] && [ "$mode_band" == "2g" ]; then
+ setdisable="set wireless.radio${devidx}.disabled=1"
+ fi
+
+ uci -q batch <<-EOF
+ set wireless.radio${devidx}=wifi-device
+ set wireless.radio${devidx}.type=mac80211
+ ${dev_id}
+ set wireless.radio${devidx}.channel=${channel}
+ set wireless.radio${devidx}.band=${mode_band}
+ set wireless.radio${devidx}.htmode=$htmode
+ ${setdisable}
+ set wireless.default_radio${devidx}=wifi-iface
+ set wireless.default_radio${devidx}.device=radio${devidx}
+ set wireless.default_radio${devidx}.network=lan
+ set wireless.default_radio${devidx}.mode=ap
+ set wireless.default_radio${devidx}.ssid=Filogic_${mode_band}
+ set wireless.default_radio${devidx}.encryption=${encryption}
+EOF
+ [ -n "$key" ] && {
+ uci -q set wireless.default_radio${devidx}.key=${key}
+ }
+ uci -q commit wireless
+
+ devidx=$(($devidx + 1))
+ old_path=$path
+ done
+}
+detect_mac80211
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/files/onewifi_pre_start.sh b/recipes-ccsp/ccsp/files/onewifi_pre_start.sh
new file mode 100644
index 0000000..2d5290b
--- /dev/null
+++ b/recipes-ccsp/ccsp/files/onewifi_pre_start.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+create_hostapdConf() {
+ devidx=0
+ phyidx=0
+ old_path=""
+ pcie7915count=0
+ vap_per_radio=8
+ radio_num="$(iw list | grep Wiphy | wc -l)"
+
+ for _dev in /sys/class/ieee80211/*; do
+ [ -e "$_dev" ] || continue
+
+ dev="${_dev##*/}"
+
+ band="$(uci get wireless.radio${phyidx}.band)"
+ channel="$(uci get wireless.radio${phyidx}.channel)"
+ # Use random MAC to prevent use the same MAC address
+ rand="$(hexdump -C /dev/urandom | head -n 1 | awk '{printf ""$3":"$4""}' &)"
+ killall hexdump
+ MAC="00:0${devidx}:12:34:${rand}"
+ chip="$(cat /sys/class/ieee80211/"$dev"/device/device)"
+
+ if [ $chip == "0x7915" ]; then
+ path="$(realpath /sys/class/ieee80211/"$dev"/device | cut -d/ -f4-)"
+ if [ -n "$path" ]; then
+ if [ "$path" == "$old_path" ] || [ "$old_path" == "" ]; then
+ pcie7915count="1"
+ else
+ pcie7915count="2"
+ fi
+ fi
+ old_path=$path
+ fi
+
+ if [ -e /sys/class/net/wlan$phyidx ]; then
+ iw wlan$phyidx del > /dev/null
+ fi
+
+ if [ "$(uci get wireless.radio${phyidx}.disabled)" == "1" ]; then
+ phyidx=$(($phyidx + 1))
+ continue
+ fi
+ if [ "$band" == "2g" ]; then
+ iw phy phy$phyidx interface add wifi0 type __ap > /dev/null
+ fi
+ if [ "$band" == "5g" ]; then
+ iw phy phy$phyidx interface add wifi1 type __ap > /dev/null
+ fi
+ if [ "$band" == "6g" ]; then
+ iw phy phy$phyidx interface add wifi2 type __ap > /dev/null
+ fi
+ #iw phy phy$phyidx interface add wifi$devidx type __ap > /dev/null
+ #touch /tmp/$dev-wifi$devidx
+ devidx=$(($devidx + 1))
+ phyidx=$(($phyidx + 1))
+
+ done
+}
+#Creating files for tracking AssociatedDevices
+touch /tmp/AllAssociated_Devices_2G.txt
+touch /tmp/AllAssociated_Devices_5G.txt
+
+#Create wps pin request log file
+touch /var/run/hostapd_wps_pin_requests.log
+
+
+create_hostapdConf
+
+exit 0
diff --git a/recipes-ccsp/hal/files/0001-filogic-platform-support.patch b/recipes-ccsp/hal/files/0001-filogic-platform-support.patch
new file mode 100644
index 0000000..4735fde
--- /dev/null
+++ b/recipes-ccsp/hal/files/0001-filogic-platform-support.patch
@@ -0,0 +1,343 @@
+From 26ae462db9f0ad61ff3199412d7a4455259682eb Mon Sep 17 00:00:00 2001
+From: Rex Lu <rex.lu@mediatek.com>
+Date: Wed, 29 May 2024 11:16:08 +0800
+Subject: [PATCH] filogic platform support
+
+---
+ platform/mtk-filogic/platform_filogic.c | 206 ++++++++++++++++++++++++
+ src/Makefile.am | 4 +
+ src/configure.ac | 1 +
+ src/wifi_hal_nl80211_utils.c | 36 ++++-
+ src/wifi_hal_priv.h | 8 +-
+ 5 files changed, 250 insertions(+), 5 deletions(-)
+ create mode 100644 platform/mtk-filogic/platform_filogic.c
+
+diff --git a/platform/mtk-filogic/platform_filogic.c b/platform/mtk-filogic/platform_filogic.c
+new file mode 100644
+index 0000000..0d09599
+--- /dev/null
++++ b/platform/mtk-filogic/platform_filogic.c
+@@ -0,0 +1,206 @@
++#include <stddef.h>
++#include <string.h>
++#include <stdlib.h>
++#include "wifi_hal_priv.h"
++#include "wifi_hal.h"
++
++int platform_pre_init()
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_post_init(wifi_vap_info_map_t *vap_map)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ system("brctl addif brlan0 wifi0");
++ system("brctl addif brlan0 wifi1");
++ system("brctl addif brlan0 wifi2");
++ return 0;
++}
++
++
++int platform_set_radio(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_set_radio_pre_init(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_create_vap(wifi_radio_index_t index, wifi_vap_info_map_t *map)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int nvram_get_vap_enable_status(bool *vap_enable, int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int nvram_get_current_security_mode(wifi_security_modes_t *security_mode,int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_get_keypassphrase_default(char *password, int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ /*password is not sensitive,won't grant access to real devices*/
++ strcpy(password,"12345678");
++ return 0;
++}
++
++int platform_get_ssid_default(char *ssid, int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ sprintf(ssid,"filogic-onewifi%d",vap_index);
++ return 0;
++}
++
++int platform_get_wps_pin_default(char *pin)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ /* dummy pin value */
++ strcpy(pin,"45276453");
++ return 0;
++}
++
++int platform_wps_event(wifi_wps_event_t data)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_get_country_code_default(char *code)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ strcpy(code,"US");
++ return 0;
++}
++
++int nvram_get_current_password(char *l_password, int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ /*password is not sensitive,won't grant access to real devices*/
++ strcpy(l_password,"12345678");
++ return 0;
++}
++
++int nvram_get_current_ssid(char *l_ssid, int vap_index)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ sprintf(l_ssid,"filogic-onewifi%d",vap_index);
++ return 0;
++}
++
++int platform_pre_create_vap(wifi_radio_index_t index, wifi_vap_info_map_t *map)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_flags_init(int *flags)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_get_aid(void* priv, u16* aid, const u8* addr)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_free_aid(void* priv, u16* aid)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_sync_done(void* priv)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_get_channel_bandwidth(wifi_radio_index_t index, wifi_channelBandwidth_t *channelWidth)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_update_radio_presence(void)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int nvram_get_mgmt_frame_power_control(int vap_index, int* output_dbm)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_set_txpower(void* priv, uint txpower)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++int platform_get_radius_key_default(char *radius_key)
++{
++ wifi_hal_dbg_print("%s:%d \n",__func__,__LINE__);
++ return 0;
++}
++
++INT wifi_setRadioDfsAtBootUpEnable(INT radioIndex, BOOL enabled)
++{
++ return RETURN_OK;
++}
++INT wifi_setApMacAddressControlMode(INT apIndex, INT filterMode)
++{
++ return RETURN_OK;
++}
++INT wifi_setApManagementFramePowerControl(INT wlanIndex, INT ManagementFramePowerControl)
++{
++ return RETURN_OK;
++}
++
++int platform_get_acl_num(int vap_index, uint *acl_count)
++{
++ return 0;
++}
++
++int platform_get_vendor_oui(char *vendor_oui, int vendor_oui_len)
++{
++ return -1;
++}
++
++int platform_set_neighbor_report(uint index, uint add, mac_address_t mac)
++{
++ return 0;
++}
++
++int platform_get_radio_phytemperature(wifi_radio_index_t index,
++ wifi_radioTemperature_t *radioPhyTemperature)
++{
++ return 0;
++}
++
++int wifi_setQamPlus(void *priv)
++{
++ return 0;
++}
++
++int wifi_setApRetrylimit(void *priv)
++{
++ return 0;
++}
+\ No newline at end of file
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 055bb1d..5974ed1 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -104,6 +104,10 @@ librdk_wifihal_la_CPPFLAGS += -I$(top_srcdir)/../platform/raspberry-pi
+ librdk_wifihal_la_SOURCES += ../platform/raspberry-pi/platform_pi.c
+ endif
+
++if MTK_FILOGIC
++librdk_wifihal_la_CPPFLAGS += -I$(top_srcdir)/../platform/mtk-filogic
++librdk_wifihal_la_SOURCES += ../platform/mtk-filogic/platform_filogic.c
++endif
+ include_HEADERS = wifi_hal_rdk.h wifi_hal_rdk_framework.h ieee80211.h ../util_crypto/aes_siv.h
+
+ if ONE_WIFIBUILD
+diff --git a/src/configure.ac b/src/configure.ac
+index f1ca7d2..03c4d97 100644
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -52,6 +52,7 @@ AM_CONDITIONAL([SCXER10_PORT], [test "x$SCXER10_PORT" = "xtrue"])
+ AM_CONDITIONAL([SKYSR213_PORT], [test "x$SKYSR213_PORT" = "xtrue"])
+ AM_CONDITIONAL([CMXB7_PORT], [test "x$CMXB7_PORT" = "xtrue"])
+ AM_CONDITIONAL([HAL_IPC], [test "x$HAL_IPC" = "xtrue"])
++AM_CONDITIONAL([MTK_FILOGIC], [test "x$MTK_FILOGIC" = "xtrue"])
+
+ AC_PREFIX_DEFAULT(`pwd`)
+ AC_ENABLE_SHARED
+diff --git a/src/wifi_hal_nl80211_utils.c b/src/wifi_hal_nl80211_utils.c
+index 02251a3..da9dc33 100644
+--- a/src/wifi_hal_nl80211_utils.c
++++ b/src/wifi_hal_nl80211_utils.c
+@@ -285,6 +285,10 @@ wifi_interface_name_idex_map_t interface_index_map[] = {
+ #endif
+
+ // for Intel based platforms
++#ifdef MTK_FILOGIC
++ {0, 0, "wifi0", "brlan0", 0, 0, "private_ssid_2g"},
++ {1, 1, "wifi1", "brlan0", 0, 1, "private_ssid_5g"},
++#endif
+ };
+
+ static radio_interface_mapping_t l_radio_interface_map[] = {
+@@ -331,6 +335,10 @@ static radio_interface_mapping_t l_radio_interface_map[] = {
+ { 0, 0, "radio1", "wlan0"},
+ { 1, 1, "radio2", "wlan1"},
+ #endif
++#ifdef MTK_FILOGIC
++ { 0, 0, "radio1", "wifi0"},
++ { 1, 1, "radio2", "wifi1"},
++#endif
+ };
+
+ const wifi_driver_info_t driver_info = {
+@@ -614,7 +622,33 @@ const wifi_driver_info_t driver_info = {
+ platform_set_neighbor_report,
+ platform_get_radio_phytemperature,
+ #endif
+-
++#ifdef MTK_FILOGIC
++ "filogic",
++ "cfg80211",
++ {"Filogic Wireless Gateway","Filogic","Filogic","Filogic","Model Description","Model URL","267","WPS Access Point","Manufacturer URL"},
++ platform_pre_init,
++ platform_post_init,
++ platform_set_radio,
++ platform_set_radio_pre_init,
++ platform_pre_create_vap,
++ platform_create_vap,
++ platform_get_ssid_default,
++ platform_get_keypassphrase_default,
++ platform_get_radius_key_default,
++ platform_get_wps_pin_default,
++ platform_get_country_code_default,
++ platform_wps_event,
++ platform_flags_init,
++ platform_get_aid,
++ platform_free_aid,
++ platform_sync_done,
++ platform_update_radio_presence,
++ platform_set_txpower,
++ platform_get_acl_num,
++ platform_get_vendor_oui,
++ platform_set_neighbor_report,
++ platform_get_radio_phytemperature,
++#endif
+ };
+
+ static struct wifiCountryEnumStrMap wifi_country_map[] =
+diff --git a/src/wifi_hal_priv.h b/src/wifi_hal_priv.h
+index abdfe12..a1b173b 100644
+--- a/src/wifi_hal_priv.h
++++ b/src/wifi_hal_priv.h
+@@ -177,16 +177,16 @@ extern "C" {
+ #define MAX_CHANNEL_2G 11
+
+ /* 5GHz radio */
+-#define MIN_FREQ_MHZ_5G 5180
+-#define MAX_FREQ_MHZ_5G 5825
++#define MIN_FREQ_MHZ_5G 4920
++#define MAX_FREQ_MHZ_5G 5885
+ #define MIN_CHANNEL_5G 36
+-#define MAX_CHANNEL_5G 165
++#define MAX_CHANNEL_5G 177
+
+ /* 6GHz radio */
+ #define MIN_FREQ_MHZ_6G 5935
+ #define MAX_FREQ_MHZ_6G 7115
+ #define MIN_CHANNEL_6G 1
+-#define MAX_CHANNEL_6G 229
++#define MAX_CHANNEL_6G 233
+
+ #define MAX_WPS_CONN_TIMEOUT 120
+
+--
+2.18.0
+
diff --git a/recipes-ccsp/hal/files/0002-fix-5G-and-6G-connect-fail.patch b/recipes-ccsp/hal/files/0002-fix-5G-and-6G-connect-fail.patch
new file mode 100644
index 0000000..de76551
--- /dev/null
+++ b/recipes-ccsp/hal/files/0002-fix-5G-and-6G-connect-fail.patch
@@ -0,0 +1,341 @@
+From 12d23aa04385369d86468d080b114a82ef8a3b38 Mon Sep 17 00:00:00 2001
+From: Rex Lu <rex.lu@mediatek.com>
+Date: Wed, 29 May 2024 14:08:06 +0800
+Subject: [PATCH] fix 5G and 6G connect fail
+
+---
+ src/wifi_hal_hostapd.c | 20 +++---------------
+ src/wifi_hal_nl80211.c | 39 +++++++++---------------------------
+ src/wifi_hal_nl80211_utils.c | 20 ++++++++++++++++--
+ 3 files changed, 30 insertions(+), 49 deletions(-)
+
+diff --git a/src/wifi_hal_hostapd.c b/src/wifi_hal_hostapd.c
+index 7921406..96f1f56 100644
+--- a/src/wifi_hal_hostapd.c
++++ b/src/wifi_hal_hostapd.c
+@@ -1397,7 +1397,6 @@ int update_hostap_iface(wifi_interface_info_t *interface)
+ */
+ #endif
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ iface->drv_flags = radio->driver_data.capa.flags;
+ //iface->drv_flags |= WPA_DRIVER_FLAGS_INACTIVITY_TIMER;
+ iface->drv_flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
+@@ -1435,20 +1434,7 @@ int update_hostap_iface(wifi_interface_info_t *interface)
+ iface->extended_capa = radio->driver_data.extended_capa;
+ iface->extended_capa_mask = radio->driver_data.extended_capa_mask;
+ iface->extended_capa_len = radio->driver_data.extended_capa_len;
+-#else
+- iface->drv_flags = WPA_DRIVER_FLAGS_INACTIVITY_TIMER;
+- iface->drv_flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
+- iface->drv_flags |= WPA_DRIVER_FLAGS_AP_MLME;
+- iface->drv_flags |= WPA_DRIVER_FLAGS_AP_CSA;
+- // XXX: Such ability should be retrieved during NL80211_CMD_GET_WIPHY
+- if (g_wifi_hal.platform_flags & PLATFORM_FLAGS_PROBE_RESP_OFFLOAD) {
+- iface->drv_flags |= WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD;
+- }
+
+- if (iface->current_mode->vht_capab & VHT_CAP_SUPP_CHAN_WIDTH_160MHZ) {
+- iface->conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
+- }
+-#endif // CMXB7_PORT && VNTXER5_PORT
+ if(preassoc_supp_rates) {
+ os_free(preassoc_supp_rates);
+ preassoc_supp_rates = NULL;
+@@ -1669,14 +1655,14 @@ int update_hostap_config_params(wifi_radio_info_t *radio)
+ }
+
+ if (param->variant & WIFI_80211_VARIANT_AX) {
+- if (param->band == WIFI_FREQUENCY_5_BAND) {
++ if (param->band == WIFI_FREQUENCY_5_BAND || param->band == WIFI_FREQUENCY_6_BAND) {
+ iconf->hw_mode = HOSTAPD_MODE_IEEE80211A;
+ iconf->ieee80211ac = 1;
+ } else {
+ iconf->hw_mode = HOSTAPD_MODE_IEEE80211G;
+ }
+ iconf->ieee80211ax = 1;
+- //iconf->ieee80211n = 1;
++ iconf->ieee80211n = 1;
+ //iconf->require_ht = 1;
+ //iconf->require_vht = 1;
+ }
+@@ -1733,7 +1719,7 @@ int update_hostap_config_params(wifi_radio_info_t *radio)
+ }
+ #endif
+ iconf->vht_oper_chwidth = bandwidth;
+-
++ iconf->op_class = param->op_class;
+ //validate_config_params
+ if (hostapd_config_check(iconf, 1) < 0) {
+ pthread_mutex_unlock(&g_wifi_hal.hapd_lock);
+diff --git a/src/wifi_hal_nl80211.c b/src/wifi_hal_nl80211.c
+index dd5da8b..4d27e45 100644
+--- a/src/wifi_hal_nl80211.c
++++ b/src/wifi_hal_nl80211.c
+@@ -57,7 +57,6 @@ struct family_data {
+ int id;
+ };
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ struct phy_info_arg {
+ u16 *num_modes;
+ struct hostapd_hw_modes *modes;
+@@ -65,7 +64,6 @@ struct phy_info_arg {
+ int failed;
+ u8 dfs_domain;
+ };
+-#endif
+
+ void prepare_interface_fdset(wifi_hal_priv_t *priv)
+ {
+@@ -2540,7 +2538,6 @@ skip: found = 0;
+ return mode;
+ }
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
+ enum ieee80211_op_mode opmode,
+ struct nlattr **tb, struct nlattr **tb_flags)
+@@ -2548,9 +2545,7 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
+ enum nl80211_iftype iftype;
+ size_t len;
+ struct he_capabilities *he_capab = &mode->he_capab[opmode];
+-#ifdef CMXB7_PORT
+ struct eht_capabilities *eht_capab = &mode->eht_capab[opmode];
+-#endif // CMXB7_PORT
+
+ switch (opmode) {
+ case IEEE80211_MODE_INFRA:
+@@ -2623,7 +2618,6 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
+ len);
+ }
+
+-#ifdef CMXB7_PORT
+ if (tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]) {
+ u16 capa;
+
+@@ -2676,7 +2670,6 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
+ nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]),
+ len);
+ }
+-#endif // CMXB7_PORT
+ }
+
+ static int wiphy_info_iface_comb_process(wifi_radio_info_t *radio,
+@@ -2835,7 +2828,6 @@ static unsigned int get_akm_suites_info(struct nlattr *tb)
+ return key_mgmt;
+ }
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ static void get_iface_akm_suites_info(wifi_radio_info_t *radio,
+ struct nlattr *nl_akms)
+ {
+@@ -2900,7 +2892,6 @@ static void get_iface_akm_suites_info(wifi_radio_info_t *radio,
+ key_mgmt);
+ }
+ }
+-#endif // CMXB7_PORT && VNTXER5_PORT
+
+ static void wiphy_info_feature_flags(wifi_radio_info_t *radio,
+ struct nlattr *tb)
+@@ -3038,12 +3029,12 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
+ NL80211_EXT_FEATURE_BEACON_RATE_VHT)) {
+ capa->flags |= WPA_DRIVER_FLAGS_BEACON_RATE_VHT;
+ }
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
++
+ if (ext_feature_isset(ext_features, len,
+ NL80211_EXT_FEATURE_BEACON_RATE_HE)) {
+ capa->flags2 |= WPA_DRIVER_FLAGS2_BEACON_RATE_HE;
+ }
+-#endif // CMXB7_PORT
++
+ if (ext_feature_isset(ext_features, len,
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL)) {
+ capa->rrm_flags |= WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL;
+@@ -3106,7 +3097,7 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
+ capa->flags |= WPA_DRIVER_FLAGS_OCE_STA;
+ }
+ #endif /* CONFIG_MBO */
+-#if defined CMXB7_PORT || defined(VNTXER5_PORT)
++
+ if (ext_feature_isset(ext_features, len,
+ NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER)) {
+ capa->flags |= WPA_DRIVER_FLAGS_FTM_RESPONDER;
+@@ -3172,7 +3163,7 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
+ NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION)) {
+ capa->flags2 |= WPA_DRIVER_FLAGS2_OCV;
+ }
+-#endif // CMXB7_PORT
++
+ /* XXX: is not present in nl80211_copy.h, maybe needs to be fixed
+ if (ext_feature_isset(ext_features, len,
+ NL80211_EXT_FEATURE_RADAR_BACKGROUND)) {
+@@ -3348,7 +3339,6 @@ static int phy_info_iftype(struct hostapd_hw_modes *mode,
+
+ return NL_OK;
+ }
+-#endif
+
+ static int phy_info_band(wifi_radio_info_t *radio, struct nlattr *nl_band)
+ {
+@@ -3460,9 +3450,7 @@ static int regulatory_domain_set_info_handler(struct nl_msg *msg, void *arg)
+ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+ {
+ wifi_radio_info_t *radio;
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ struct wpa_driver_capa *capa;
+-#endif // CMXB7_PORT && VNTXER5_PORT
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh;
+ //unsigned int *cmd;
+@@ -3479,14 +3467,12 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+
+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL);
+
+-#if !defined(VNTXER5_PORT)
+ for (j = 0; j < g_wifi_hal.num_radios; j++)
+ {
+ if (strcmp(g_wifi_hal.radio_info[j].name, nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])) == 0) {
+ return NL_SKIP;
+ }
+ }
+-#endif
+
+ phy_index = nla_get_u32(tb[NL80211_ATTR_WIPHY]);
+ rdk_radio_index = get_rdk_radio_index(phy_index);
+@@ -3525,7 +3511,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+ if (tb[NL80211_ATTR_WIPHY_NAME]) {
+ strcpy(radio->name, nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
+ }
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
++
+ capa = &radio->driver_data.capa;
+
+ if (tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]) {
+@@ -3691,7 +3677,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+ wifi_hal_info_print("%s:%d: nl80211: wiphy supported key_mgmt 0x%x\n", __func__, __LINE__,
+ capa->key_mgmt);
+ }
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
++
+ if (tb[NL80211_ATTR_IFTYPE_AKM_SUITES]) {
+ struct nlattr *nl_if;
+ int rem_if;
+@@ -3699,7 +3685,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+ nla_for_each_nested(nl_if, tb[NL80211_ATTR_IFTYPE_AKM_SUITES], rem_if)
+ get_iface_akm_suites_info(radio, nl_if);
+ }
+-#endif // CMXB7_PORT && VNTXER5_PORT
++
+ if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK]) {
+ wifi_hal_info_print("%s:%d: nl80211: Using driver-based off-channel TX\n", __func__, __LINE__);
+ capa->flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_TX;
+@@ -3787,7 +3773,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
+ if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG]) {
+ capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY;
+ }
+-#endif // CMXB7_PORT && VNTXER5_PORT
++
+ if (tb[NL80211_ATTR_WDEV]) {
+ radio->dev_id = nla_get_u64(tb[NL80211_ATTR_WDEV]);
+ }
+@@ -4024,7 +4010,6 @@ static int interface_info_handler(struct nl_msg *msg, void *arg)
+ return NL_SKIP;
+ }
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ static int phy_info_rates_get_hw_features(struct hostapd_hw_modes *mode, struct nlattr *tb)
+ {
+ static struct nla_policy rate_policy[NL80211_BITRATE_ATTR_MAX + 1] = {
+@@ -4067,7 +4052,6 @@ static int phy_info_rates_get_hw_features(struct hostapd_hw_modes *mode, struct
+
+ return NL_OK;
+ }
+-#endif
+
+ static int phy_info_handler(struct nl_msg *msg, void *arg)
+ {
+@@ -4470,7 +4454,6 @@ int init_nl80211()
+ for (i = 0; i < g_wifi_hal.num_radios; i++) {
+ radio = &g_wifi_hal.radio_info[i];
+
+-#ifdef CMXB7_PORT
+ if (radio->driver_data.auth_supported) {
+ radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_SME;
+ }
+@@ -4518,7 +4501,7 @@ int init_nl80211()
+ if (radio->driver_data.update_ft_ies_supported) {
+ radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_UPDATE_FT_IES;
+ }
+-#endif
++
+ // initialize the interface map
+ radio->interface_map = hash_map_create();
+
+@@ -8513,7 +8496,6 @@ fail:
+ return ret;
+ }
+
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ static int cw2ecw(unsigned int cw)
+ {
+ int bit;
+@@ -9366,12 +9348,10 @@ static int nl80211_set_regulatory_flags(struct phy_info_arg *results)
+
+ return nl80211_send_and_recv(msg, nl80211_get_reg, results, NULL, NULL);
+ }
+-#endif
+
+ struct hostapd_hw_modes *
+ wifi_drv_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs_domain)
+ {
+-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+ struct nl_msg *msg;
+ struct phy_info_arg result = {
+ .num_modes = num_modes,
+@@ -9426,7 +9406,6 @@ wifi_drv_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs_dom
+ nl80211_dump_chan_list(modes, *num_modes);
+ return modes;
+ }
+-#endif
+ return NULL;
+ }
+
+diff --git a/src/wifi_hal_nl80211_utils.c b/src/wifi_hal_nl80211_utils.c
+index da9dc33..b524ecd 100644
+--- a/src/wifi_hal_nl80211_utils.c
++++ b/src/wifi_hal_nl80211_utils.c
+@@ -1825,11 +1825,27 @@ int get_op_class_from_radio_params(wifi_radio_operationParam_t *param)
+
+ #if HOSTAPD_VERSION >= 210 //2.10
+ if (param->band == WIFI_FREQUENCY_6_BAND) {
+- int freq, global_op_class = -1;
++ int freq, idx, global_op_class = -1;
+
+ freq = (param->channel == 2) ? 5935 : (5950 + (param->channel * 5));
+ if (is_6ghz_freq(freq)) {
+- global_op_class = 131 + center_idx_to_bw_6ghz(param->channel);
++ switch (param->channelWidth) {
++ case WIFI_CHANNELBANDWIDTH_40MHZ:
++ idx = 1;
++ break;
++ case WIFI_CHANNELBANDWIDTH_80MHZ:
++ idx = 2;
++ break;
++ case WIFI_CHANNELBANDWIDTH_160MHZ:
++ idx = 3;
++ break;
++ case WIFI_CHANNELBANDWIDTH_20MHZ:
++ default:
++ idx = 0;
++ break;
++ }
++
++ global_op_class = 131 + idx;
+ }
+ return global_op_class;
+ }
+--
+2.18.0
+
diff --git a/recipes-ccsp/hal/files/sta-network.patch b/recipes-ccsp/hal/files/sta-network.patch
new file mode 100644
index 0000000..48f3192
--- /dev/null
+++ b/recipes-ccsp/hal/files/sta-network.patch
@@ -0,0 +1,113 @@
+From 68113170930788e52f8fa6089a2882dc28f5693f Mon Sep 17 00:00:00 2001
+From: Simon Chung <simon.c.chung@accenture.com>
+Date: Thu, 2 Sep 2021 15:44:57 +0100
+Subject: [PATCH] sta-network
+
+Change-Id: Idaae3038a352e94d1f2810a8d73b7f77c8e47309
+---
+ wifi_hal.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 91 insertions(+)
+
+diff --git a/wifi_hal.h b/wifi_hal.h
+index 579418e..d284af4 100644
+--- a/wifi_hal.h
++++ b/wifi_hal.h
+@@ -110,4 +110,95 @@
+ * APIs to be deprecated. Not add new function or structure!
+ */
+ #include "wifi_hal_deprecated.h"
++
++/* DRAFT FOR CLIENT API */
++
++
++/* APPROACH 1*/
++typedef enum wifi_sta_network_flags {
++ WIFI_STA_NET_F_OPEN,
++ WIFI_STA_NET_F_PSK1,
++ WIFI_STA_NET_F_PSK2,WIFI_STA_NET_F_PSK_FT,
++ WIFI_STA_NET_F_AES,
++ WIFI_STA_NET_F_TKIP,
++ WIFI_STA_NET_F_4ADDR_MULTI_AP, /* future: easymesh's wds */
++ WIFI_STA_NET_F_OWE, /* future: opportunistic wireless encryption */
++ WIFI_STA_NET_F_SAE, /* future: wpa3 */
++} wifi_sta_network_flags_t;
++typedef enum wifi_sta_multi_ap_flag {
++ WIFI_STA_MULTI_AP_NOT_SUPPORTED,
++ WIFI_STA_MULTI_AP_NONE,
++ WIFI_STA_MULTI_AP_BHAUL_STA,
++} wifi_sta_multi_ap_flag_t;
++
++
++typedef struct wifi_sta_network {
++ int id;
++ char bridge[16]; /* valid for 4addr_multi_ap */
++ char ssid[32];
++ char psk[128];
++ char bssid[6]; /* 00:00:00:00:00:00 means any */
++ size_t ssid_len;
++ size_t psk_len;
++ int multi_ap;
++ char pairwise[64];
++ char proto[64];
++ char key_mgmt[64];
++ unsigned long flags; /* enum wifi_sta_network_flags */
++} wifi_sta_network_t;
++
++typedef struct wifi_sta_network_state {
++ struct wifi_sta_network desired_network;
++ char current_bssid[6]; /* 00:00:00:00:00:00 means disconnected */
++ int last_deauth_reason;
++ int last_disassoc_reason;
++} wifi_sta_network_state_t;
++
++typedef void (*wifi_sta_network_cb)(INT radioIndex, void *ctx);
++INT wifi_setStaNetwork(INT radioIndex, const wifi_sta_network_t *network);
++INT wifi_setStaNetworkSetEventCallback(INT radioIndex, wifi_sta_network_cb *cb, void *ctx);
++INT wifi_getStaNetworkState(INT radioIndex, wifi_sta_network_state_t *state);
++INT wifi_getStaNetworkCapabilities(INT radioIndex, INT *flags);
++
++/* APPROACH 2 */
++typedef struct {
++ CHAR ssid[33];
++ CHAR bssid[17];
++ CHAR passphrase[65];
++} wifi_staNetwork_t;
++
++INT wifi_getSTANetworks(INT apIndex, wifi_sta_network_t **out_staNetworks_array, INT out_array_size, BOOL *out_scan_cur_freq);
++
++INT wifi_setSTANetworks(INT apIndex, wifi_sta_network_t **staNetworks_array, INT array_size, BOOL scan_cur_freq);
++
++INT wifi_delSTANetworks(INT apIndex);
++
++
++/* notdefined approach */
++INT wifi_getSTANumberOfEntries(ULONG *output);
++INT wifi_getSTARadioIndex(INT ssidIndex, INT *radioIndex);
++INT wifi_getSTAName(INT apIndex, CHAR *output_string);
++INT wifi_getSTABSSID(INT ssidIndex, CHAR *output_string);
++INT wifi_getSTASSID(INT ssidIndex, CHAR *output_string);
++INT wifi_getSTAMAC(INT ssidIndex, CHAR *output_string);
++INT wifi_getSTAEnabled(INT ssidIndex, BOOL *enabled);
++INT wifi_setSTAEnabled(INT ssidIndex, BOOL enabled);
++
++typedef struct _wifi_client_associated_dev
++{
++ UCHAR MACAddress[6]; /**< The MAC address of an associated device. */
++ INT NetworkID; /**< Network ID */
++ INT connected; /**< If network is connected */
++ INT reason;
++ INT locally_generated;
++} wifi_client_associated_dev_t;
++
++typedef INT ( * wifi_client_event_callback)(INT apIndex, wifi_client_associated_dev_t *state);
++
++void wifi_client_event_callback_register(wifi_client_event_callback callback_proc);
++INT wifi_getApChannel(INT radioIndex,ULONG *output_ulong); //RDKB
++
++INT wifi_setApChannel(INT radioIndex, ULONG channel); //RDKB //AP only
++
++
+ #endif
+--
+2.28.0
+
diff --git a/recipes-ccsp/hal/hal-wifi-generic_git.bbappend b/recipes-ccsp/hal/hal-wifi-generic_git.bbappend
new file mode 100644
index 0000000..a140ae5
--- /dev/null
+++ b/recipes-ccsp/hal/hal-wifi-generic_git.bbappend
@@ -0,0 +1,33 @@
+SRC_URI_append = " \
+ ${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/hal;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/source/wifi/devices_rpi;name=wifihal-raspberrypi \
+"
+
+SRCREV_wifihal-raspberrypi = "${AUTOREV}"
+
+DEPENDS +=" libev wpa-supplicant"
+DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', ' rdk-wifi-hal', '', d)}"
+LDFLAGS_append = " -lev -lwpa_client -lpthread"
+
+do_configure_prepend(){
+ rm ${S}/wifi_hal.c
+ rm ${S}/Makefile.am
+ ln -sf ${S}/devices_rpi/source/wifi/wifi_hal.c ${S}/wifi_hal.c
+ ln -sf ${S}/devices_rpi/source/wifi/client_wifi_hal.c ${S}/client_wifi_hal.c
+ ln -sf ${S}/devices_rpi/source/wifi/wifi_hostapd_interface.c ${S}/wifi_hostapd_interface.c
+ ln -sf ${S}/devices_rpi/source/wifi/rpi_wifi_hal_assoc_devices_details.c ${S}/rpi_wifi_hal_assoc_devices_details.c
+ ln -sf ${S}/devices_rpi/source/wifi/rpi_wifi_hal_version_3.c ${S}/rpi_wifi_hal_version_3.c
+ ln -sf ${S}/devices_rpi/source/wifi/wifi_hal_rpi.h ${S}/wifi_hal_rpi.h
+ ln -sf ${S}/devices_rpi/source/wifi/Makefile.am ${S}/Makefile.am
+}
+
+do_install_append(){
+ install -d ${D}/usr/bin
+ install -m 777 ${B}/wifihal ${D}/usr/bin/
+}
+
+CFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'extender', '-D_RPI_EXTENDER_', '', d)}"
+CFLAGS_append = " -DWIFI_HAL_VERSION_3 "
+CFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', ' -D_ONE_WIFI_ ', '', d)}"
+
+RDEPENDS_${PN} += "wpa-supplicant"
+
diff --git a/recipes-ccsp/hal/halinterface.bbappend b/recipes-ccsp/hal/halinterface.bbappend
new file mode 100644
index 0000000..48f25d4
--- /dev/null
+++ b/recipes-ccsp/hal/halinterface.bbappend
@@ -0,0 +1,16 @@
+ALLOW_EMPTY_${PN} = "1"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI += "file://sta-network.patch;apply=no"
+
+#This is workaround for missing do_patch when RDK uses external sources
+do_rpi_patches() {
+ cd ${S}
+ if [ ! -e patch_applied ]; then
+ patch -p1 < ${WORKDIR}/sta-network.patch
+ touch patch_applied
+ fi
+}
+addtask rpi_patches after do_unpack before do_compile
+
+CFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'halVersion3', ' -DWIFI_HAL_VERSION_3 ', '', d)}"
diff --git a/recipes-ccsp/hal/rdk-wifi-hal.bbappend b/recipes-ccsp/hal/rdk-wifi-hal.bbappend
new file mode 100644
index 0000000..34faa7b
--- /dev/null
+++ b/recipes-ccsp/hal/rdk-wifi-hal.bbappend
@@ -0,0 +1,23 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+ file://0001-filogic-platform-support.patch;apply=no \
+ file://0002-fix-5G-and-6G-connect-fail.patch;apply=no \
+"
+
+
+do_filogic_patches() {
+ cd ${WORKDIR}/git
+ if [ ! -e patch_applied ]; then
+ patch -p1 < ${WORKDIR}/0001-filogic-platform-support.patch
+ patch -p1 < ${WORKDIR}/0002-fix-5G-and-6G-connect-fail.patch
+ touch patch_applied
+ fi
+}
+addtask filogic_patches after do_unpack before do_compile
+
+CFLAGS_append = " -DMTK_FILOGIC -DCONFIG_MBO"
+CFLAGS_append_kirkstone = " -fcommon"
+EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', ' ONE_WIFIBUILD=true ', '', d)}"
+EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', ' MTK_FILOGIC=true ', '', d)}"
+
diff --git a/recipes-ccsp/rdk-wifi-libhostap/files/Rpi_rdkwifilibhostap_changes.patch b/recipes-ccsp/rdk-wifi-libhostap/files/Rpi_rdkwifilibhostap_changes.patch
new file mode 100644
index 0000000..0c1a156
--- /dev/null
+++ b/recipes-ccsp/rdk-wifi-libhostap/files/Rpi_rdkwifilibhostap_changes.patch
@@ -0,0 +1,25 @@
+--- git/source/hostap-2.10/src/ap/drv_callbacks.c 2023-06-08 11:27:27.645895606 +0000
++++ git/source/hostap-2.10/src/ap/drv_callbacks.c 2023-06-08 11:26:49.786465276 +0000
+@@ -772,6 +772,9 @@
+ wpa_auth_sm_event(sta->wpa_sm, WPA_DISASSOC);
+ sta->acct_terminate_cause = RADIUS_ACCT_TERMINATE_CAUSE_USER_REQUEST;
+ ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
++#ifdef _PLATFORM_RASPBERRYPI_
++ hostapd_drv_sta_disassoc(hapd, sta->addr, WLAN_REASON_DISASSOC_STA_HAS_LEFT);
++#endif
+ ap_free_sta(hapd, sta);
+ }
+
+--- git/source/hostap-2.10/src/ap/hostapd.c 2023-06-10 18:14:04.381530228 +0000
++++ git/source/hostap-2.10/src/ap/hostapd.c 2023-06-10 18:14:25.597262764 +0000
+@@ -3321,6 +3321,10 @@
+ * been authorized. */
+ if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) {
+ ap_sta_set_authorized(hapd, sta, 1);
++#ifdef _PLATFORM_RASPBERRYPI_
++ /*When Station is connected with OPEN Mode, need to authorize the station */
++ hostapd_set_authorized(hapd, sta, 1);
++#endif
+ os_get_reltime(&sta->connected_time);
+ accounting_sta_start(hapd, sta);
+ }
diff --git a/recipes-ccsp/rdk-wifi-libhostap/files/fixed_6G_wrong_freq.patch b/recipes-ccsp/rdk-wifi-libhostap/files/fixed_6G_wrong_freq.patch
new file mode 100644
index 0000000..8ab4a59
--- /dev/null
+++ b/recipes-ccsp/rdk-wifi-libhostap/files/fixed_6G_wrong_freq.patch
@@ -0,0 +1,21 @@
+diff --git a/source/hostap-2.10/src/common/ieee802_11_common.c b/source/hostap-2.10//src/common/ieee802_11_common.c
+index 18bdd5d17..bb83b99a4 100644
+--- a/source/hostap-2.10/src/common/ieee802_11_common.c
++++ b/source/hostap-2.10/src/common/ieee802_11_common.c
+@@ -1476,13 +1476,11 @@ static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan)
+ case 135: /* UHB channels, 80+80 MHz: 7, 23, 39.. */
+ if (chan < 1 || chan > 233)
+ return -1;
+-#ifndef CONFIG_DRIVER_BRCM
+- return 5940 + chan * 5;
+-#else
++
+ /* New 6GHz channelization - May 2020 */
+ if (chan == 2) return 5935;
+- else return 5950 + chan * 5;
+-#endif /* CONFIG_DRIVER_BRCM */
++
++ return 5950 + chan * 5;
+ case 136: /* UHB channels, 20 MHz: 2 */
+ if (chan == 2)
+ return 5935;
diff --git a/recipes-ccsp/rdk-wifi-libhostap/files/rdkwifilibhostap_compilation_errors_fix_64b.patch b/recipes-ccsp/rdk-wifi-libhostap/files/rdkwifilibhostap_compilation_errors_fix_64b.patch
new file mode 100644
index 0000000..a93ff2f
--- /dev/null
+++ b/recipes-ccsp/rdk-wifi-libhostap/files/rdkwifilibhostap_compilation_errors_fix_64b.patch
@@ -0,0 +1,10 @@
+--- git/source/hostap-2.10/src/Makefile.am 2023-06-15 15:49:18.872238320 +0000
++++ git/source/hostap-2.10/src/Makefile.am 2023-06-15 15:48:44.796752075 +0000
+@@ -158,6 +158,7 @@
+ libhostap_la_SOURCES += utils/ip_addr.c
+ libhostap_la_SOURCES += utils/uuid.c
+ libhostap_la_SOURCES += utils/base64.c
++libhostap_la_SOURCES += utils/crc32.c
+
+ libhostap_la_SOURCES += crypto/random.c
+ #libhostap_la_SOURCES += crypto/md5.c
diff --git a/recipes-ccsp/rdk-wifi-libhostap/rdk-wifi-libhostap.bbappend b/recipes-ccsp/rdk-wifi-libhostap/rdk-wifi-libhostap.bbappend
new file mode 100644
index 0000000..07cc2cf
--- /dev/null
+++ b/recipes-ccsp/rdk-wifi-libhostap/rdk-wifi-libhostap.bbappend
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI_append += " \
+ file://Rpi_rdkwifilibhostap_changes.patch \
+ file://fixed_6G_wrong_freq.patch \
+"
+
+CFLAGS_append = " \
+ -DCONFIG_IEEE80211AX \
+ -DCONFIG_OWE \
+ -DCONFIG_ACS \
+ -DCONFIG_AP \
+ -DCONFIG_SAE \
+"
diff --git a/recipes-common/mesh-agent/mesh-agent.bbappend b/recipes-common/mesh-agent/mesh-agent.bbappend
index eb0bb88..82c15c5 100644
--- a/recipes-common/mesh-agent/mesh-agent.bbappend
+++ b/recipes-common/mesh-agent/mesh-agent.bbappend
@@ -1,29 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += "\
-file://enabling_dhcp_lease_resync.patch;apply=no \
-file://meshagent-enable-ovs-default.patch;apply=no \
-"
-
-# we need to patch to code for mesh-agent
-do_turris_meshagent_patches() {
- cd ${S}
- if [ ! -e patch_applied ]; then
- bbnote "Patching enabling_dhcp_lease_resync.patch"
- patch -p1 < ${WORKDIR}/enabling_dhcp_lease_resync.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
-
- bbnote "Patching meshagent-enable-ovs-default.patch"
- patch -p1 < ${WORKDIR}/meshagent-enable-ovs-default.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
-
- touch patch_applied
- fi
-}
-addtask turris_meshagent_patches after do_unpack before do_configure
-
-do_install_append () {
- install -D -m 0644 ${S}/systemd_units/meshAgent.service ${D}${systemd_unitdir}/system/meshAgent.service
-}
-
-FILES_${PN}_append = "${systemd_unitdir}/system/meshAgent.service"
-
-CFLAGS_append = " -D_PLATFORM_TURRIS_"
+CFLAGS_append = " -D_PLATFORM_RASPBERRYPI_"
diff --git a/recipes-connectivity/opensync/files/0001-add-mesh-header-file.patch b/recipes-connectivity/opensync/files/0001-add-mesh-header-file.patch
deleted file mode 100644
index 6b6cdef..0000000
--- a/recipes-connectivity/opensync/files/0001-add-mesh-header-file.patch
+++ /dev/null
@@ -1,322 +0,0 @@
-diff --git a/src/lib/target/inc/mesh/meshsync_msgs.h b/src/lib/target/inc/mesh/meshsync_msgs.h
-new file mode 100644
-index 0000000..03d5c6a
---- /dev/null
-+++ b/src/lib/target/inc/mesh/meshsync_msgs.h
-@@ -0,0 +1,316 @@
-+/*
-+ * If not stated otherwise in this file or this component's Licenses.txt file the
-+ * following copyright and licenses apply:
-+ *
-+ * Copyright 2018 RDK Management
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+*/
-+
-+/*
-+ * meshcfg.h
-+ *
-+ */
-+
-+#ifndef MESHCFG_H_
-+#define MESHCFG_H_
-+
-+#include <sys/types.h>
-+#include <inttypes.h>
-+
-+#define MAX_SSID_LEN 65
-+#define MAX_PASS_LEN 65
-+#define MAX_MODE_LEN 25
-+#define MAX_SUBNET_LEN 25
-+#define MAX_IP_LEN 64
-+#define MAX_URL_LEN 256
-+#define MAX_TXRATE_LEN 256
-+#define MAX_CHANNEL_MODE_LEN 32
-+#define MAX_MAC_ADDR_LEN 18
-+#define MAX_HOSTNAME_LEN 256
-+
-+#if defined(ENABLE_MESH_SOCKETS)
-+/**************************************************************************/
-+/* Unix Domain Socket Name */
-+/**************************************************************************/
-+#define MESH_SOCKET_PATH_NAME "\0/tmp/mesh-socket-queue" // MeshAgent Server message socket
-+#else
-+/**************************************************************************/
-+/* Posix Message Queue Names */
-+/**************************************************************************/
-+#define MESH_SERVER_QUEUE_NAME "/mqueue-mesh-server" // Message traffic from Mesh Application Layer to RDKB
-+#define MESH_CLIENT_QUEUE_NAME "/mqueue-mesh-client" // Message traffic from RDKB to Mesh Application Layer
-+#endif
-+
-+#define MAX_FINGERPRINT_LEN 512
-+/**************************************************************************/
-+/* Mesh sync message types */
-+/**************************************************************************/
-+typedef enum {
-+ MESH_WIFI_RESET,
-+ MESH_WIFI_RADIO_CHANNEL,
-+ MESH_WIFI_RADIO_CHANNEL_MODE,
-+ MESH_WIFI_SSID_NAME,
-+ MESH_WIFI_SSID_ADVERTISE,
-+ MESH_WIFI_AP_SECURITY,
-+ MESH_WIFI_AP_KICK_ASSOC_DEVICE,
-+ MESH_WIFI_AP_KICK_ALL_ASSOC_DEVICES,
-+ MESH_WIFI_AP_ADD_ACL_DEVICE,
-+ MESH_WIFI_AP_DEL_ACL_DEVICE,
-+ MESH_WIFI_MAC_ADDR_CONTROL_MODE,
-+ MESH_SUBNET_CHANGE,
-+ MESH_URL_CHANGE,
-+ MESH_WIFI_STATUS,
-+ MESH_WIFI_ENABLE,
-+ MESH_STATE_CHANGE,
-+ MESH_WIFI_TXRATE,
-+ MESH_CLIENT_CONNECT,
-+ MESH_DHCP_RESYNC_LEASES,
-+ MESH_DHCP_ADD_LEASE,
-+ MESH_DHCP_REMOVE_LEASE,
-+ MESH_DHCP_UPDATE_LEASE,
-+ MESH_WIFI_RADIO_CHANNEL_BW,
-+ MESH_SYNC_MSG_TOTAL
-+} eMeshSyncType;
-+
-+/**
-+ * Mesh States
-+ */
-+typedef enum {
-+ MESH_STATE_FULL = 0,
-+ MESH_STATE_MONITOR,
-+ MESH_STATE_WIFI_RESET,
-+ MESH_STATE_TOTAL
-+} eMeshStateType;
-+
-+/**
-+ * Mesh Status states
-+ */
-+typedef enum {
-+ MESH_WIFI_STATUS_OFF = 0,
-+ MESH_WIFI_STATUS_INIT,
-+ MESH_WIFI_STATUS_MONITOR,
-+ MESH_WIFI_STATUS_FULL,
-+ MESH_WIFI_STATUS_TOTAL
-+} eMeshWifiStatusType;
-+
-+/**
-+ * Mesh Connected Client Interfaces
-+ */
-+typedef enum {
-+ MESH_IFACE_NONE = 0,
-+ MESH_IFACE_ETHERNET,
-+ MESH_IFACE_MOCA,
-+ MESH_IFACE_WIFI,
-+ MESH_IFACE_OTHER,
-+ MESH_IFACE_TOTAL
-+} eMeshIfaceType;
-+
-+/**
-+ * Mesh Sync Wifi Reset/Init message
-+ */
-+typedef struct _MeshWifiReset {
-+ uint8_t reset; // boolean dummy value for structure set to true.
-+} MeshWifiReset;
-+
-+/**
-+ * Mesh Sync Wifi SSID name change message
-+ */
-+typedef struct _MeshWifiSSIDName {
-+ uint32_t index; // index [0-15]
-+ char ssid[MAX_SSID_LEN]; // SSID
-+} MeshWifiSSIDName;
-+
-+/**
-+ * Mesh Sync Wifi SSID Advertise change message
-+ */
-+typedef struct _MeshWifiSSIDAdvertise {
-+ uint32_t index; // index [0-15]
-+ uint8_t enable; // boolean enable
-+} MeshWifiSSIDAdvertise;
-+
-+/**
-+ * Mesh Sync Wifi Radio channel change
-+ */
-+typedef struct _MeshWifiRadioChannel {
-+ uint32_t index; // Radio index
-+ uint32_t channel; // Channel
-+} MeshWifiRadioChannel;
-+
-+/**
-+ * Mesh Sync Wifi Radio channel mode change
-+ */
-+typedef struct _MeshWifiRadioChannelMode {
-+ uint32_t index; // Radio index
-+ char channelMode[MAX_CHANNEL_MODE_LEN]; // ChannelMode
-+ uint8_t gOnlyFlag; // Is this g only?
-+ uint8_t nOnlyFlag; // Is this n only?
-+ uint8_t acOnlyFlag; // Is this ac only?
-+} MeshWifiRadioChannelMode;
-+
-+
-+/**
-+ * Mesh Sync Wifi configuration change message
-+ */
-+typedef struct _MeshWifiAPSecurity {
-+ uint32_t index; // AP index [0-15]
-+ char passphrase[MAX_PASS_LEN]; // AP Passphrase
-+ char secMode[MAX_MODE_LEN]; // Security mode
-+ char encryptMode[MAX_MODE_LEN]; // Encryption mode
-+} MeshWifiAPSecurity;
-+
-+
-+/**
-+ * Mesh Sync Wifi Kick AP Associated Device based on device mac
-+ */
-+typedef struct _MeshWifiAPKickAssocDevice {
-+ uint32_t index; // AP index [0-15]
-+ char mac[MAX_MAC_ADDR_LEN]; // Mac Address
-+} MeshWifiAPKickAssocDevice;
-+
-+/**
-+ * Mesh Sync Wifi Kick All AP Associated Devices
-+ */
-+typedef struct _MeshWifiAPKickAllAssocDevices {
-+ uint32_t index; // AP index [0-15]
-+} MeshWifiAPKickAllAssocDevices;
-+
-+
-+/**
-+ * Mesh Sync Wifi AP Add Acl Device
-+ */
-+typedef struct _MeshWifiAPAddAclDevice {
-+ uint32_t index; // AP index [0-15]
-+ char mac[MAX_MAC_ADDR_LEN]; // Mac Address
-+} MeshWifiAPAddAclDevice;
-+
-+
-+/**
-+ * Mesh Sync Wifi AP Delete Acl Device
-+ */
-+typedef struct _MeshWifiAPDelAclDevice {
-+ uint32_t index; // AP index [0-15]
-+ char mac[MAX_MAC_ADDR_LEN]; // Mac Address
-+} MeshWifiAPDelAclDevice;
-+
-+/**
-+ * Mesh Sync Wifi Mac Address Control Mode
-+ */
-+typedef struct _MeshWifiMacAddrControlMode {
-+ uint32_t index; // AP index [0-15]
-+ uint8_t isEnabled; // Filter Enabled bool
-+ uint8_t isBlacklist; // blacklist=1; whitelist=0
-+} MeshWifiMacAddrControlMode;
-+
-+
-+/**
-+ * Mesh Sync Subnet configuration change message
-+ */
-+typedef struct _MeshSubnetChange {
-+ char gwIP[MAX_IP_LEN]; // GW IP value
-+ char netmask[MAX_SUBNET_LEN]; // Subnet value
-+} MeshSubnetChange;
-+
-+/**
-+ * Mesh Sync URL configuration change message
-+ */
-+typedef struct _MeshUrlChange {
-+ char url[MAX_URL_LEN]; // url
-+} MeshUrlChange;
-+
-+/**
-+ * Mesh Network Status message
-+ */
-+typedef struct _MeshWifiStatus {
-+ eMeshWifiStatusType status; // Status of mesh network
-+} MeshWifiStatus;
-+
-+/**
-+ * Mesh State message
-+ */
-+typedef struct _MeshStateChange {
-+ eMeshStateType state; // State of mesh network
-+} MeshStateChange;
-+
-+/**
-+ * Mesh WiFi TxRate
-+ */
-+typedef struct _MeshWifiTxRate {
-+ uint32_t index; // AP index [0-15]
-+ char basicRates[MAX_TXRATE_LEN]; // Basic Rates
-+ char opRates [MAX_TXRATE_LEN]; // Operational Rates
-+} MeshWifiTxRate;
-+
-+/**
-+ * Mesh Client Connect
-+ */
-+typedef struct _MeshClientConnect {
-+ eMeshIfaceType iface; // Interface
-+ char mac[MAX_MAC_ADDR_LEN]; // MAC address
-+ char host[MAX_HOSTNAME_LEN]; // Hostname
-+ uint8_t isConnected; // true=connected; false=offline/disconnected
-+} MeshClientConnect;
-+
-+/**
-+ * DHCP lease notification
-+ */
-+typedef struct _MeshWifiDhcpLease {
-+ char mac[MAX_MAC_ADDR_LEN];
-+ char ipaddr[MAX_IP_LEN];
-+ char hostname[MAX_HOSTNAME_LEN];
-+ char fingerprint[MAX_FINGERPRINT_LEN];
-+} MeshWifiDhcpLease;
-+
-+/**
-+ * Channel Bandwidth change notification
-+ */
-+typedef struct _MeshWifiRadioChannelBw {
-+ int index;
-+ int bw;
-+} MeshWifiRadioChannelBw;
-+
-+/**
-+ * Mesh Sync message
-+ */
-+typedef struct _MeshSync {
-+ eMeshSyncType msgType;
-+
-+ union {
-+ MeshWifiReset wifiReset;
-+ MeshWifiRadioChannel wifiRadioChannel;
-+ MeshWifiRadioChannelMode wifiRadioChannelMode;
-+ MeshWifiSSIDName wifiSSIDName;
-+ MeshWifiSSIDAdvertise wifiSSIDAdvertise;
-+ MeshWifiAPSecurity wifiAPSecurity;
-+ MeshWifiAPKickAssocDevice wifiAPKickAssocDevice;
-+ MeshWifiAPKickAllAssocDevices wifiAPKickAllAssocDevices;
-+ MeshWifiAPAddAclDevice wifiAPAddAclDevice;
-+ MeshWifiAPDelAclDevice wifiAPDelAclDevice;
-+ MeshWifiMacAddrControlMode wifiMacAddrControlMode;
-+ MeshSubnetChange subnet;
-+ MeshUrlChange url;
-+ MeshWifiStatus wifiStatus;
-+ MeshStateChange meshState;
-+ MeshWifiTxRate wifiTxRate;
-+ MeshClientConnect meshConnect;
-+ MeshWifiDhcpLease meshLease;
-+ MeshWifiRadioChannelBw wifiRadioChannelBw;
-+ } data;
-+} MeshSync;
-+
-+typedef struct _LeaseNotify {
-+ MeshWifiDhcpLease lease;
-+ eMeshSyncType msgType;
-+} LeaseNotify;
-+
-+#endif /* MESHCFG_H_ */
diff --git a/recipes-connectivity/opensync/files/999-mtk-add-vendor.patch b/recipes-connectivity/opensync/files/999-mtk-add-vendor.patch
deleted file mode 100644
index 2cfb4f6..0000000
--- a/recipes-connectivity/opensync/files/999-mtk-add-vendor.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN a/vendor/turris/build/vendor-arch.mk b/vendor/turris/build/vendor-arch.mk
---- a/vendor/turris/build/vendor-arch.mk 2022-06-02 12:40:23.648854464 +0800
-+++ b/vendor/turris/build/vendor-arch.mk 2022-06-02 12:41:07.232071037 +0800
-@@ -9,7 +9,7 @@
-
- # To customize: This vendor layer supports Turris Omnia as a residential / business gateway
- # and Turris Omnia as Extender/GW. Put your machine name here.
--ifeq ($(RDK_MACHINE),$(filter $(RDK_MACHINE),turris turris-extender turris-bci turris_5.10))
-+ifeq ($(RDK_MACHINE),$(filter $(RDK_MACHINE),filogic830 turris turris-extender turris-bci turris_5.10))
-
- # To customize: put OEM and MODEL names here
- RDK_OEM = turris
diff --git a/recipes-connectivity/opensync/files/999-mtk-fix-64bit-build.patch b/recipes-connectivity/opensync/files/999-mtk-fix-64bit-build.patch
deleted file mode 100644
index 8de0c1b..0000000
--- a/recipes-connectivity/opensync/files/999-mtk-fix-64bit-build.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -urN a/core/src/bm/src/bm_ieee80211.c b/core/src/bm/src/bm_ieee80211.c
---- a/core/src/bm/src/bm_ieee80211.c 2022-06-02 13:18:30.792245507 +0800
-+++ b/core/src/bm/src/bm_ieee80211.c 2022-06-02 13:19:57.178711952 +0800
-@@ -294,7 +294,7 @@
- memset(&client->op_classes, 0, sizeof(client->op_classes));
-
- if (len > BM_CLIENT_MAX_OP_CLASSES) {
-- LOGW("%s Size of operating classes more than expected (%d): %d",
-+ LOGW("%s Size of operating classes more than expected (%zu): %d",
- client->mac_addr, len, BM_CLIENT_MAX_OP_CLASSES);
- client->op_classes.size = BM_CLIENT_MAX_OP_CLASSES;
- } else {
-diff -urN a/platform/rdk/src/lib/target/src/bsal_legacy.c b/platform/rdk/src/lib/target/src/bsal_legacy.c
---- a/platform/rdk/src/lib/target/src/bsal_legacy.c 2022-06-02 13:03:06.764635550 +0800
-+++ b/platform/rdk/src/lib/target/src/bsal_legacy.c 2022-06-02 13:03:48.023904674 +0800
-@@ -1068,7 +1068,7 @@
- memcpy(info, &client_info_cache->client, sizeof(*info));
- }
- #endif
-- LOGI("BSAL Client "MAC_ADDR_FMT" is connected apIndex: %d, SNR: %d, rx: %lld, tx: %lld", MAC_ADDR_UNPACK(mac_addr),
-+ LOGI("BSAL Client "MAC_ADDR_FMT" is connected apIndex: %d, SNR: %d, rx: %zu, tx: %zu", MAC_ADDR_UNPACK(mac_addr),
- apIndex, info->snr, info->rx_bytes, info->tx_bytes);
-
- break;
-diff -urN a/platform/rdk/src/tools/band_steering_test/bs_testd/bs_testd.c b/platform/rdk/src/tools/band_steering_test/bs_testd/bs_testd.c
---- a/platform/rdk/src/tools/band_steering_test/bs_testd/bs_testd.c 2022-06-02 13:32:26.222966518 +0800
-+++ b/platform/rdk/src/tools/band_steering_test/bs_testd/bs_testd.c 2022-06-02 13:35:42.306842191 +0800
-@@ -906,7 +906,7 @@
- }
-
- total_bytes += bytes;
-- LOGD("total_bytes = %d\n", total_bytes);
-+ LOGD("total_bytes = %zu\n", total_bytes);
-
- if (total_bytes >= (ssize_t)sizeof(buf) && buf[sizeof(buf) - 1] != '\0')
- {
-@@ -921,7 +921,7 @@
- // Otherwise we're blocking (on purpose).
- // in case of client malfunction this loop needs to be interrupted by a signal.
- // Non-blocking variant may be implemented in the future.
-- LOGD("incomplete, bytes = %d , buf = >>%s<<\n", bytes, buf);
-+ LOGD("incomplete, bytes = %zu , buf = >>%s<<\n", bytes, buf);
- incomplete = true;
- ptr += bytes;
- continue;
diff --git a/recipes-connectivity/opensync/files/MeshAgentSync.patch b/recipes-connectivity/opensync/files/MeshAgentSync.patch
deleted file mode 100644
index a704bb7..0000000
--- a/recipes-connectivity/opensync/files/MeshAgentSync.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/src/lib/target/inc/target_internal.h b/src/lib/target/inc/target_internal.h
-index 1608b03..c520ad2 100644
---- a/src/lib/target/inc/target_internal.h
-+++ b/src/lib/target/inc/target_internal.h
-@@ -171,6 +171,9 @@ bool maclearn_update(maclearn_type_t type,
- bool radio_cloud_mode_set(radio_cloud_mode_t mode);
- radio_cloud_mode_t radio_cloud_mode_get(void);
- bool radio_rops_vstate(struct schema_Wifi_VIF_State *vstate);
-+#if defined(_PLATFORM_TURRIS_)
-+bool radio_rops_vconfig(struct schema_Wifi_VIF_Config *vconfig,const char *ifname);
-+#endif
- void radio_trigger_resync(void);
-
- void clients_connection(INT apIndex,
-diff --git a/src/lib/target/src/radio.c b/src/lib/target/src/radio.c
-index 9bedd00..b0cbe33 100644
---- a/src/lib/target/src/radio.c
-+++ b/src/lib/target/src/radio.c
-@@ -786,6 +786,20 @@ void radio_trigger_resync()
- }
- }
-
-+#if defined(_PLATFORM_TURRIS_)
-+bool radio_rops_vconfig(struct schema_Wifi_VIF_Config *vconfig , const char *ifname)
-+{
-+ if (!g_rops.op_vconf)
-+ {
-+ LOGE("%s: op_vconfig not set", __func__);
-+ return false;
-+ }
-+
-+ g_rops.op_vconf(vconfig, ifname);
-+ return true;
-+}
-+#endif
-+
- bool radio_rops_vstate(struct schema_Wifi_VIF_State *vstate)
- {
- if (!g_rops.op_vstate)
-diff --git a/src/lib/target/src/vif.c b/src/lib/target/src/vif.c
-index aaecbf9..4e6b4ed 100644
---- a/src/lib/target/src/vif.c
-+++ b/src/lib/target/src/vif.c
-@@ -1071,7 +1071,17 @@ bool vif_state_update(INT ssidIndex)
- LOGE("%s: cannot update VIF state for SSID index %d", __func__, ssidIndex);
- return false;
- }
-+#if defined(_PLATFORM_TURRIS_)
-+ /* After setting Wifi_VIF_State, updating Wifi_VIF_Config table also in order to avoid overwritting content from Wifi_VIF_Config */
-
-+ struct schema_Wifi_VIF_Config vconfig;
-+
-+ if (vif_copy_to_config(ssidIndex, &vstate, &vconfig))
-+ {
-+ LOGE("%s: copying VIF state to config for SSID index %d", __func__, ssidIndex);
-+ radio_rops_vconfig(&vconfig, vconfig.if_name);
-+ }
-+#endif
- LOGN("Updating VIF state for SSID index %d", ssidIndex);
- return radio_rops_vstate(&vstate);
- }
-
diff --git a/recipes-connectivity/opensync/files/absolute-value-glibc-dunfell-fix.patch b/recipes-connectivity/opensync/files/absolute-value-glibc-dunfell-fix.patch
deleted file mode 100644
index 0348ebb..0000000
--- a/recipes-connectivity/opensync/files/absolute-value-glibc-dunfell-fix.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/src/bm/src/bm_events.c b/src/bm/src/bm_events.c
-index 19bcd47..dfdf33c 100644
---- a/src/bm/src/bm_events.c
-+++ b/src/bm/src/bm_events.c
-@@ -315,14 +315,14 @@ bm_events_handle_event(bsal_event_t *event)
- }
-
- /* This one managed by cloud */
-- if (abs(stats->probe.last_snr - event->data.probe_req.rssi) < client->preq_snr_thr) {
-+ if (abs((int32_t)(stats->probe.last_snr - event->data.probe_req.rssi)) < client->preq_snr_thr) {
- LOGD("[%s] %s: %s skip preq report (%d %d)", bandstr, ifname, client->mac_addr,
- stats->probe.last_snr, event->data.probe_req.rssi);
- break;
- }
-
- /* This is short time probe report filtering/limitation */
-- if (abs(stats->probe.last_snr - event->data.probe_req.rssi) <= BM_CLIENT_PREQ_SNR_TH &&
-+ if (abs((int32_t)(stats->probe.last_snr - event->data.probe_req.rssi)) <= BM_CLIENT_PREQ_SNR_TH &&
- (now - last_probe) < BM_CLIENT_PREQ_TIME_TH) {
- LOGD("[%s] %s: %s skip preq report (%d %d) short time", bandstr, ifname, client->mac_addr,
- stats->probe.last_snr, event->data.probe_req.rssi);
-@@ -790,7 +790,7 @@ bm_events_handle_rssi_xing(bm_client_t *client, bsal_event_t *event)
- {
- if (event->data.rssi_change.low_xing == client->xing_low &&
- event->data.rssi_change.high_xing == client->xing_high &&
-- (abs(event->data.rssi_change.rssi - client->xing_snr) <= BM_CLIENT_SNR_XING_DIFF)) {
-+ (abs((int32_t)(event->data.rssi_change.rssi - client->xing_snr)) <= BM_CLIENT_SNR_XING_DIFF)) {
- LOGT("%s same xing skip (%d, %d) snr %d old %d", client->mac_addr, client->xing_low, client->xing_high,
- event->data.rssi_change.rssi, client->xing_snr);
- return;
diff --git a/recipes-connectivity/opensync/files/config-rdk-multi-psk-disable.patch b/recipes-connectivity/opensync/files/config-rdk-multi-psk-disable.patch
new file mode 100644
index 0000000..28020e8
--- /dev/null
+++ b/recipes-connectivity/opensync/files/config-rdk-multi-psk-disable.patch
@@ -0,0 +1,38 @@
+From b48455dba9196e19b9d16e4290ec0605537672de Mon Sep 17 00:00:00 2001
+Source: Kaviya Kumaresan <kaviya.kumaresan@ltts.com>
+Subject: To avoid the build issue related to wifi clients declarations
+Date: Thu, 26 Jan 2023 10:25:15 +0000
+---
+ kconfig/RDK | 2 +-
+ kconfig/RDK_EXTENDER | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vendor/rpi/kconfig/RDK b/vendor/rpi/kconfig/RDK
+index ac5125f..c18afc9 100644
+--- a/vendor/rpi/kconfig/RDK
++++ b/vendor/rpi/kconfig/RDK
+@@ -48,7 +48,7 @@ CONFIG_RDK_FRONTHAUL_AP_50_IFNAME="wifi5"
+ CONFIG_RDK_HOME_AP_24_IFNAME="wifi0"
+ CONFIG_RDK_HOME_AP_50_IFNAME="wifi1"
+ CONFIG_RDK_LAN_BRIDGE_NAME="brlan0"
+-CONFIG_RDK_MULTI_PSK_SUPPORT=y
++#CONFIG_RDK_MULTI_PSK_SUPPORT=y
+ CONFIG_RDK_ONBOARD_AP_24_IFNAME="wifi6"
+ CONFIG_RDK_ONBOARD_AP_50_IFNAME="wifi7"
+ # CONFIG_SERVICE_HEALTHCHECK is not set
+diff --git a/vendor/rpi/kconfig/RDK_EXTENDER b/vendor/rpi/kconfig/RDK_EXTENDER
+index bca8583..531b908 100644
+--- a/vendor/rpi/kconfig/RDK_EXTENDER
++++ b/vendor/rpi/kconfig/RDK_EXTENDER
+@@ -31,7 +31,7 @@ CONFIG_PLATFORM_IS_RDK=y
+ CONFIG_RDK_DISABLE_SYNC=y
+ CONFIG_RDK_EXTENDER=y
+ CONFIG_RDK_LAN_BRIDGE_NAME="brlan0"
+-CONFIG_RDK_MULTI_PSK_SUPPORT=y
++# CONFIG_RDK_MULTI_PSK_SUPPORT=y
+ CONFIG_TARGET_CAP_EXTENDER=y
+ CONFIG_TARGET_ETH0_NAME="eth0"
+ CONFIG_TARGET_FIXED_HWREV_STRING=""
+--
+2.37.0 (Apple Git-136)
+
diff --git a/recipes-connectivity/opensync/files/disable-dry-run.patch b/recipes-connectivity/opensync/files/disable-dry-run.patch
deleted file mode 100644
index a493102..0000000
--- a/recipes-connectivity/opensync/files/disable-dry-run.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 61e04f8186c734312e0641a198f96a59f049f666
-Author: Mateusz Bajorski <mbajorski@plume.com>
-Date: Thu Jan 30 16:46:33 2020 +0000
-
- disable dry run
-
-diff --git a/src/cm2/unit.mk b/src/cm2/unit.mk
-index 8abe642..922e1fd 100644
---- a/src/cm2/unit.mk
-+++ b/src/cm2/unit.mk
-@@ -52,6 +52,8 @@ UNIT_LDFLAGS += -ldl
- UNIT_LDFLAGS += -lev
- UNIT_LDFLAGS += -lrt
-
-+UNIT_CFLAGS += -DCONFIG_PLUME_CM2_DISABLE_DRYRUN_ON_GRE
-+
- ifneq ($(CONFIG_USE_KCONFIG),y)
- # Disable dryrun on GRE by default for all platforms without KConfig
- UNIT_CFLAGS += -DCONFIG_PLUME_CM2_DISABLE_DRYRUN_ON_GRE
diff --git a/recipes-connectivity/opensync/files/dunfell-nm-crash-fix.patch b/recipes-connectivity/opensync/files/dunfell-nm-crash-fix.patch
deleted file mode 100644
index 78a53b6..0000000
--- a/recipes-connectivity/opensync/files/dunfell-nm-crash-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/lib/inet/src/inet_base.c b/src/lib/inet/src/inet_base.c
-index a93cefc..db66cf2 100644
---- a/src/lib/inet/src/inet_base.c
-+++ b/src/lib/inet/src/inet_base.c
-@@ -1080,7 +1080,7 @@ bool inet_base_dhcpc_option_set(inet_t *super, enum osn_dhcp_option opt, const c
- {
- inet_base_t *self = (void *)super;
- bool _req;
-- const char *_value;
-+ const char *_value=NULL;
-
- if (!osn_dhcp_client_opt_get(self->in_dhcpc, opt, &_req, &_value))
- {
diff --git a/recipes-connectivity/opensync/files/get-used-link-type.patch b/recipes-connectivity/opensync/files/get-used-link-type.patch
deleted file mode 100644
index 20eebf6..0000000
--- a/recipes-connectivity/opensync/files/get-used-link-type.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: core/src/cm2/src/cm2_ovsdb.c
-===================================================================
---- core.orig/src/cm2/src/cm2_ovsdb.c 2020-01-27 15:10:38.435076332 +0000
-+++ core/src/cm2/src/cm2_ovsdb.c 2020-01-27 15:11:01.481520930 +0000
-@@ -861,7 +861,7 @@
- }
-
- bool cm2_connection_get_used_link(struct schema_Connection_Manager_Uplink *uplink) {
-- return ovsdb_table_select_one(&table_Connection_Manager_Uplink, SCHEMA_COLUMN(Connection_Manager_Uplink, is_used), "true", uplink);
-+ return ovsdb_table_select_one_where(&table_Connection_Manager_Uplink, ovsdb_where_simple_typed(SCHEMA_COLUMN(Connection_Manager_Uplink, is_used), "true",OCLM_BOOL), uplink);
- }
-
- static void cm2_connection_clear_used(void)
diff --git a/recipes-connectivity/opensync/files/opensync-4.4.service b/recipes-connectivity/opensync/files/opensync-4.4.service
new file mode 100644
index 0000000..9174419
--- /dev/null
+++ b/recipes-connectivity/opensync/files/opensync-4.4.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Open-source software that delivers and manages your evolving offer of home connectivity and entertainment services.
+Documentation=https://www.opensync.io/documentation
+
+[Service]
+Type=simple
+EnvironmentFile=/usr/opensync/etc/kconfig
+
+ExecStartPre=/usr/bin/env "${CONFIG_TARGET_PATH_SCRIPTS}"/opensync.init pre-start
+ExecStart=/usr/bin/env "${CONFIG_DM_MANAGER_PATH}"/dm
+
+ExecStopPost=/usr/bin/env "${CONFIG_TARGET_PATH_SCRIPTS}"/opensync.init post-stop
+Restart=no
diff --git a/recipes-connectivity/opensync/files/platform-rdk.patch b/recipes-connectivity/opensync/files/platform-rdk.patch
new file mode 100644
index 0000000..b733687
--- /dev/null
+++ b/recipes-connectivity/opensync/files/platform-rdk.patch
@@ -0,0 +1,55 @@
+diff --git a/src/lib/connector/override.mk b/src/lib/connector/override.mk
+deleted file mode 100644
+index cd36b42..0000000
+--- a/src/lib/connector/override.mk
++++ /dev/null
+@@ -1,49 +0,0 @@
+-# Copyright (c) 2017, Plume Design Inc. All rights reserved.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are met:
+-# 1. Redistributions of source code must retain the above copyright
+-# notice, this list of conditions and the following disclaimer.
+-# 2. Redistributions in binary form must reproduce the above copyright
+-# notice, this list of conditions and the following disclaimer in the
+-# documentation and/or other materials provided with the distribution.
+-# 3. Neither the name of the Plume Design Inc. nor the
+-# names of its contributors may be used to endorse or promote products
+-# derived from this software without specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+-# DISCLAIMED. IN NO EVENT SHALL Plume Design Inc. BE LIABLE FOR ANY
+-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-
+-##############################################################################
+-#
+-# unit override for connector
+-#
+-##############################################################################
+-UNIT_DISABLE := $(if $(CONFIG_MANAGER_XM),n,y)
+-
+-UNIT_CFLAGS += -I$(OVERRIDE_DIR)/inc
+-UNIT_CFLAGS += -I${STAGING_INCDIR}/dbus-1.0
+-UNIT_CFLAGS += -I${STAGING_LIBDIR}/dbus-1.0/include
+-UNIT_CFLAGS += -I${STAGING_INCDIR}/ccsp
+-UNIT_CFLAGS += -D_ANSC_LINUX -D_ANSC_USER -D_ANSC_LITTLE_ENDIAN_
+-UNIT_LDFLAGS := $(SDK_LIB_DIR) -lccsp_common
+-
+-UNIT_SRC_TOP := $(OVERRIDE_DIR)/src/connector_main.c
+-UNIT_SRC_TOP += $(OVERRIDE_DIR)/src/connector_dm.c
+-
+-UNIT_DEPS += src/lib/kconfig
+-UNIT_DEPS += src/lib/log
+-UNIT_DEPS += src/lib/schema
+-UNIT_DEPS += src/lib/common
+-UNIT_DEPS += src/lib/ovsdb
+-
+-UNIT_EXPORT_CFLAGS := $(UNIT_CFLAGS)
+-UNIT_EXPORT_LDFLAGS := $(UNIT_LDFLAGS)
diff --git a/recipes-connectivity/opensync/files/raspberrypi-rdk-broadband-target.patch b/recipes-connectivity/opensync/files/raspberrypi-rdk-broadband-target.patch
new file mode 100644
index 0000000..845bd4b
--- /dev/null
+++ b/recipes-connectivity/opensync/files/raspberrypi-rdk-broadband-target.patch
@@ -0,0 +1,25 @@
+From 17b1dbc378cba95dfd072949a48a265ab8bf52e9 Mon Sep 17 00:00:00 2001
+From: Jenkins Slave <jenkins@code.rdkcentral.com>
+Date: Fri, 24 Mar 2023 13:49:44 +0000
+Subject: [PATCH] raspberrypi-rdk-broadband-target
+
+---
+ build/vendor-arch.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/vendor-arch.mk b/build/vendor-arch.mk
+index ffd252b..70cb97d 100644
+--- a/build/vendor-arch.mk
++++ b/build/vendor-arch.mk
+@@ -14,7 +14,7 @@
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ #See the License for the specific language governing permissions and
+ #limitations under the License.
+-RDK_TARGETS = RDKB raspberrypi4-rdk-broadband raspberrypi4-rdk-extender raspberrypi-rdk-broadband raspberrypi4-64-rdk-broadband
++RDK_TARGETS = RDKB filogic830-onewifi raspberrypi4-rdk-broadband raspberrypi4-rdk-extender raspberrypi-rdk-broadband raspberrypi4-64-rdk-broadband raspberrypi4-rdk-broadband-bci raspberrypi4-rdk-broadband-gwprovapp
+
+ ifneq ($(filter $(TARGET),$(RDK_TARGETS)),)
+
+--
+2.37.3
+
diff --git a/recipes-connectivity/opensync/files/rdk-ext-support.patch b/recipes-connectivity/opensync/files/rdk-ext-support.patch
deleted file mode 100644
index fc6ddf9..0000000
--- a/recipes-connectivity/opensync/files/rdk-ext-support.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff --git a/ovsdb/inet.json b/ovsdb/inet.json
-index af2994e..4adb651 100644
---- a/ovsdb/inet.json
-+++ b/ovsdb/inet.json
-@@ -19,6 +19,32 @@
- "if_type": "bridge",
- "enabled": true
- }
-+ },
-+ {
-+ "op":"insert",
-+ "table":"Wifi_Inet_Config",
-+ "row": {
-+ "if_name": "bhaul-sta-24",
-+ "ip_assign_scheme": "dhcp",
-+ "mtu": 1600,
-+ "if_type": "vif",
-+ "enabled" : true,
-+ "network" : true,
-+ "NAT": false
-+ }
-+ },
-+ {
-+ "op":"insert",
-+ "table":"Wifi_Inet_Config",
-+ "row": {
-+ "if_name": "bhaul-sta-50",
-+ "ip_assign_scheme": "dhcp",
-+ "mtu": 1600,
-+ "if_type": "vif",
-+ "enabled" : true,
-+ "network" : true,
-+ "NAT": false
-+ }
- }
- ]
-
-diff --git a/src/lib/target/src/map.c b/src/lib/target/src/map.c
-index 55af881..fa535f9 100644
---- a/src/lib/target/src/map.c
-+++ b/src/lib/target/src/map.c
-@@ -20,10 +20,12 @@ typedef struct
-
- static ifmap_t ifmap[] = {
- // idx cloud-ifname dev-ifname bridge gre-br vlan description
-- { 1, "wifi2", "wifi2", "brlan0", "wifi2", 0 }, // 2G Backhaul
-- { 1, "wifi3", "wifi3", "brlan0", "wifi3", 0 }, // 5G Backhaul
-- { 2, "wifi0", "wifi0", "brlan0", NULL, 0 }, // 2G User SSID
-- { 2, "wifi1", "wifi1", "brlan0", NULL, 0 }, // 5G User SSID
-+ { 0, "bhaul-sta-24", "bhaul-sta-24", "br-wan", "bhaul-sta-24", 0 }, // 2G Backhaul
-+ { 0, "bhaul-sta-50", "bhaul-sta-50", "br-wan", "bhaul-sta-50", 0 }, // 2G Backhaul
-+ { 1, "wifi2", "wifi2", "br-home", "wifi2", 0 }, // 2G Backhaul
-+ { 1, "wifi3", "wifi3", "br-home", "wifi3", 0 }, // 5G Backhaul
-+ { 2, "wifi0", "wifi0", "br-home", NULL, 0 }, // 2G User SSID
-+ { 2, "wifi1", "wifi1", "br-home", NULL, 0 }, // 5G User SSID
- { 0, NULL, NULL, NULL, NULL, 0 }
- };
-
-diff --git a/src/lib/target/src/target.c b/src/lib/target/src/target.c
-index de884b5..59c1b59 100644
---- a/src/lib/target/src/target.c
-+++ b/src/lib/target/src/target.c
-@@ -5,3 +5,23 @@ const char* target_tls_privkey_filename(void)
- {
- return "/usr/plume/etc/certs/client_dec.key";
- }
-+
-+bool target_device_connectivity_check(const char *ifname,
-+ target_connectivity_check_t *cstate,
-+ target_connectivity_check_option_t opts)
-+{
-+ cstate->ntp_state = true;
-+ cstate->link_state = true;
-+ cstate->router_state = true;
-+ cstate->internet_state = true;
-+ return true;
-+}
-+
-+int target_device_capabilities_get()
-+{
-+#if defined(CONFIG_RDK_EXTENDER)
-+ return TARGET_EXTENDER_TYPE;
-+#else
-+ return 0;
-+#endif
-+}
diff --git a/recipes-connectivity/opensync/files/rdk-extender.patch b/recipes-connectivity/opensync/files/rdk-extender.patch
deleted file mode 100644
index 56c99ad..0000000
--- a/recipes-connectivity/opensync/files/rdk-extender.patch
+++ /dev/null
@@ -1,563 +0,0 @@
-diff --git a/kconfig/Kconfig.platform b/kconfig/Kconfig.platform
-new file mode 100644
-index 0000000..4a045b2
---- /dev/null
-+++ b/kconfig/Kconfig.platform
-@@ -0,0 +1,15 @@
-+menuconfig PLATFORM_IS_RDK
-+ bool "RDK"
-+ help
-+ Support for RDK-based platforms
-+
-+
-+if PLATFORM_IS_RDK
-+
-+config RDK_EXTENDER
-+ bool "RDK Extender device (EXPERIMENTAL)"
-+ default n
-+
-+
-+endif
-+
-diff --git a/src/lib/osn/override.mk b/src/lib/osn/override.mk
-index bf128b7..ff210ed 100644
---- a/src/lib/osn/override.mk
-+++ b/src/lib/osn/override.mk
-@@ -33,11 +33,22 @@ UNIT_EXPORT_CFLAGS := -I$(UNIT_PATH)/inc
- UNIT_SRC := src/osn_inet.c
- UNIT_SRC += src/osn_types.c
-
-+#if extender
-+ifeq ($(CONFIG_RDK_EXTENDER),y)
-+UNIT_SRC += src/osn_dnsmasq.c
-+UNIT_SRC += src/osn_udhcpc.c
-+UNIT_SRC += src/osn_route.c
-+endif
-+
- UNIT_SRC_DIR := $(OVERRIDE_DIR)/src
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_upnpd.c
-+
-+ifneq ($(CONFIG_RDK_EXTENDER),y)
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_dhcpc.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_route.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_dhcps.c
-+endif
-+
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_dhcps6.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_odhcp6c.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/osn_inet6.c
-diff --git a/src/lib/osn/src/osn_dhcps.c b/src/lib/osn/src/osn_dhcps.c
-index d183172..f2885fd 100644
---- a/src/lib/osn/src/osn_dhcps.c
-+++ b/src/lib/osn/src/osn_dhcps.c
-@@ -284,11 +284,13 @@ static bool dhcp_server_init(osn_dhcp_server_t *self, const char *ifname)
- return false;
- }
-
-+#ifndef CONFIG_RDK_EXTENDER
- if (!sync_init(SYNC_MGR_NM))
- {
- LOGE("Cannot init sync manager for NM");
- return false;
- }
-+#endif
-
- /* Initialize this instance */
- memset(self, 0 ,sizeof(*self));
-diff --git a/src/lib/osync_hal/src/inet.c b/src/lib/osync_hal/src/inet.c
-index b221667..580ff83 100644
---- a/src/lib/osync_hal/src/inet.c
-+++ b/src/lib/osync_hal/src/inet.c
-@@ -304,7 +304,11 @@ osync_hal_return_t osync_hal_inet_add_to_bridge(
-
- memset(cmd, 0, sizeof(cmd));
-
-+#ifdef CONFIG_RDK_EXTENDER
-+ snprintf(cmd, sizeof(cmd), "ovs-vsctl add-port %s %s", br_name, if_name);
-+#else
- snprintf(cmd, sizeof(cmd), "brctl addif %s %s", br_name, if_name);
-+#endif
- LOGD("%s: Adding to bridge with \"%s\"", if_name, cmd);
- rc = system(cmd);
- if (!WIFEXITED(rc) || WEXITSTATUS(rc) != 0)
-diff --git a/src/lib/target/inc/target_internal.h b/src/lib/target/inc/target_internal.h
-index 1608b03..61f0f06 100644
---- a/src/lib/target/inc/target_internal.h
-+++ b/src/lib/target/inc/target_internal.h
-@@ -35,7 +35,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #include "osync_hal.h"
- #include "osn_dhcp.h"
-
-+#if !defined(CONFIG_RDK_EXTENDER)
- #include <mesh/meshsync_msgs.h> // needed only by sync_send_security_change()
-+#endif
-
- #ifndef __WIFI_HAL_H__
- #include "ccsp/wifi_hal.h"
-@@ -182,12 +184,15 @@ bool sync_init(sync_mgr_t mgr);
- bool sync_cleanup(void);
- bool sync_send_ssid_change(INT ssid_index, const char *ssid_ifname,
- const char *new_ssid);
-+#if !defined(CONFIG_RDK_EXTENDER)
- bool sync_send_security_change(INT ssid_index, const char *ssid_ifname,
- MeshWifiAPSecurity *sec);
-+#endif
- bool sync_send_status(radio_cloud_mode_t mode);
-
- bool vif_state_update(INT ssidIndex);
- bool vif_state_get(INT ssidIndex, struct schema_Wifi_VIF_State *vstate);
-+bool vif_state_sta_get(INT ssidIndex, struct schema_Wifi_VIF_State *vstate);
- bool vif_copy_to_config(INT ssidIndex, struct schema_Wifi_VIF_State *vstate,
- struct schema_Wifi_VIF_Config *vconf);
- struct target_radio_ops;
-diff --git a/src/lib/target/override.mk b/src/lib/target/override.mk
-index 8c37835..369d2a5 100644
---- a/src/lib/target/override.mk
-+++ b/src/lib/target/override.mk
-@@ -44,7 +44,11 @@ UNIT_SRC_TOP += $(UNIT_SRC_DIR)/radio.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/vif.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/stats.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/log.c
-+
-+ifneq ($(CONFIG_RDK_EXTENDER),y)
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/sync.c
-+endif
-+
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/maclearn.c
- UNIT_SRC_TOP += $(UNIT_SRC_DIR)/bsal.c
-
-@@ -53,6 +57,8 @@ UNIT_CFLAGS += -DENABLE_MESH_SOCKETS
-
- UNIT_DEPS := $(PLATFORM_DIR)/src/lib/devinfo
- UNIT_DEPS += $(PLATFORM_DIR)/src/lib/osync_hal
-+
-+#UNIT_DEPS += src/lib/kconfig
- UNIT_DEPS += src/lib/evsched
- UNIT_DEPS += src/lib/schema
- UNIT_DEPS += src/lib/const
-@@ -66,6 +72,7 @@ endif
-
- UNIT_LDFLAGS := $(SDK_LIB_DIR) -lhal_wifi -lrt
- UNIT_CFLAGS += -DCONTROLLER_ADDR="\"$(shell echo -n $(CONTROLLER_ADDR))\""
-+UNIT_CFLAGS += -include "$(KCONFIG_WORK).h"
-
- UNIT_EXPORT_CFLAGS := $(UNIT_CFLAGS)
- UNIT_EXPORT_LDFLAGS := $(UNIT_LDFLAGS)
-diff --git a/src/lib/target/src/radio.c b/src/lib/target/src/radio.c
-index 9bedd00..33a2032 100644
---- a/src/lib/target/src/radio.c
-+++ b/src/lib/target/src/radio.c
-@@ -72,6 +72,7 @@ static c_item_t map_country_str[] =
- {
- C_ITEM_STR_STR("826", "UK"), // ISO 3166-1
- C_ITEM_STR_STR("840", "US"),
-+ C_ITEM_STR_STR("705", "SI"), // (non-standard)
- C_ITEM_STR_STR("841", "US"), // (non-standard)
- };
-
-@@ -620,6 +621,62 @@ bool target_radio_config_init2()
- g_rops.op_vconf(&vconfig, rconfig.if_name);
- g_rops.op_vstate(&vstate);
- }
-+#ifdef CONFIG_RDK_EXTENDER
-+ /* CLIENT-API */
-+ ret = wifi_getSTANumberOfEntries(&snum);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGE("%s: failed to get SSID count", __func__);
-+ return false;
-+ }
-+
-+ for (s = 0; s < snum; s++)
-+ {
-+ memset(ssid_ifname, 0, sizeof(ssid_ifname));
-+ ret = wifi_getSTAName(s, ssid_ifname);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("%s: failed to get STA name for index %lu. Skipping.\n", __func__, s);
-+ continue;
-+ }
-+ // Filter SSID's that we don't have mappings for
-+ if (!target_unmap_ifname_exists(ssid_ifname))
-+ {
-+ LOGW("%s: STA %s not in map. Skipping.\n", __func__, ssid_ifname);
-+ continue;
-+ }
-+
-+ ret = wifi_getSTARadioIndex(s, &ssid_radio_idx);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("Cannot get radio index for SSID %lu", s);
-+ continue;
-+ }
-+
-+ if ((ULONG)ssid_radio_idx != r)
-+ {
-+ continue;
-+ }
-+
-+ LOGI("Found STA index %lu: %s", s, ssid_ifname);
-+ if (!vif_state_sta_get(s, &vstate))
-+ {
-+ LOGE("%s: cannot get vif state for STA index %lu", __func__, s);
-+ continue;
-+ }
-+ if (!vif_copy_to_config(s, &vstate, &vconfig))
-+ {
-+ LOGE("%s: cannot copy VIF state to config for STA index %lu", __func__, s);
-+ continue;
-+ }
-+ g_rops.op_vconf(&vconfig, rconfig.if_name);
-+ g_rops.op_vstate(&vstate);
-+
-+
-+ }
-+
-+ /* END CLIENT-API */
-+#endif
-
- }
-
-@@ -807,6 +864,9 @@ bool
- radio_cloud_mode_set(radio_cloud_mode_t mode)
- {
- radio_cloud_mode = mode;
--
-+#ifdef CONFIG_RDK_EXTENDER
-+ return true;
-+#else
- return sync_send_status(radio_cloud_mode);
-+#endif
- }
-diff --git a/src/lib/target/src/sync.c b/src/lib/target/src/sync.c
-index 5b4337d..b8dfc17 100644
---- a/src/lib/target/src/sync.c
-+++ b/src/lib/target/src/sync.c
-@@ -43,7 +43,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #include <sys/socket.h>
- #include <sys/un.h>
-
-+#ifndef CONFIG_RDK_EXTENDER
- #include <mesh/meshsync_msgs.h> // this file is included by vendor
-+#endif
-
- #include "os.h"
- #include "log.h"
-@@ -146,6 +148,7 @@ static char* sync_iface_name(int iface_type)
- return tmp;
- }
-
-+#ifndef CONFIG_RDK_EXTENDER
- static int wiifhal_sync_iface_mltype(int iface_type)
- {
- c_item_t *citem;
-@@ -157,7 +160,7 @@ static int wiifhal_sync_iface_mltype(int iface_type)
-
- return -1;
- }
--
-+#endif
- static void sync_process_msg(MeshSync *mp)
- {
- radio_cloud_mode_t cloud_mode;
-diff --git a/src/lib/target/src/target.c b/src/lib/target/src/target.c
-index ffaaf6a..ef20eda 100644
---- a/src/lib/target/src/target.c
-+++ b/src/lib/target/src/target.c
-@@ -281,12 +281,13 @@ bool target_init(target_init_opt_t opt, struct ev_loop *loop)
- "(Failed to initialize EVSCHED)");
- return -1;
- }
--
-+ #ifndef CONFIG_RDK_EXTENDER
- if (!sync_init(SYNC_MGR_WM))
- {
- // It reports the error
- return false;
- }
-+ #endif
- if (!set_deauth_and_scan_filter_flags())
- {
- LOGE("Failed to set csa_deauth and scan filter flags");
-@@ -296,11 +297,13 @@ bool target_init(target_init_opt_t opt, struct ev_loop *loop)
- break;
-
- case TARGET_INIT_MGR_CM:
-+ #ifndef CONFIG_RDK_EXTENDER
- if (!sync_init(SYNC_MGR_CM))
- {
- // It reports the error
- return false;
- }
-+ #endif
- break;
-
- case TARGET_INIT_MGR_BM:
-@@ -323,7 +326,9 @@ bool target_close(target_init_opt_t opt, struct ev_loop *loop)
- switch (opt)
- {
- case TARGET_INIT_MGR_WM:
-+ #ifndef CONFIG_RDK_EXTENDER
- sync_cleanup();
-+ #endif
- /* fall through */
-
- case TARGET_INIT_MGR_SM:
-diff --git a/src/lib/target/src/vif.c b/src/lib/target/src/vif.c
-index aaecbf9..a987aa3 100644
---- a/src/lib/target/src/vif.c
-+++ b/src/lib/target/src/vif.c
-@@ -262,7 +262,8 @@ static bool acl_apply(
-
- return true;
- }
--
-+//FIXME: is this needed only for mesh something?
-+#if !defined(CONFIG_RDK_EXTENDER)
- static const char* security_conf_find_by_key(
- const struct schema_Wifi_VIF_Config *vconf,
- char *key)
-@@ -279,6 +280,7 @@ static const char* security_conf_find_by_key(
-
- return NULL;
- }
-+#endif
-
- static bool security_to_state(
- INT ssid_index,
-@@ -449,7 +451,7 @@ static bool security_to_state(
- vstate->security_len = n;
- return true;
- }
--
-+#if !defined(CONFIG_RDK_EXTENDER)
- static bool security_to_syncmsg(
- const struct schema_Wifi_VIF_Config *vconf,
- MeshWifiAPSecurity *dest)
-@@ -527,7 +529,7 @@ static bool security_to_syncmsg(
-
- return true;
- }
--
-+#endif
- static bool vif_is_enabled(INT ssid_index)
- {
- BOOL enabled = false;
-@@ -602,10 +604,177 @@ bool vif_copy_to_config(
- STRSCPY(vconf->mac_list[i], vstate->mac_list[i]);
- }
- vconf->mac_list_len = vstate->mac_list_len;
-+ /* CLIENT-API */
-+ SCHEMA_SET_STR(vconf->parent, vstate->parent);
-+ LOGT("vconf->parent = %s", vconf->parent);
-+ SCHEMA_SET_INT(vconf->uapsd_enable, vstate->uapsd_enable);
-+ LOGT("vconf->uapsd_enable = %d", vconf->uapsd_enable);
-+
-
- return true;
- }
-
-+#if defined(CONFIG_RDK_EXTENDER)
-+/* CLIENT-API */
-+
-+bool vif_state_sta_get(INT ssidIndex, struct schema_Wifi_VIF_State *vstate)
-+{
-+ CHAR buf[WIFIHAL_MAX_BUFFER];
-+ INT ret;
-+ char ssid_ifname[128];
-+ hw_mode_t min_hw_mode;
-+ INT radio_idx;
-+ char band[128];
-+ BOOL gOnly, nOnly, acOnly;
-+ char *str;
-+ ULONG lval;
-+ int n = 0;
-+
-+ memset(vstate, 0, sizeof(*vstate));
-+ schema_Wifi_VIF_State_mark_all_present(vstate);
-+ vstate->_partial_update = true;
-+ vstate->associated_clients_present = false;
-+ vstate->vif_config_present = false;
-+ memset(ssid_ifname, 0, sizeof(ssid_ifname));
-+
-+ ret = wifi_getSTAName(ssidIndex, ssid_ifname);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGE("%s: cannot get sta name for index %d", __func__, ssidIndex);
-+ return false;
-+ }
-+
-+ SCHEMA_SET_STR(vstate->if_name, target_unmap_ifname(ssid_ifname));
-+
-+ SCHEMA_SET_STR(vstate->mode, "sta");
-+ SCHEMA_SET_INT(vstate->enabled, true);
-+ SCHEMA_SET_INT(vstate->uapsd_enable, false);
-+ SCHEMA_SET_INT(vstate->vif_radio_idx, target_map_ifname_to_vif_radio_idx(vstate->if_name));
-+
-+ // mac (w/ exists)
-+ memset(buf, 0, sizeof(buf));
-+ ret = wifi_getSTAMAC(ssidIndex, buf);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("%s: Failed to get STA (mac)", ssid_ifname);
-+ }
-+ else
-+ {
-+ SCHEMA_SET_STR(vstate->mac, buf);
-+ }
-+
-+ // mac (w/ exists)
-+ memset(buf, 0, sizeof(buf));
-+ ret = wifi_getSTABSSID(ssidIndex, buf);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("%s: Failed to get STA (parent)", ssid_ifname);
-+ }
-+ else
-+ {
-+ SCHEMA_SET_STR(vstate->parent, buf);
-+ }
-+
-+
-+ ret = wifi_getSSIDRadioIndex(ssidIndex, &radio_idx);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGE("%s: cannot get radio idx for SSID %s\n", __func__, ssid_ifname);
-+ return false;
-+ }
-+
-+
-+ memset(band, 0, sizeof(band));
-+ ret = wifi_getRadioOperatingFrequencyBand(radio_idx, band);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGE("%s: cannot get radio band for idx %d", __func__, radio_idx);
-+ return false;
-+ }
-+
-+
-+ // min_hw_mode (w/ exists)
-+ if (band[0] == '5')
-+ {
-+ min_hw_mode = HW_MODE_11A;
-+ } else
-+ {
-+ min_hw_mode = HW_MODE_11B;
-+ }
-+ ret = wifi_getRadioStandard(radio_idx, buf, &gOnly, &nOnly, &acOnly);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("%s: Failed to get min_hw_mode from %d", ssid_ifname, radio_idx);
-+ }
-+ else
-+ {
-+ if (gOnly)
-+ {
-+ min_hw_mode = HW_MODE_11G;
-+ }
-+ else if (nOnly)
-+ {
-+ min_hw_mode = HW_MODE_11N;
-+ }
-+ else if (acOnly)
-+ {
-+ min_hw_mode = HW_MODE_11AC;
-+ }
-+ }
-+
-+ str = c_get_str_by_key(map_hw_mode, min_hw_mode);
-+ if (strlen(str) == 0)
-+ {
-+ LOGW("%s: failed to encode min_hw_mode (%d)",
-+ ssid_ifname, min_hw_mode);
-+ }
-+ else
-+ {
-+ SCHEMA_SET_STR(vstate->min_hw_mode, str);
-+ }
-+ // channel (w/ exists)
-+ ret = wifi_getRadioChannel(radio_idx, &lval);
-+ if (ret != RETURN_OK)
-+ {
-+ LOGW("%s: Failed to get channel from radio idx %d", ssid_ifname, radio_idx);
-+ }
-+ else
-+ {
-+ SCHEMA_SET_INT(vstate->channel, lval);
-+ }
-+
-+
-+ SCHEMA_SET_STR(vstate->ssid_broadcast, "disabled");
-+ SCHEMA_SET_STR(vstate->mac_list_type, "none");
-+ SCHEMA_SET_INT(vstate->btm, 0);
-+ SCHEMA_SET_INT(vstate->rrm, 0);
-+ SCHEMA_SET_INT(vstate->wds, 0);
-+ SCHEMA_SET_INT(vstate->ap_bridge, false);
-+ //Wifi credentials
-+ SCHEMA_SET_STR(vstate->ssid, "opensync.onboard");
-+
-+ strncpy(vstate->security_keys[n],
-+ OVSDB_SECURITY_ENCRYPTION,
-+ sizeof(vstate->security_keys[n]) - 1);
-+
-+ strncpy(vstate->security[n],
-+ OVSDB_SECURITY_ENCRYPTION_WPA_PSK,
-+ sizeof(vstate->security[n]) - 1);
-+ n++;
-+ strncpy(vstate->security_keys[n],
-+ OVSDB_SECURITY_KEY,
-+ sizeof(vstate->security_keys[n]) - 1);
-+ strncpy(vstate->security[n],
-+ "7eCyoqETHiJzKBBALPFP9X8mVy4dwCga",
-+ sizeof(vstate->security[n]) - 1);
-+
-+ n++;
-+ vstate->security_len = n;
-+ return true;
-+
-+}
-+#endif
-+
- bool vif_state_get(INT ssidIndex, struct schema_Wifi_VIF_State *vstate)
- {
- ULONG lval;
-@@ -888,7 +1055,9 @@ bool target_vif_config_set2(
- INT ret;
- c_item_t *citem;
- char tmp[256];
-+#if !defined(CONFIG_RDK_EXTENDER)
- MeshWifiAPSecurity sec;
-+#endif
- const char *ssid_ifname = target_map_ifname((char *)vconf->if_name);
-
- if (!vif_ifname_to_idx(ssid_ifname, &ssid_index))
-@@ -966,10 +1135,12 @@ bool target_vif_config_set2(
- else
- {
- LOGI("%s: SSID updated to '%s'", ssid_ifname, tmp);
-+ #if !defined(CONFIG_RDK_EXTENDER)
- if (!sync_send_ssid_change(ssid_index, ssid_ifname, vconf->ssid))
- {
- LOGE("%s: Failed to sync SSID change to '%s'", ssid_ifname, vconf->ssid);
- }
-+ #endif
- }
- }
- }
-@@ -977,6 +1148,8 @@ bool target_vif_config_set2(
-
- if (changed->security && vconf->security_len)
- {
-+ //TODO: add proper WA
-+ #if !defined(CONFIG_RDK_EXTENDER)
- memset(&sec, 0, sizeof(sec));
- if (!security_to_syncmsg(vconf, &sec))
- {
-@@ -1018,6 +1191,7 @@ bool target_vif_config_set2(
- }
- }
- }
-+ #endif
- }
-
-
diff --git a/recipes-connectivity/opensync/files/remove-log-dup.patch b/recipes-connectivity/opensync/files/remove-log-dup.patch
deleted file mode 100644
index 8890e94..0000000
--- a/recipes-connectivity/opensync/files/remove-log-dup.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: rdk/rootfs/common/usr/plume/scripts/managers.init
-===================================================================
---- rdk.orig/rootfs/common/usr/plume/scripts/managers.init 2020-01-27 15:26:13.921034680 +0000
-+++ rdk/rootfs/common/usr/plume/scripts/managers.init 2020-01-27 15:27:04.707089802 +0000
-@@ -133,15 +133,6 @@
-
- echo "Starting OpenSync managers"
- start-stop-daemon -c ${RUN_USER} -S -b -x ${PLUME_BIN_DIR}/dm
-- sleep 10
-- managers="DM WM SM CM LM BM QM OM FSM"
-- ${PLUME_OVSH} d AW_Debug
-- for m in $managers
-- do
-- ${PLUME_OVSH} i AW_Debug name:=$m log_severity:=CRIT
-- done
-- sleep 3
-- ${PLUME_OVSH} i AW_Debug name:=NM log_severity:=CRIT
- }
-
- plume_stop() {
diff --git a/recipes-connectivity/opensync/files/service.patch b/recipes-connectivity/opensync/files/service.patch
index 582703a..fbdcecd 100644
--- a/recipes-connectivity/opensync/files/service.patch
+++ b/recipes-connectivity/opensync/files/service.patch
@@ -1,3 +1,6 @@
+Source: Mateusz Bajorski <mbajorski@plume.com>
+Subject: Add IMAGE_DEPLOYMENT_PROFILES specifications and backhaul credential
+
diff --git a/service-provider/academy/build/provider.mk b/service-provider/academy/build/provider.mk
new file mode 100644
index 0000000..c81cafd
diff --git a/recipes-connectivity/opensync/files/update-format-specifier-for-time_t.patch b/recipes-connectivity/opensync/files/update-format-specifier-for-time_t.patch
deleted file mode 100644
index 9c4bedf..0000000
--- a/recipes-connectivity/opensync/files/update-format-specifier-for-time_t.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/src/sm/src/sm_survey_report.c b/src/sm/src/sm_survey_report.c
-index 3e464e8..c94008c 100644
---- a/src/sm/src/sm_survey_report.c
-+++ b/src/sm/src/sm_survey_report.c
-@@ -967,7 +967,7 @@ bool sm_survey_threshold_util_cb (
- survey_ctx->threshold_record = *survey_entry;
-
- int threshold_util = result_entry.chan_tx + result_entry.chan_self;
-- LOGD("Checking %s %s survey threshold util: %d/%d delay: %ld/%d count: %d/%d",
-+ LOGD("Checking %s %s survey threshold util: %d/%d delay: %lld/%d count: %d/%d",
- radio_get_name_from_cfg(radio_cfg_ctx),
- radio_get_scan_name_from_type(scan_type),
- threshold_util, request_ctx->threshold_util,
-@@ -1099,7 +1099,7 @@ bool sm_survey_stats_update (
- scan_interval = SURVEY_MIN_SCAN_INTERVAL;
-
- // always scan if max_delay exceeded
-- LOGI("Force processing %s %s survey delay: %ld/%d count: %d/%d",
-+ LOGI("Force processing %s %s survey delay: %lld/%d count: %d/%d",
- radio_get_name_from_cfg(radio_cfg_ctx),
- radio_get_scan_name_from_type(scan_type),
- survey_ctx->threshold_time_delta, request_ctx->threshold_max_delay,
diff --git a/recipes-connectivity/opensync/opensync_%.bbappend b/recipes-connectivity/opensync/opensync_%.bbappend
new file mode 100644
index 0000000..5b443b7
--- /dev/null
+++ b/recipes-connectivity/opensync/opensync_%.bbappend
@@ -0,0 +1,19 @@
+CORE_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'extender', 'file://0002-Use-osync_hal-in-inet_gretap.patch', '', d)}"
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+OPENSYNC_VENDOR_URI = "git://git@github.com/rdkcentral/opensync-vendor-rdk-rpi.git;protocol=${CMF_GIT_PROTOCOL};branch=main;name=vendor;destsuffix=git/vendor/rpi"
+VENDOR_URI = "git://git@github.com/rdkcentral/opensync-vendor-rdk-rpi.git;protocol=${CMF_GIT_PROTOCOL};branch=main;name=vendor;destsuffix=git/vendor/rpi"
+VENDOR_URI += "file://config-rdk-multi-psk-disable.patch;patchdir=${WORKDIR}/git/"
+VENDOR_URI += "file://service.patch;patchdir=${WORKDIR}/git/"
+VENDOR_URI += "file://opensync.service"
+
+DEPENDS_append = " rdk-logger"
+DEPENDS_append_extender = " hal-wifi-cfg80211"
+
+RDK_CFLAGS += " -D_PLATFORM_RASPBERRYPI_"
+
+do_compile_prepend_broadband(){
+ cd ${WORKDIR}/git/vendor/rpi/
+ rm -rf src
+ cd -
+}
diff --git a/recipes-connectivity/opensync/opensync_2.0.5.bbappend b/recipes-connectivity/opensync/opensync_2.0.5.bbappend
deleted file mode 100644
index 596c6ae..0000000
--- a/recipes-connectivity/opensync/opensync_2.0.5.bbappend
+++ /dev/null
@@ -1,15 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-CORE_URI_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'extender', 'file://0002-Use-osync_hal-in-inet_gretap.patch', '', d)}"
-
-CORE_URI_append_dunfell = " file://absolute-value-glibc-dunfell-fix.patch"
-CORE_URI_append_dunfell = " file://dunfell-nm-crash-fix.patch"
-CORE_URI_append_dunfell = " ${@bb.utils.contains('DISTRO_FEATURES', 'extender', 'file://update-format-specifier-for-time_t.patch', '', d)}"
-
-VENDOR_URI = "git://git@github.com/rdkcentral/opensync-vendor-rdk-turris.git;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GITHUB_MASTER_BRANCH};name=vendor;destsuffix=git/vendor/turris"
-VENDOR_URI += "file://service.patch;patchdir=${WORKDIR}/git/"
-VENDOR_URI += "file://opensync.service"
-
-DEPENDS_append = " rdk-logger hal-wifi-cfg80211"
-
-RDK_CFLAGS += " -D_PLATFORM_TURRIS_"
diff --git a/recipes-connectivity/opensync/opensync_3.%.bbappend b/recipes-connectivity/opensync/opensync_3.%.bbappend
deleted file mode 100644
index 4ab741b..0000000
--- a/recipes-connectivity/opensync/opensync_3.%.bbappend
+++ /dev/null
@@ -1,15 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI_append_filogic = " file://999-mtk-add-vendor.patch;apply=no"
-SRC_URI_append_filogic = " file://999-mtk-fix-64bit-build.patch;apply=no"
-
-do_filogic_patches() {
- cd ${S}/../
- if [ ! -e patch_applied ]; then
- patch -p1 < ${WORKDIR}/999-mtk-add-vendor.patch
- patch -p1 < ${WORKDIR}/999-mtk-fix-64bit-build.patch
- touch patch_applied
- fi
-}
-
-addtask filogic_patches after do_patch before do_compile
diff --git a/recipes-connectivity/opensync/opensync_git.bbappend b/recipes-connectivity/opensync/opensync_git.bbappend
new file mode 100644
index 0000000..c521035
--- /dev/null
+++ b/recipes-connectivity/opensync/opensync_git.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+OPENSYNC_VENDOR_URI += "file://raspberrypi-rdk-broadband-target.patch;patchdir=${WORKDIR}/git/vendor/rpi"
+OPENSYNC_VENDOR_URI += " ${@bb.utils.contains('DISTRO_FEATURES', 'extender', 'file://opensync-4.4.service', '', d)} "
+OPENSYNC_PLATFORM_URI += " ${@bb.utils.contains('DISTRO_FEATURES', 'extender', 'file://platform-rdk.patch;patchdir=${WORKDIR}/git/platform/rdk', '', d)} "
+
+
+do_install_append_extender() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/opensync-4.4.service ${D}${systemd_unitdir}/system/opensync.service
+ rm ${D}/etc/ppp/*
+}
diff --git a/recipes-connectivity/wpa-supplicant-onewifi/files/configure_wpa_supplicant.sh b/recipes-connectivity/wpa-supplicant-onewifi/files/configure_wpa_supplicant.sh
new file mode 100644
index 0000000..ae12794
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant-onewifi/files/configure_wpa_supplicant.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+##########################################################################
+# If not stated otherwise in this file or this component's Licenses.txt
+# file the following copyright and licenses apply:
+#
+# Copyright 2023 RDK Management
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+
+WIFI_DIR="/opt/secure/wifi"
+WPA_SUP_CONF="${WIFI_DIR}/wpa_supplicant.conf"
+
+if [ ! -d "${WIFI_DIR}" ]; then
+ echo "Creating '${WIFI_DIR}'..."
+ mkdir -p ${WIFI_DIR}
+fi
+
+if [ ! -f "${WPA_SUP_CONF}" ]; then
+ echo "'${WPA_SUP_CONF}' not found; creating with deafult values..."
+ echo "ctrl_interface=/var/run/wpa_supplicant" >> ${WPA_SUP_CONF}
+ echo "ctrl_interface_group=0" >> ${WPA_SUP_CONF}
+ echo "update_config=1" >> ${WPA_SUP_CONF}
+ sync
+fi
diff --git a/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant-global.service b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant-global.service
new file mode 100644
index 0000000..fd9e34a
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant-global.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=WPA supplicant daemon
+
+[Service]
+Type=simple
+PIDFile=/var/run/wpa_supplicant-global.pid
+ExecStart=/usr/sbin/wpa_supplicant -g/var/run/wpa_supplicant-global -P /var/run/wpa_supplicant-global.pid
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.conf b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.conf
new file mode 100644
index 0000000..bd64ff7
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.conf
@@ -0,0 +1,4 @@
+ctrl_interface=/var/run/wpa_supplicant
+ctrl_interface_group=0
+update_config=1
+
diff --git a/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.service b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.service
new file mode 100644
index 0000000..dacf786
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant-onewifi/files/wpa_supplicant.service
@@ -0,0 +1,31 @@
+##########################################################################
+# If not stated otherwise in this file or this component's Licenses.txt
+# file the following copyright and licenses apply:
+#
+# Copyright 2016 RDK Management
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+[Unit]
+Description=Wifi Dnl802.11 interface
+Before=network.target
+Wants=network.target
+
+[Service]
+ExecStartPre=/lib/rdk/configure_wpa_supplicant.sh
+Type=forking
+RemainAfterExit=yes
+ExecStart=/usr/sbin/wpa_supplicant -B -Dnl80211 -iwlan0 -c /opt/secure/wifi/wpa_supplicant.conf -P/var/run/wpa_supplicant/wlan0.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-connectivity/wpa-supplicant-onewifi/wpa-supplicant_%.bbappend b/recipes-connectivity/wpa-supplicant-onewifi/wpa-supplicant_%.bbappend
new file mode 100644
index 0000000..fdfd338
--- /dev/null
+++ b/recipes-connectivity/wpa-supplicant-onewifi/wpa-supplicant_%.bbappend
@@ -0,0 +1,75 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append_camera = " \
+ file://wpa_supplicant.service \
+ file://wpa_supplicant.conf \
+"
+SRC_URI_append_hybrid = " \
+ file://wpa_supplicant.service \
+ file://configure_wpa_supplicant.sh \
+"
+SRC_URI_append_client = " \
+ file://wpa_supplicant.service \
+ file://configure_wpa_supplicant.sh \
+"
+SRC_URI_append_extender = " file://wpa_supplicant-global.service"
+
+EXTRA_OEMAKE = "CONFIG_BUILD_WPA_CLIENT_SO=y"
+FILES_SOLIBSDEV = ""
+do_install_append () {
+ install -d ${D}${includedir}
+ install -d ${D}${libdir}
+ install -d ${D}/lib/rdk/
+
+ install -m 0777 ${S}/wpa_supplicant/libwpa_client.so ${D}${libdir}/
+ install -m 0644 ${S}/src/common/wpa_ctrl.h ${D}${includedir}/
+}
+
+do_install_append_camera() {
+ install -D -m 0644 ${WORKDIR}/wpa_supplicant.service ${D}/lib/systemd/system/wpa_supplicant.service
+ install -D -m 0644 ${WORKDIR}/wpa_supplicant.conf ${D}/etc/wpa_supplicant.conf
+}
+do_install_append_hybrid() {
+ install -D -m 0644 ${WORKDIR}/wpa_supplicant.service ${D}/lib/systemd/system/wpa_supplicant.service
+ install -D -m 0755 ${WORKDIR}/configure_wpa_supplicant.sh ${D}/lib/rdk/
+}
+do_install_append_client() {
+ install -D -m 0644 ${WORKDIR}/wpa_supplicant.service ${D}/lib/systemd/system/wpa_supplicant.service
+ install -D -m 0755 ${WORKDIR}/configure_wpa_supplicant.sh ${D}/lib/rdk/
+}
+
+do_install_append_extender () {
+ install -m 0755 ${WORKDIR}/wpa_supplicant-global.service ${D}${systemd_unitdir}/system/
+}
+
+FILES_${PN} += "${libdir}/libwpa_client.so"
+FILES_${PN} += "${includedir}/wpa_ctrl.h"
+
+FILES_${PN}_append_camera = " \
+ ${systemd_unitdir}/system/wpa_supplicant.service \
+ ${sysconfdir}/wpa_supplicant.conf \
+"
+FILES_${PN}_append_hybrid = " \
+ ${systemd_unitdir}/system/wpa_supplicant.service \
+ /lib/rdk/configure_wpa_supplicant.sh \
+"
+FILES_${PN}_append_client = " \
+ ${systemd_unitdir}/system/wpa_supplicant.service \
+ /lib/rdk/configure_wpa_supplicant.sh \
+"
+
+inherit systemd
+SYSTEMD_SERVICE_${PN}_camera = "wpa_supplicant.service"
+SYSTEMD_AUTO_ENABLE_camera = "enable"
+FILES_${PN}_append_camera += "${systemd_unitdir}/system/*"
+
+SYSTEMD_SERVICE_${PN}_hybrid = "wpa_supplicant.service"
+SYSTEMD_AUTO_ENABLE_hybrid = "enable"
+FILES_${PN}_append_hybrid += "${systemd_unitdir}/system/*"
+
+SYSTEMD_SERVICE_${PN}_client = "wpa_supplicant.service"
+SYSTEMD_AUTO_ENABLE_client = "enable"
+FILES_${PN}_append_client += "${systemd_unitdir}/system/*"
+
+SYSTEMD_SERVICE_${PN}_extender = "wpa_supplicant-global.service"
+SYSTEMD_AUTO_ENABLE_${PN}_extender = "enable"
+
diff --git a/recipes-core/dbus/dbus_%.bbappend b/recipes-core/dbus/dbus_%.bbappend
new file mode 100644
index 0000000..03a0620
--- /dev/null
+++ b/recipes-core/dbus/dbus_%.bbappend
@@ -0,0 +1,20 @@
+do_install_append_lxcbrc () {
+
+ sed -i '/user>messagebus/c\<user>dbus</user>' ${D}/usr/share/dbus-1/system.conf
+ sed -i '/allow user/c\<deny user="*"/>\n<allow user="ccspcr"/>\n<allow user="psm"/>\n<allow user="pandm"/>\n<allow user="ccspwifi"/>\n<allow user="ccsplmlite"/>\n<allow user="root"/>' ${D}/usr/share/dbus-1/system.conf
+
+ sed -i '/ExecStart=/c\ExecStart=/container/DBUS/launcher/dbus.sh start' ${D}${systemd_system_unitdir}/dbus.service
+
+ sed -i "/ExecStart=/i\ExecStartPre=-/bin/sh -c 'mkdir -p /container/DBUS/rootfs/var/run/dbus'\nExecStartPre=-/bin/sh -c 'chown -R dbus:dbus /container/DBUS/rootfs/var/run/dbus'" ${D}${systemd_system_unitdir}/dbus.service
+
+ sed -i "/ExecStart=/a ExecStartPost=/bin/sh -c \'ln -sf /container/DBUS/rootfs/var/run/dbus/system_bus_socket /var/run/dbus/system_bus_socket\'" ${D}${systemd_system_unitdir}/dbus.service
+
+ sed -i "/ExecReload=/i ExecStop=/container/DBUS/launcher/dbus.sh stop" ${D}${systemd_system_unitdir}/dbus.service
+
+ sed -i "/ExecReload=/c\ExecReload=/container/DBUS/launcher/dbus.sh reload" ${D}${systemd_system_unitdir}/dbus.service
+}
+
+do_install_append_aarch64_broadband () {
+ # Removing dbus service in 64bit arch alone
+ rm ${D}${systemd_system_unitdir}/dbus.service
+}
diff --git a/recipes-core/packagegroups/packagegroup-filogic-mt76.bb b/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
index 2c96561..01e962e 100644
--- a/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
+++ b/recipes-core/packagegroups/packagegroup-filogic-mt76.bb
@@ -12,18 +12,18 @@
RDEPENDS_packagegroup-filogic-mt76 = " \
packagegroup-core-boot \
wireless-tools \
- hostapd \
- wpa-supplicant \
+ ${@bb.utils.contains('DISTRO_FEATURES','OneWifi','','hostapd',d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES','OneWifi','','wpa-supplicant',d)} \
wireless-regdb-static \
linux-mac80211 \
linux-mt76 \
iw \
ubus \
ubusd \
- usteer \
+ ${@bb.utils.contains('DISTRO_FEATURES','OneWifi','','usteer',d)} \
uci \
mt76-vendor \
- wifi-test-tool \
+ ${@bb.utils.contains('DISTRO_FEATURES','OneWifi','vts','wifi-test-tool',d)} \
atenl \
mt76-test \
iwinfo \
diff --git a/recipes-extended/vts/files/fix_build_and_startup_issue.patch b/recipes-extended/vts/files/fix_build_and_startup_issue.patch
new file mode 100644
index 0000000..48cea08
--- /dev/null
+++ b/recipes-extended/vts/files/fix_build_and_startup_issue.patch
@@ -0,0 +1,28 @@
+diff --git a/src/config_parser.c b/src/config_parser.c
+index 2d9cde0..34af2c9 100644
+--- a/src/config_parser.c
++++ b/src/config_parser.c
+@@ -26,7 +26,7 @@
+ #define RADIO_CONFIG "radio_config"
+ #define VAP_CONFIG "vap_config"
+ //#define TEST_DIR_PATH "../config/"
+-#define TEST_DIR_PATH "./"
++#define TEST_DIR_PATH "/etc/"
+ #define MIN_NUM_RADIOS 1
+ #define RET_OK 0
+ #define RET_ERR -1
+diff --git a/src/test_wifi_hal_ap.c b/src/test_wifi_hal_ap.c
+index a2ae20b..e70a722 100644
+--- a/src/test_wifi_hal_ap.c
++++ b/src/test_wifi_hal_ap.c
+@@ -3089,8 +3089,8 @@ static INT test_wifi_apDeAuthEvent_callback(int apIndex, char *mac, int reason)
+ void test_wifi_apDeAuthEvent_callback_register(void)
+ {
+ /* Positive */
+- wifi_apDeAuthEvent_callback_register(&test_wifi_apDeAuthEvent_callback);
+- wifi_apDeAuthEvent_callback_register(NULL);
++ //wifi_apDeAuthEvent_callback_register(&test_wifi_apDeAuthEvent_callback);
++ //wifi_apDeAuthEvent_callback_register(NULL);
+
+ /* Negative - N/A */
+ }
diff --git a/recipes-extended/vts/files/radio_config b/recipes-extended/vts/files/radio_config
new file mode 100644
index 0000000..ad41f12
--- /dev/null
+++ b/recipes-extended/vts/files/radio_config
@@ -0,0 +1,75 @@
+{
+ "WifiRadioConfig": [
+ {
+ "RadioIndex": 0,
+ "RadioName": "radio1",
+ "Enabled": true,
+ "FreqBand": 1,
+ "AutoChannelEnabled": true,
+ "Channel": 1,
+ "NumSecondaryChannels": 0,
+ "SecondaryChannelsList": " ",
+ "ChannelWidth": 2,
+ "HwMode": 12,
+ "CsaBeaconCount": 100,
+ "Country": "US",
+ "DcsEnabled": false,
+ "DtimPeriod": 1,
+ "OperatingClass": 0,
+ "BasicDataTransmitRates": 656,
+ "OperationalDataTransmitRates": 8112,
+ "FragmentationThreshold": 2346,
+ "GuardInterval": 16,
+ "TransmitPower": 100,
+ "BeaconInterval": 100,
+ "RtsThreshold": 2347,
+ "FactoryResetSsid": false,
+ "RadioStatsMeasuringRate": 0,
+ "RadioStatsMeasuringInterval": 0,
+ "CtsProtection": false,
+ "ObssCoex": false,
+ "StbcEnable": false,
+ "GreenFieldEnable": false,
+ "UserControl": 0,
+ "AdminControl": 0,
+ "ChanUtilThreshold": 90,
+ "ChanUtilSelfHealEnable": false
+ },
+ {
+ "RadioIndex": 1,
+ "RadioName": "radio2",
+ "Enabled": true,
+ "FreqBand": 2,
+ "AutoChannelEnabled": true,
+ "Channel": 40,
+ "NumSecondaryChannels": 0,
+ "SecondaryChannelsList": " ",
+ "ChannelWidth": 1,
+ "HwMode": 169,
+ "CsaBeaconCount": 100,
+ "Country": "US",
+ "DcsEnabled": false,
+ "DtimPeriod": 1,
+ "OperatingClass": 0,
+ "BasicDataTransmitRates": 656,
+ "OperationalDataTransmitRates": 8112,
+ "FragmentationThreshold": 2346,
+ "GuardInterval": 16,
+ "TransmitPower": 100,
+ "BeaconInterval": 100,
+ "RtsThreshold": 2347,
+ "FactoryResetSsid": false,
+ "RadioStatsMeasuringRate": 0,
+ "RadioStatsMeasuringInterval": 0,
+ "CtsProtection": false,
+ "ObssCoex": false,
+ "StbcEnable": false,
+ "GreenFieldEnable": false,
+ "UserControl": 0,
+ "AdminControl": 0,
+ "ChanUtilThreshold": 90,
+ "ChanUtilSelfHealEnable": false
+ }
+ ]
+}
+
diff --git a/recipes-extended/vts/files/vap_config b/recipes-extended/vts/files/vap_config
new file mode 100644
index 0000000..95ae4bd
--- /dev/null
+++ b/recipes-extended/vts/files/vap_config
@@ -0,0 +1,111 @@
+{
+ "WifiVapConfig": [
+ {
+ "VapIndex": 0,
+ "VapName": "private_ssid_2g",
+ "BridgeName": "brlan0",
+ "RadioIndex": 0,
+ "VapMode": 0,
+ "SSID": "filogic-onewifi0",
+ "BSSID": "0a:7e:64:fe:e4:61",
+ "Enabled": true,
+ "SSIDAdvertisementEnabled": true,
+ "IsolationEnable": false,
+ "ManagementFramePowerControl": 0,
+ "BssMaxNumSta": 32,
+ "BSSTransitionActivated": false,
+ "NeighborReportActivated": false,
+ "NetworkGreyList": false,
+ "RapidReconnCountEnable": true,
+ "RapidReconnThreshold": 180,
+ "VapStatsEnable": true,
+ "MacFilterEnable": false,
+ "MacFilterMode": 0,
+ "WmmEnabled": true,
+ "UapsdEnabled": true,
+ "BeaconRate": 16,
+ "WmmNoAck": 0,
+ "WepKeyLength": 128,
+ "BssHotspot": false,
+ "WpsPushButton": 0,
+ "WpsEnable": true,
+ "WpsConfigMethodsEnabled": 128,
+ "WpsPin": "",
+ "BeaconRateCtl": "6Mbps",
+ "Security": {
+ "MFPConfig": "Disabled",
+ "Mode": "WPA2-Personal",
+ "EncryptionMethod": "AES",
+ "Passphrase": ""
+ },
+ "Interworking": {
+ "InterworkingEnable": false,
+ "AccessNetworkType": 0,
+ "Internet": false,
+ "ASRA": false,
+ "ESR": false,
+ "UESA": false,
+ "HESSOptionPresent": true,
+ "HESSID": "11:22:33:44:55:66",
+ "Venue": {
+ "VenueType": 0,
+ "VenueGroup": 0
+ }
+ }
+ },
+ {
+ "VapIndex": 1,
+ "VapName": "private_ssid_5g",
+ "BridgeName": "brlan0",
+ "RadioIndex": 1,
+ "VapMode": 0,
+ "SSID": "filogic-onewifi1",
+ "BSSID": "0a:7e:64:05:e4:62",
+ "Enabled": true,
+ "SSIDAdvertisementEnabled": true,
+ "IsolationEnable": false,
+ "ManagementFramePowerControl": 0,
+ "BssMaxNumSta": 32,
+ "BSSTransitionActivated": false,
+ "NeighborReportActivated": false,
+ "NetworkGreyList": false,
+ "RapidReconnCountEnable": true,
+ "RapidReconnThreshold": 180,
+ "VapStatsEnable": true,
+ "MacFilterEnable": false,
+ "MacFilterMode": 0,
+ "WmmEnabled": true,
+ "UapsdEnabled": true,
+ "BeaconRate": 16,
+ "WmmNoAck": 0,
+ "WepKeyLength": 128,
+ "BssHotspot": false,
+ "WpsPushButton": 0,
+ "WpsEnable": true,
+ "WpsConfigMethodsEnabled": 128,
+ "WpsPin": "",
+ "BeaconRateCtl": "6Mbps",
+ "Security": {
+ "MFPConfig": "Disabled",
+ "Mode": "WPA2-Personal",
+ "EncryptionMethod": "AES",
+ "Passphrase": ""
+ },
+ "Interworking": {
+ "InterworkingEnable": false,
+ "AccessNetworkType": 0,
+ "Internet": false,
+ "ASRA": false,
+ "ESR": false,
+ "UESA": false,
+ "HESSOptionPresent": true,
+ "HESSID": "11:22:33:44:55:66",
+ "Venue": {
+ "VenueType": 0,
+ "VenueGroup": 0
+ }
+ }
+ }
+ ]
+}
+
diff --git a/recipes-extended/vts/vts.bb b/recipes-extended/vts/vts.bb
new file mode 100644
index 0000000..0136b11
--- /dev/null
+++ b/recipes-extended/vts/vts.bb
@@ -0,0 +1,56 @@
+LICENSE="CLOSED"
+
+DEPENDS += " rdk-wifi-hal hal-wifi-generic"
+SRC_URI = " \
+ ${CMF_GITHUB_ROOT}/rdkb-wifi-hal;protocol=https;branch=feature/TDK-6732;name=wifihal \
+ ${CMF_GITHUB_ROOT}/rdkb-wifi-haltest;protocol=https;branch=feature/TDK-7346;name=ut;destsuffix=git/ut \
+ ${CMF_GITHUB_ROOT}/ut-core;protocol=https;branch=develop;name=ut-core;destsuffix=git/ut/ut-core \
+ https://sourceforge.net/projects/cunit/files/CUnit/2.1-3/CUnit-2.1-3.tar.bz2;name=cunit;destsuffix=git/ut/ut-core/framework \
+ git://github.com/jwerle/asprintf.c;branch=master;protocol=https;name=asprintf;destsuffix=git/ut/ut-core/framework/asprintf/asprintf.c-master \
+ git://github.com/pantoniou/libfyaml;branch=master;protocol=https;name=libfyaml;destsuffix=git/ut/ut-core/framework/libfyaml-master \
+ file://fix_build_and_startup_issue.patch;apply=no \
+ file://radio_config \
+ file://vap_config \
+ "
+SRCREV_wifihal = "${AUTOREV}"
+SRCREV_ut = "${AUTOREV}"
+SRCREV_ut-core = "${AUTOREV}"
+SRCREV_asprintf = "${AUTOREV}"
+SRCREV_libfyaml = "${AUTOREV}"
+SRC_URI[cunit.sha256sum] = "f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214"
+
+SRCREV_FORMAT = "wifihal_ut_ut-core"
+
+S = "${WORKDIR}/git/ut"
+
+do_configure(){
+ cp ${WORKDIR}/CUnit-2.1-3/CUnit/Headers/CUnit.h.in ${WORKDIR}/CUnit-2.1-3/CUnit/Headers/CUnit.h
+ cp -rf ${WORKDIR}/CUnit-2.1-3 ${S}/ut-core/framework
+ rm ${S}/ut-core/framework/asprintf/asprintf.c-master/test.c
+ cp -f ${S}/ut-core/src/libyaml/patches/CorrectWarningsAndBuildIssuesInLibYaml.patch ${S}/ut-core/framework/
+ cp -f ${S}/ut-core/src/cunit/cunit_lgpl/patches/CorrectBuildWarningsInCunit.patch ${S}/ut-core/framework/
+ cd ${S}/ut-core/framework/
+ patch -p0 < CorrectWarningsAndBuildIssuesInLibYaml.patch
+ patch -u CUnit-2.1-3/CUnit/Sources/Framework/TestRun.c -i CorrectBuildWarningsInCunit.patch
+}
+
+do_filogic_patches() {
+ cd ${S}
+ if [ ! -e patch_applied ]; then
+ patch -p1 < ${WORKDIR}/fix_build_and_startup_issue.patch
+ touch patch_applied
+ fi
+}
+addtask filogic_patches after do_patch before do_compile
+
+do_compile (){
+ cd ${S}
+ oe_runmake TARGET=arm
+}
+
+do_install(){
+ install -d ${D}/usr/sbin ${D}${sysconfdir}
+ install -m 0755 ${S}/bin/hal_test ${D}/usr/sbin
+ install -m 0644 ${WORKDIR}/radio_config ${D}${sysconfdir}/
+ install -m 0644 ${WORKDIR}/vap_config ${D}${sysconfdir}/
+}
\ No newline at end of file
diff --git a/recipes-networking/openvswitch/openvswitch_git.bbappend b/recipes-networking/openvswitch/openvswitch_git.bbappend
index 2a4abc8..1c2d772 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bbappend
+++ b/recipes-networking/openvswitch/openvswitch_git.bbappend
@@ -1,14 +1,11 @@
DEPENDS_remove = "virtual/kernel bridge-utils"
-DEPENDS_append_class-target = " virtual/kernel kernel-devsrc"
+DEPENDS_append_class-target = " virtual/kernel"
DEPENDS_append_class-target = " bridge-utils"
-EXTRA_OECONF += "--enable-ssl"
-EXTRA_OECONF_class-target_dunfell += "--with-linux=${STAGING_KERNEL_BUILDDIR} --with-linux-source=${STAGING_KERNEL_DIR} KARCH=${UBOOT_ARCH} PYTHON=python3 PYTHON3=python3 PERL=${bindir}/perl "
+
+EXTRA_OECONF += "--enable-ssl"
#disable openvswitch autostart
SYSTEMD_SERVICE_${PN}-switch = ""
-do_compile_prepend() {
- export CROSS_COMPILE=`echo '${TARGET_PREFIX}'`
-}
-PACKAGECONFIG[ssl] = " "
+PACKAGECONFIG[ssl] = " "
\ No newline at end of file