From c66020fbc6041c7c567f4c6d43e92ae3766699ef Mon Sep 17 00:00:00 2001 From: "Justin.Guo" Date: Fri, 29 Aug 2025 10:24:40 +0800 Subject: [PATCH] qca-wifi-7: WF-672A, AFC pending, enable only 2-band mode Fixes: WIFI-15000 Signed-off-by: Justin.Guo --- .../cig-platform-pkg/cig-wifi-mode-sw/Makefile | 2 ++ .../cig-wifi-mode-sw/files/cig_wifi_mode_boot | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/files/cig_wifi_mode_boot diff --git a/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/Makefile b/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/Makefile index 8863802b9..58fed8e94 100644 --- a/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/Makefile +++ b/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/Makefile @@ -24,7 +24,9 @@ endef define KernelPackage/cig-wifi-mode-sw/install $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_BIN) ./files/cig_wifi_mode_sw $(1)/usr/sbin/cig_wms + $(INSTALL_BIN) ./files/cig_wifi_mode_boot $(1)/etc/init.d/cig_wmb endef $(eval $(call KernelPackage,cig-wifi-mode-sw)) diff --git a/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/files/cig_wifi_mode_boot b/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/files/cig_wifi_mode_boot new file mode 100755 index 000000000..f845fe7b1 --- /dev/null +++ b/feeds/qca-wifi-7/cig-platform-pkg/cig-wifi-mode-sw/files/cig_wifi_mode_boot @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=60 + +boot(){ + local bands=$(cat /proc/rf_switch) + + if [ "x$bands" = "x3" ]; then + echo "AFC is not ready, switch to 2-band mode" >/dev/console + echo 2 > /proc/rf_switch + firstboot -y -r + fi +}