diff --git a/Makefile b/Makefile index 885eb55..a358f19 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,12 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk define KernelPackage/rtl88x2bu-cl - SUBMENU:=Wireless Drivers - TITLE:=Realtek 88x2BU driver by RinCat - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT - FILES:=\ - $(PKG_BUILD_DIR)/rtl88x2bu.ko - AUTOLOAD:=$(call AutoProbe,rtl88x2bu) - PROVIDES:=kmod-rtl88x2bu + SUBMENU:=Wireless Drivers + TITLE:=Realtek 88x2BU driver by RinCat + DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT + FILES:=$(PKG_BUILD_DIR)/rtl88x2bu.ko + AUTOLOAD:=$(call AutoProbe,rtl88x2bu) + PROVIDES:=kmod-rtl88x2bu endef NOSTDINC_FLAGS := \ @@ -44,6 +43,22 @@ endif NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT +define Build/Prepare + $(call Build/Prepare/Default) + $(shell PATCHDIR=$$(pwd); \ + cd $(TOPDIR); \ + REBUILD_PATCHED=0; \ + for PATCH in $$PATCHDIR/openwrt_patches/*; do \ + if ! git apply -q -R --check <$$PATCH; then \ + git apply -v <$$PATCH; \ + REBUILD_PATCHED=1; \ + fi; \ + done; \ + if [ $$REBUILD_PATCHED -eq 1 ] ; then \ + $$(make package/iwinfo/compile); \ + fi \ + ) +endef define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ diff --git a/README.md b/README.md index ade2e8d..3a21809 100644 --- a/README.md +++ b/README.md @@ -91,33 +91,13 @@ git clone https://github.com/mirobiala/rtl88x2bu-cl package/kernel/rtl88x2bu-cl cd package/kernel/rtl88x2bu-cl git branch -a git tag -git checkout v1.0.1 +git checkout v1.0.2 cd ../../../ ``` * Download the default config for the **desired** target: ``` wget https://downloads.openwrt.org/releases/23.05.2/targets//config.buildinfo -O .config ``` -* If you want actual _vendor_ and _device_ names for [OpenWRT](https://openwrt.org/) instead of _Generic MAC80211_, you need to add them in the `devices.txt` file, `USB devices` section: -``` -# rtl88x2bu-cl/os_dep/linux/usb_intf.c -0x0000 0x0000 0x0b05 0x1841 0 0 "ASUS" "AC1300 USB-AC55 B1" -0x0000 0x0000 0x0b05 0x184C 0 0 "ASUS" "U2" -0x0000 0x0000 0x0B05 0x19AA 0 0 "ASUS" "USB-AC58" -0x0000 0x0000 0x7392 0xB822 0 0 "Edimax" "EW-7822ULC" -0x0000 0x0000 0x7392 0xC822 0 0 "Edimax" "EW-7822UTC" -0x0000 0x0000 0x7392 0xF822 0 0 "Edimax" "EW-7822UAD" -0x0000 0x0000 0x2001 0x331e 0 0 "Dlink" "DWA-181" -0x0000 0x0000 0x2001 0x331c 0 0 "Dlink" "DWA-182" -0x0000 0x0000 0x2001 0x331f 0 0 "Dlink" "DWA-183 D Ver" -0x0000 0x0000 0x2001 0x3322 0 0 "Dlink" "DWA-T185" -0x0000 0x0000 0x0846 0x9055 0 0 "NetGear" "A6150" -0x0000 0x0000 0x2357 0x012D 0 0 "TP-Link" "Archer T3U" -0x0000 0x0000 0x2357 0x012E 0 0 "TP-Link" "Archer T3U Nano" -0x0000 0x0000 0x2357 0x0138 0 0 "TP-Link" "Archer T3U Plus" -0x0000 0x0000 0x2357 0x0115 0 0 "TP-Link" "Archer T4U V3" -0x0000 0x0000 0x20F4 0x808A 0 0 "TRENDnet" "TEW-808UBM" -``` * Compile and build the [OpenWRT](https://openwrt.org/) image. ``` make menuconfig diff --git a/openwrt_patches/0001-add-vendor-and-device-names.patch b/openwrt_patches/0001-add-vendor-and-device-names.patch new file mode 100644 index 0000000..6ffd168 --- /dev/null +++ b/openwrt_patches/0001-add-vendor-and-device-names.patch @@ -0,0 +1,30 @@ +--- /dev/null ++++ b/package/network/utils/iwinfo/patches/0001-rtl88x2bu-cl.patch +@@ -0,0 +1,27 @@ ++--- a/devices.txt +++++ b/devices.txt ++@@ -235,6 +235,24 @@ ++ # mt7615/usb.c ++ 0x0000 0x0000 0x0e8d 0x7663 0 0 "MediaTek" "MT7663U" ++ 0x0000 0x0000 0x043e 0x310c 0 0 "LG" "LGSBWAC02" +++# rtl88x2bu-cl/os_dep/linux/usb_intf.c +++0x0000 0x0000 0x13b1 0x0043 0 0 "Alpha" "Alpha" +++0x0000 0x0000 0x0b05 0x1841 0 0 "ASUS" "AC1300 USB-AC55 B1" +++0x0000 0x0000 0x0b05 0x184C 0 0 "ASUS" "U2" +++0x0000 0x0000 0x0B05 0x19AA 0 0 "ASUS" "USB-AC58" +++0x0000 0x0000 0x7392 0xB822 0 0 "Edimax" "EW-7822ULC" +++0x0000 0x0000 0x7392 0xC822 0 0 "Edimax" "EW-7822UTC" +++0x0000 0x0000 0x7392 0xF822 0 0 "Edimax" "EW-7822UAD" +++0x0000 0x0000 0x2001 0x331e 0 0 "Dlink" "DWA-181" +++0x0000 0x0000 0x2001 0x331c 0 0 "Dlink" "DWA-182" +++0x0000 0x0000 0x2001 0x331f 0 0 "Dlink" "DWA-183 D Ver" +++0x0000 0x0000 0x2001 0x3322 0 0 "Dlink" "DWA-T185" +++0x0000 0x0000 0x0846 0x9055 0 0 "NetGear" "A6150" +++0x0000 0x0000 0x2357 0x012D 0 0 "TP-Link" "Archer T3U" +++0x0000 0x0000 0x2357 0x012E 0 0 "TP-Link" "Archer T3U Nano" +++0x0000 0x0000 0x2357 0x0138 0 0 "TP-Link" "Archer T3U Plus" +++0x0000 0x0000 0x2357 0x0115 0 0 "TP-Link" "Archer T4U V3" +++0x0000 0x0000 0x20F4 0x808A 0 0 "TRENDnet" "TEW-808UBM" ++ ++ # FDT compatible strings ++ # "compatible" | txpower offset | frequency offset | ...