diff --git a/distributions/JELOS/options b/distributions/JELOS/options index 3aa1ceed5..7c6c01a97 100644 --- a/distributions/JELOS/options +++ b/distributions/JELOS/options @@ -73,7 +73,7 @@ # for a list of additional drivers see packages/linux-drivers # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="RTL8821CU RTL8812AU" + ADDITIONAL_DRIVERS="RTL8821CU RTL8812AU RTL8821AU" # build and install bluetooth support (yes / no) BLUETOOTH_SUPPORT="yes" diff --git a/packages/kernel/linux-drivers/RTL8821AU/modprobe.d/8812au.conf b/packages/kernel/linux-drivers/RTL8821AU/modprobe.d/8812au.conf new file mode 100644 index 000000000..abfc21fd6 --- /dev/null +++ b/packages/kernel/linux-drivers/RTL8821AU/modprobe.d/8812au.conf @@ -0,0 +1,155 @@ +# /etc/modprobe.d/8812au.conf +# +# Purpose: Allow easy access to specific driver options. +# +# Edit the following line to change, add or delete options: +options 8812au rtw_drv_log_level=0 rtw_led_ctrl=1 rtw_vht_enable=1 rtw_power_mgnt=1 rtw_beamform_cap=0 rtw_dfs_region_domain=0 rtw_switch_usb_mode=0 +# +# After editing is complete, save this file (if using nano: Ctrl + x, y, Enter) +# and reboot to activate the changes. +# +# Documentation: +# +# ----- +# +# Log options ( rtw_drv_log_level ) +# +# 0 = NONE (default) +# 1 = ALWAYS +# 2 = ERROR +# 3 = WARNING +# 4 = INFO +# 5 = DEBUG +# 6 = MAX +# +# Note: You can save a log file that only includes RTW log entries by running +# the following in a terminal: +# +# sudo ./save-log.sh +# +# Note: The name of the log file will be ```rtw.log```. +# +# ----- +# +# LED options ( rtw_led_ctrl ) +# +# 0 = Always off +# 1 = Normal blink (default) +# 2 = Always on +# +# ----- +# +# VHT options ( rtw_vht_enable ) +# +# 0 = Disable +# 1 = Enable (default) +# 2 = Force auto enable (use only for 5 GHz AP mode) +# +# Notes: +# - A non-default setting can degrade performance greatly in managed mode. +# - Option 2 allows 80 MHz channel width for 5GHz AP mode, such as when +# you are using hostapd. +# +# ----- +# +# Power options ( rtw_power_mgnt ) +# +# 0 = Disable power saving +# 1 = Power saving on, minPS (default) +# 2 = Power saving on, maxPS (not recommended for AP mode) +# +# ----- +# +# Beamforming options ( rtw_beamform_cap ) +# +# 0 = Disable (default) +# 1 = SU Beamformer +# 2 = SU Beamformee +# 3 = SU Beamformer and SU Beamformee +# 10= SU Beamformee and MU Beamformee +# 11= SU Beamformer and SU Beamformee and MU Beamformee +# +# Note: MU Beamformer is not supported. +# +# ----- +# +# Country Code options ( rtw_country_code ) +# +# Note: Allows the Country Code to be set in cases where it is unable to +# be obtained from the operating system. +# +# Example for the US: rtw_country_code=US +# Example for Panama: rtw_country_code=PA +# Example for Norway: rtw_country_code=NO +# Example for Kuwait: rtw_country_code=KW +# Example for Taiwan: rtw_country_code=TW +# +# ----- +# +# DFS Options ( rtw_dfs_region_domain ) +# +# 0 = NONE (default) +# 1 = FCC +# 2 = MKK +# 3 = ETSI +# +# Notes: +# - Activates DFS channels in AP mode. +# - DFS FCC 80 MHz channels for hostapd: 52(58), 100(106), 116(122) and 132(138) +# - For more information: https://en.wikipedia.org/wiki/List_of_WLAN_channels +# +# Note: An AP needs to listen on a DFS channel for a period of 60 seconds +# before transmitting on the channel. If any radar pulses are detected, +# the AP cannot use that channel and will have to try a different channel. +# +# ----- +# +# Select P2P interface in concurrent mode ( rtw_sel_p2p_iface ) +# +# 0 = Sets interface 0 to be p2p interface +# 1 = Sets interface 1 to be p2p interface (default) +# +# ----- +# +# USB options: ( rtw_switch_usb_mode ) +# +# 0 = No switch (default) +# 1 = Switch from usb 2.0 to usb 3.0 +# 2 = Switch from usb 3.0 to usb 2.0 +# +# ----- +# +# To see all options that are available: +# +# $ ls /sys/module/8812au/parameters/ +# +# ----- +# +# To see the values that are in use: +# +# $ grep [[:alnum:]] /sys/module/8812au/parameters/* +# +# ----- +# +# hostapd setup information for rtl8812au +# Note: The best settings can vary but the following may be a good place to start. +# +# /etc/modprobe.d/8812au.conf +# options 8812au rtw_drv_log_level=0 rtw_led_ctrl=0 rtw_vht_enable=2 rtw_power_mgnt=1 rtw_beamform_cap=0 rtw_dfs_region_domain=1 rtw_switch_usb_mode=1 +# +# Note: The best setting for `rtw_dfs_region_domain=` will depend on your location. +# +# /etc/hostapd/hostapd.conf +# +# hw ht capab: 0x862 +# ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935] +# +# hw vht capab: 0x03c001a2 +# vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][HTC-VHT][MAX-A-MPDU-LEN-EXP7] +# +# ----- + + + + + diff --git a/packages/kernel/linux-drivers/RTL8821AU/package.mk b/packages/kernel/linux-drivers/RTL8821AU/package.mk new file mode 100644 index 000000000..58206b9b2 --- /dev/null +++ b/packages/kernel/linux-drivers/RTL8821AU/package.mk @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) +# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) +# Copyright (C) 2021-present Fewtarius + +PKG_NAME="RTL8821AU" +PKG_VERSION="377d3ca" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/morrownr/8821au-20210708" +PKG_URL="${PKG_SITE}.git" +PKG_DEPENDS_TARGET="toolchain linux" +PKG_NEED_UNPACK="${LINUX_DEPENDS}" +PKG_LONGDESC="Realtek 8821AU driver for 4.4-5.x" +PKG_IS_KERNEL_PKG="yes" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make V=1 \ + ARCH=${TARGET_KERNEL_ARCH} \ + KSRC=$(kernel_path) \ + CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \ + CONFIG_POWER_SAVING=n +} + +makeinstall_target() { + mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} + cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} +}