mirror of https://github.com/OpenIPC/firmware.git
Add RTL8812EU driver & wifibroadcast script support for FPV firmware (#1393)
Co-authored-by: Dmitry Ilyin <dima@doty.ru>pull/1406/head
parent
19d668098c
commit
ff27178acf
|
@ -78,6 +78,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/osd-openipc/Config.in"
|
|||
source "$BR2_EXTERNAL_GENERAL_PATH/package/quirc-openipc/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rcjoystick/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rockchip-osdrv-rv11xx/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl88x2eu-openipc/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl8812au/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl8188eus-openipc/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl8188fu-openipc/Config.in"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
||||
-EXTRA_CFLAGS += -O1
|
||||
+EXTRA_CFLAGS += -Os
|
||||
#EXTRA_CFLAGS += -O3
|
||||
+EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
#EXTRA_CFLAGS += -Wall
|
||||
#EXTRA_CFLAGS += -Wextra
|
||||
#EXTRA_CFLAGS += -Werror
|
|
@ -0,0 +1,16 @@
|
|||
config BR2_PACKAGE_RTL88X2EU_OPENIPC
|
||||
bool "rtl88x2eu-openipc"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
A standalone driver for the RTL88X2EU Dual Band
|
||||
USB Wi-Fi adapter.
|
||||
|
||||
Make sure your target kernel has the CONFIG_WIRELESS_EXT
|
||||
config option enabled.
|
||||
|
||||
Note: this package needs a firmware loading mechanism to
|
||||
load the binary blob for the chip to work.
|
||||
|
||||
|
||||
comment "rtl88x2eu needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
|
@ -0,0 +1,24 @@
|
|||
################################################################################
|
||||
#
|
||||
# rtl88x2eu-openipc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(LOCAL_DOWNLOAD),y)
|
||||
RTL88X2EU_OPENIPC_SITE_METHOD = git
|
||||
RTL88X2EU_OPENIPC_SITE = https://github.com/libc0607/rtl88x2eu-20230815
|
||||
RTL88X2EU_OPENIPC_VERSION = $(shell git ls-remote $(RTL88X2EU_OPENIPC_SITE) HEAD | head -1 | cut -f1)
|
||||
else
|
||||
RTL88X2EU_OPENIPC_SITE = https://github.com/libc0607/rtl88x2eu-20230815/archive
|
||||
RTL88X2EU_OPENIPC_SOURCE = master.tar.gz
|
||||
endif
|
||||
|
||||
RTL88X2EU_OPENIPC_LICENSE = GPL-2.0
|
||||
RTL88X2EU_OPENIPC_LICENSE_FILES = COPYING
|
||||
|
||||
RTL88X2EU_OPENIPC_MODULE_MAKE_OPTS = CONFIG_RTL8822EU=m \
|
||||
KVER=$(LINUX_VERSION_PROBED) \
|
||||
KSRC=$(LINUX_DIR)
|
||||
|
||||
$(eval $(kernel-module))
|
||||
$(eval $(generic-package))
|
|
@ -30,6 +30,10 @@ set_mcs() {
|
|||
fi
|
||||
}
|
||||
|
||||
# "0bda:8813" -> (8814) -> 8814au
|
||||
# "0846:9052" -> (8811) -> 8821au
|
||||
# "0bda:a81a" -> 88x2eu
|
||||
|
||||
detect_wifi_card() {
|
||||
devices=$(lsusb | cut -d ' ' -f6 | sort | uniq)
|
||||
for card in $devices; do
|
||||
|
@ -39,6 +43,11 @@ detect_wifi_card() {
|
|||
modprobe 88XXau rtw_tx_pwr_idx_override="$driver_txpower_override"
|
||||
;;
|
||||
|
||||
"0bda:a81a")
|
||||
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")
|
||||
driver="atheros"
|
||||
if ! [ "$unit" = "gs" ]; then
|
||||
|
@ -78,6 +87,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 $(expr ${driver_txpower_override} * 50)
|
||||
elif [ "$driver" = "atheros" ]; then
|
||||
iwconfig "$wlan" mode monitor
|
||||
ifconfig "$wlan" up
|
||||
|
|
Loading…
Reference in New Issue