From c542e4c0b1527e37d725f0c22e6e7d3e6a418ee7 Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Sun, 28 Apr 2024 19:23:14 +0200 Subject: [PATCH] [no ci] Wifibroadcast: add support for RTL8733BU (#1423) --- .../rtl8733bu-openipc/rtl8733bu-openipc.mk | 6 ++++- .../package/wifibroadcast/files/wifibroadcast | 25 ++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/general/package/rtl8733bu-openipc/rtl8733bu-openipc.mk b/general/package/rtl8733bu-openipc/rtl8733bu-openipc.mk index c3907840..ce8134fb 100644 --- a/general/package/rtl8733bu-openipc/rtl8733bu-openipc.mk +++ b/general/package/rtl8733bu-openipc/rtl8733bu-openipc.mk @@ -5,7 +5,11 @@ ################################################################################ RTL8733BU_OPENIPC_SITE = $(call github,openipc,realtek-wlan,$(RTL8733BU_OPENIPC_VERSION)) -RTL8733BU_OPENIPC_VERSION = rtl8733bu +ifeq ($(OPENIPC_VARIANT),fpv) + RTL8733BU_OPENIPC_VERSION = rtl8733bu_fpv +else + RTL8733BU_OPENIPC_VERSION = rtl8733bu +endif RTL8733BU_OPENIPC_LICENSE = GPL-2.0 RTL8733BU_OPENIPC_LICENSE_FILES = COPYING diff --git a/general/package/wifibroadcast/files/wifibroadcast b/general/package/wifibroadcast/files/wifibroadcast index 8a61770a..f976889b 100755 --- a/general/package/wifibroadcast/files/wifibroadcast +++ b/general/package/wifibroadcast/files/wifibroadcast @@ -35,7 +35,7 @@ detect_wifi_card() { for card in $devices; do case "$card" in "0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012") - driver="realtek" + driver="realtek_88XXau" modprobe 88XXau rtw_tx_pwr_idx_override="$driver_txpower_override" ;; @@ -44,9 +44,14 @@ detect_wifi_card() { modprobe 8812eu rtw_regd_src=1 rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0 ;; + "0bda:f72b") + driver="realtek_8733bu" + modprobe 8733bu rtw_regd_src=1 rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0 + ;; + "0cf3:9271" | "040d:3801") driver="atheros" - if ! [ "$unit" = "gs" ]; then + if [ "$unit" != "gs" ]; then set_mcs fi modprobe mac80211 @@ -80,28 +85,18 @@ load_modules() { } 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 + ifconfig "$wlan" up + iwconfig "$wlan" mode monitor + if [ "$driver" = "realtek_8812eu" ] || [ "$driver" = "realtek_8733bu" ]; then iw dev "$wlan" set txpower fixed $((driver_txpower_override * 50)) - elif [ "$driver" = "atheros" ]; then - iwconfig "$wlan" mode monitor - ifconfig "$wlan" up fi iw reg set "$region" - if [ -n "$frequency" ]; then iwconfig "$wlan" freq "$frequency" else iwconfig "$wlan" channel "$channel" fi - - # Set txpower - #iw dev $wlan set txpower fixed $(($txpower * 100)) } start_drone_wfb() {