From fc59cddae881f506aac78464c7393fb4469c3728 Mon Sep 17 00:00:00 2001 From: libc0607 Date: Thu, 4 Apr 2024 14:15:40 +0800 Subject: [PATCH] package/wifibroadcast: add driver_txpower_override support & regd unlock for rtl8812eu --- general/package/wifibroadcast/files/wifibroadcast | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/general/package/wifibroadcast/files/wifibroadcast b/general/package/wifibroadcast/files/wifibroadcast index 68bd3929c..3309cf258 100755 --- a/general/package/wifibroadcast/files/wifibroadcast +++ b/general/package/wifibroadcast/files/wifibroadcast @@ -45,8 +45,8 @@ detect_wifi_card() { ;; "0bda:a81a") - driver="realtek" - modprobe 8812eu + driver="realtek_8812eu" + modprobe 8812eu rtw_regd_src=1 rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0 ;; "0cf3:9271" | "040d:3801") @@ -90,6 +90,10 @@ load_interface() { if [ ${driver} = "realtek" ]; then ifconfig ${wlan} up iwconfig ${wlan} mode monitor + elif [ ${driver} = "realtek_8812eu" ]; then + ifconfig ${wlan} up + iwconfig ${wlan} mode monitor + iw dev ${wlan} set txpower fixed $(echo "${driver_txpower_override}*50"|bc) elif [ ${driver} = "atheros" ]; then iwconfig ${wlan} mode monitor ifconfig ${wlan} up