[no ci] Wifibroadcast: add support for RTL8733BU (#1423)

pull/1426/head
viktorxda 2024-04-28 19:23:14 +02:00 committed by GitHub
parent 33783e7208
commit c542e4c0b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 16 deletions

View File

@ -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

View File

@ -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() {