Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
a9c6efd
Update README.md
morrownr Jul 25, 2024
610e04f
wifi: rtw88: Avoid using macid 0 in AP mode
Jul 27, 2024
e1ce199
Update for compilation in kernel v6.11
5kft Jul 29, 2024
5bacfb3
Clean up Makefile
a5a5aa555oo Jul 22, 2024
dcf5621
Clean up dkms.conf
a5a5aa555oo Jul 22, 2024
fd9ff7d
Blacklist in-kernel rtw88 driver after installation
a5a5aa555oo Jul 22, 2024
acafbf7
Simplify the uninstall target in Makefile
a5a5aa555oo Jul 24, 2024
f80a60b
Update Makefile
morrownr Aug 9, 2024
9a3e610
Update blacklist-rtw88.conf for new 8821au and 8812au drivers
morrownr Aug 9, 2024
a41b123
Update blacklist-rtw88.conf to correct for typo
morrownr Aug 9, 2024
9f5d3a3
Update README.md regarding the new automatic blacklisting
morrownr Aug 9, 2024
d320202
Suppress error messages when running 'sudo make uninstall'
a5a5aa555oo Aug 10, 2024
056d740
Merge pull request #228 from a5a5aa555oo/master
morrownr Aug 10, 2024
f589fb8
Fix module unloading when removing the driver
a5a5aa555oo Aug 10, 2024
a96a433
Merge pull request #230 from a5a5aa555oo/master
morrownr Aug 11, 2024
f032993
Update rtw8812au.c to update copyright year
morrownr Aug 22, 2024
764a1ee
Update rtw8821au.c to update copyright year
morrownr Aug 22, 2024
8742be6
Fix USB RX aggregation
Oct 1, 2024
d528d7d
wifi: rtw88: Un-embed dummy device
Oct 13, 2024
7b64dfc
wifi: rtw88: debugfs: support multiple adapters debugging
Oct 13, 2024
fa95089
wifi: rtw88: 8822c: Parse channel from IE to correct invalid hardware…
Oct 13, 2024
9bac946
wifi: rtw88: always wait for both firmware loading attempts
Oct 13, 2024
197e506
Revert "wifi: rtw88: Init RX burst length for 8822cu/8822bu/8821cu"
Oct 13, 2024
9e7ceef
wifi: rtw88: usb: Init RX burst length according to USB speed
Oct 13, 2024
afe3aef
Sync the USB RX aggregation with upstream
Oct 13, 2024
6c8b460
Sync rtw_usb_rx_handler with upstream
Oct 13, 2024
ed02ffc
wifi: rtw88: remove CPT execution branch never used
Oct 13, 2024
8d8578a
Fix SDIO devices not transmitting beacons
Oct 13, 2024
0548696
Revert "wifi: rtw88: Avoid using macid 0 in AP mode"
Oct 13, 2024
557078c
wifi: rtw88: assign mac_id for vif/sta and update to TX desc
Oct 13, 2024
711bf57
wifi: rtw88: Constify some arrays and structs
Oct 13, 2024
d817255
wifi: rtw88: use ieee80211_purge_tx_queue() to purge TX skb
Oct 13, 2024
ae34dfa
wifi: rtw88: Parse the RX descriptor with a single function
Oct 13, 2024
8a07dbf
Update 8821au/8812au to match v2 of the upstream patches
Oct 13, 2024
8a14dca
Fix indentation in rtw_get_rsvd_page_probe_req_location
Oct 13, 2024
cef4643
Undo change to rtw_fw_write_data_rsvd_page
Oct 13, 2024
c784999
wifi: rtw88: Report the signal strength only if it's known
Oct 13, 2024
1c0c8f3
usb: Delete register printing code
Oct 13, 2024
03dac9e
Revert "wifi: rtw88: Limit the TX power for USB devices"
Oct 13, 2024
dfb8bd0
Revert "rtw88: Add an additional check in rtw_rx_fill_rx_status()"
Oct 13, 2024
247209b
Revert "rtw88: Detect NULL for hw in rtw_rx_fill_rx_status()"
Oct 13, 2024
6b4f6f6
Update dkms.conf
a5a5aa555oo Oct 15, 2024
c547846
rtw88: Fix builds for kernels older than 6.6.0
a5a5aa555oo Oct 15, 2024
2f2f1e5
Update main.c to remove NL80211_FEATURE_ACTIVE_MONITOR
morrownr Oct 21, 2024
442e46c
usb: Add error message for alloc_skb
Oct 21, 2024
4c11283
Fix typo
SaadAhmedGit Oct 21, 2024
80abfdd
Update rtw8822bu.c to add 4 new vid/pids and alphabetize the entries
morrownr Oct 24, 2024
d1d78f8
Merge pull request #244 from SaadAhmedGit/patch-1
morrownr Oct 24, 2024
2c873db
8812au: Reduce RX aggregation size in USB 3 mode in 5 GHz
Oct 31, 2024
e9a6539
Update blacklist-rtw88.conf
a5a5aa555oo Nov 1, 2024
140da49
wifi: rtw88: Don't require TX report for null data during scans
Nov 1, 2024
96049d1
8812au: fix typo
Portisch Nov 4, 2024
93896b0
wifi: rtw88: usb: Rework the RX path
Nov 6, 2024
c99b655
Move C2H_ADAPTIVITY to the c2h workqueue
Nov 7, 2024
d027ff8
Don't initialise rx_work for kernels older than 6.9
Nov 7, 2024
4a0d547
Update rtw8822b_fw.bin to v30.20.0
a5a5aa555oo Nov 8, 2024
e1cd18a
Add support for Mercusys MA30N / D-Link DWA-T185 rev. A1
a5a5aa555oo Nov 8, 2024
c4929f7
add ID 7392:b822 for Edimax EW-7822ULC - rtw8812au
morrownr Nov 12, 2024
501934a
revert ID 7392:b822 for Edimax EW-7822ULC - rtw8812au
morrownr Nov 12, 2024
0ef5c81
Revert "wifi: rtw88: Don't require TX report for null data during scans"
Nov 15, 2024
22f2412
wifi: rtw88: Ignore TX report sequence number from the older chips
Nov 15, 2024
2d2c241
8812au, 8821au: Disable hardware-controlled LED blinking
Nov 15, 2024
ce76fa3
wifi: rtw88: Add support for LED blinking
Nov 15, 2024
beee28a
rtw88: Fix builds for kernels older than 5.14.0
a5a5aa555oo Nov 16, 2024
ec2cee9
Use #ifdef CONFIG_LEDS_CLASS instead of CONFIG_MAC80211_LEDS
Nov 22, 2024
611874c
Update README.md
morrownr Nov 26, 2024
1c22482
Fix compilation for Openwrt
Dec 10, 2024
74fe9b7
wifi: rtw88: Add USB PHY configuration
Dec 10, 2024
cea0000
wifi: rtw88: Enable concurrent mode for all chips
Dec 10, 2024
4da3263
wifi: rtw88: 8812a: Support RFE type 2
Dec 10, 2024
a80efdc
wifi: rtw88: (Re)Enable all interface modes for SDIO
Dec 10, 2024
07ec7fc
Add firmware v33.6.0 for RTL8814AU
Dec 10, 2024
3215ac2
rtw88: Fix builds for kernel 6.13
a5a5aa555oo Dec 11, 2024
948a8ba
Fix null pointer dereference with RTL8812AU/RTL8821AU
Dec 12, 2024
07a117d
Sync USB RX aggregation with upstream
Dec 19, 2024
e2346ef
Sync USB 3 switching with upstream
Dec 19, 2024
5dad7e4
Sync USB RX skb allocation and handling with upstream
Dec 19, 2024
5343fc6
wifi: rtw88: 8821a/8812a: Set ptct_efuse_size to 0
Dec 19, 2024
c2e9915
wifi: rtw88: Delete rf_type member of struct rtw_sta_info
Dec 19, 2024
d402e10
wifi: rtw88: Don't run coex when the chip has no Bluetooth
Dec 7, 2024
1ab8828
wifi: rtw88: Add some definitions for RTL8814AU
Dec 3, 2024
8751b7a
wifi: rtw88: Fix rtw_mac_power_switch() for RTL8814AU
Nov 29, 2024
2c3cf07
wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
Nov 29, 2024
a5f131c
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
Nov 29, 2024
8b4a85a
wifi: rtw88: Extend struct rtw_pwr_track_tbl for RTL8814AU
Nov 29, 2024
76585e6
wifi: rtw88: Extend rf_base_addr and rf_sipi_addr for RTL8814AU
Nov 29, 2024
be29068
wifi: rtw88: Extend rtw_fw_send_ra_info() for RTL8814AU
Dec 19, 2024
a041e30
wifi: rtw88: Extend TX power stuff for 3-4 spatial streams
Dec 7, 2024
c11b477
wifi: rtw88: Fix rtw_update_sta_info() for RTL8814AU
Dec 19, 2024
bccf1ee
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
Dec 8, 2024
9cd350f
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
Dec 8, 2024
9cd2105
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
Dec 8, 2024
9994364
wifi: rtw88: Fix rtw_rx_phy_stat() for RTL8814AU
Dec 9, 2024
66b3688
wifi: rtw88: Extend rtw_debugfs_get_phy_info() for RTL8814AU
Dec 7, 2024
2868597
wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for RTL8814AU
Dec 17, 2024
17e8cc6
wifi: rtw88: Extend rtw_phy_config_swing_table() for RTL8814AU
Dec 13, 2024
fa8466f
wifi: rtw88: Add rtw8814a_table.c (part 1/2)
Nov 16, 2024
9a39196
wifi: rtw88: Add rtw8814a_table.c (part 2/2)
Nov 16, 2024
7fe2d8c
wifi: rtw88: Add rtw8814a.{c,h}
Nov 16, 2024
d878d4b
wifi: rtw88: Add rtw8814au.c
Nov 17, 2024
2df73c8
wifi: rtw88: usb: Enable RX aggregation for RTL8814AU
Dec 9, 2024
3b3e18d
wifi: rtw88: usb: Enable switching the RTL8814AU to USB 3
Nov 29, 2024
d47126f
wifi: rtw88: Set AMPDU factor to hardware
Dec 20, 2024
0ea6212
Compile the new rtw_8814au module
Dec 20, 2024
6a57987
Update dkms.conf
a5a5aa555oo Dec 20, 2024
d046e76
Update Makefile
a5a5aa555oo Dec 20, 2024
8a5fc29
Update README.md
morrownr Dec 21, 2024
a4909c0
Update README.md
morrownr Dec 21, 2024
85c8e30
Update README.md
morrownr Dec 23, 2024
4a959cb
Update README.md
morrownr Dec 24, 2024
e15c59e
wifi: rtw88: 8814au: Don't ask for TX report for management frames
Dec 24, 2024
8d474db
Update README.md
morrownr Dec 24, 2024
da3f5dd
wifi: rtw88: add __packed attribute to efuse layout struct
Dec 12, 2024
df537a4
Update README.md
morrownr Dec 29, 2024
2fbf725
Revert "wifi: rtw88: Don't run coex when the chip has no Bluetooth"
Jan 1, 2025
22dc11c
8814a: Make path C work again
Jan 1, 2025
1cc700d
wifi: rtw88: Use brightness_set_blocking for SDIO as well
Jan 6, 2025
386382a
wifi: rtw88: usb: Prevent TX URB use after free
Jan 7, 2025
58638cb
Update README.md
morrownr Jan 12, 2025
9c92a4f
wifi: rtw88: sdio: Fix disconnection after beacon loss
airtower-luna Jan 6, 2025
c56536c
wifi: rtw88: Fix RX aggregation settings for RTL8723DS
Jan 20, 2025
501b12e
wifi: rtw88: Don't use static local variable in rtw8821c_set_tx_power…
Jan 21, 2025
21a3fa7
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power…
Jan 21, 2025
2a0cfe7
wifi: rtw88: Handle RTL8723D with blank efuse
Jan 31, 2025
b6aa191
Update README.md
a5a5aa555oo Jan 20, 2025
2f5b4cb
Improve firmware handling
a5a5aa555oo Jan 22, 2025
d9e0ac7
Revert "wifi: rtw88: usb: Prevent TX URB use after free"
Feb 7, 2025
d5a1a15
Add untested rtw8814ae.c for RTL8814AE cards
Feb 11, 2025
e32c796
wifi: rtw88: pci: Avoid null pointer dereference with RTL8814AE
Feb 11, 2025
4f35223
Revert "wifi: rtw88: pci: Avoid null pointer dereference with RTL8814AE"
Feb 14, 2025
27e716a
8814a: Add empty intf_table
Feb 14, 2025
75838f9
wifi: rtw88: 8821a/8812a: Add empty intf_table
Feb 14, 2025
96c97fc
Revert "wifi: rtw88: 8814au: Don't ask for TX report for management f…
Feb 15, 2025
48ef2fa
8814a: Enable TX reports for the management queue
Feb 15, 2025
4350be0
8814a: Support RFE type 0
Feb 16, 2025
fdbc4b3
8814a: Support LPS deep (PCI only)
Feb 16, 2025
95baebe
8814a: Don't reject PCI
Feb 18, 2025
bd8b166
8814a: Add rtw8814ae_enable_rf_1_2v() for PCI
Feb 19, 2025
19e8a67
Makefile: Add JOBS variable
a5a5aa555oo Feb 16, 2025
1ced71d
8814a: Fix (?) TX queue mapping for PCI
Feb 20, 2025
1e45f24
Update README.md
morrownr Feb 20, 2025
ec139f1
Update README.md
morrownr Feb 20, 2025
dd5df33
8814a: Force the antenna b to wifi (PCI only)
Feb 23, 2025
6ca4fac
README: RTL8814AE is not untested anymore
Mar 4, 2025
db366e4
Makefile: update secure boot CN
ryanwild Mar 13, 2025
dbe1e0f
README: Add dkms instructions
KernelGhost Feb 21, 2025
f3d32fe
Sync rtw_fw_send_ra_info with the kernel
Mar 14, 2025
f2ec705
Sync rtw_debugfs_get_tx_pwr_tbl
Mar 14, 2025
9d95f0d
Sync __rtw_build_rsvd_page_from_vifs
Mar 14, 2025
0a4d010
Sync _rtw_hw_scan_update_probe_req
Mar 14, 2025
2343395
Sync rtw_mac_power_switch
Mar 14, 2025
953ee06
Sync rtw_c2h_ra_rpt
Mar 14, 2025
639abfb
Constify structs and arrays
Mar 14, 2025
7b222f9
Sync struct rtw_rate_section
Mar 14, 2025
e490c45
Sync rtw_usb_phy_cfg
Mar 14, 2025
0a0daf2
Sync rtw8822bu.c
Mar 14, 2025
fc834dc
Sync the LED support
Mar 14, 2025
2ad1e9a
Sync check_positive
Mar 14, 2025
d862b10
RTL8703B fixes
Mar 14, 2025
b1ff8c5
Sync rtw8812au.c
Mar 14, 2025
e796010
Sync RTL8814A code
Mar 14, 2025
4a23d41
Sync rtw_desc_to_mcsrate
Mar 14, 2025
b5abd31
Sync rtw_phy_store_tx_power_by_rate
Mar 14, 2025
dd5ee7d
Sync random stuff
Mar 14, 2025
cfcc33a
Add missing led.c and led.h
a5a5aa555oo Mar 15, 2025
11d2944
Mitigate beacon loss with RTL8814A as well
Mar 15, 2025
0f261f9
Add support for TP-LINK Archer T2UB Nano
a5a5aa555oo Mar 31, 2025
9fee632
wifi: rtw88: usb: Reduce control message timeout to 500 ms
Apr 19, 2025
efc617d
wifi: rtw88: usb: Upload the firmware in bigger chunks
Apr 22, 2025
bbc08b8
wifi: rtw88: Transmit EAPOL frames at the lowest rate
Apr 24, 2025
9c44629
wifi: rtw88: usb: Discard packets smaller than FCS_LEN
Apr 24, 2025
e592870
Revert "wifi: rtw88: usb: Discard packets smaller than FCS_LEN"
Apr 28, 2025
a1ffefc
wifi: rtw88: usb: Discard packets smaller than FCS_LEN
Apr 28, 2025
159893f
wifi: rtw88: Maybe fix the random "error beacon valid" for USB
May 2, 2025
395e90c
Update README.md
a5a5aa555oo May 2, 2025
8436e5a
Rename blacklist-rtw88.conf to rtw88.conf
a5a5aa555oo May 6, 2025
a8a60ab
Add reload_rtw88.sh
a5a5aa555oo May 6, 2025
960c823
Revert "Add support for TP-LINK Archer T2UB Nano"
a5a5aa555oo May 6, 2025
cc1aa51
Makefile: Replace EXTRA_CFLAGS with ccflags-y
a5a5aa555oo May 6, 2025
f25626e
Merge pull request #354 from a5a5aa555oo/master
morrownr May 6, 2025
461b696
wifi: rtw88: Add __nonstring annotations for unterminated strings
kees Mar 10, 2025
a586326
wifi: rtw88: fix the 'para' buffer size to avoid reading out of bounds
Jun 26, 2025
2e289b1
wifi: rtw88: pci: add PCI Express error handling
Jun 26, 2025
739b5a2
wifi: rtw88: rtw8822bu VID/PID for BUFFALO WI-U2-866DM
Jun 26, 2025
a5b2764
wifi: rtw88: do not ignore hardware read error during DPK
Jun 26, 2025
4897e01
wifi: rtw88: sdio: map mgmt frames to queue TX_DESC_QSEL_MGMT
Jun 26, 2025
aae30be
wifi: rtw88: sdio: call rtw_sdio_indicate_tx_status unconditionally
Jun 26, 2025
0371dbd
wifi: rtw88: Fix the module names printed in dmesg
Jun 26, 2025
3d182de
wifi: rtw88: Rename the RTW_WCPU_11{AC,N} enums
Jun 26, 2025
9010570
wifi: rtw88: usb: Remove redundant 'flush_workqueue()' calls
Jun 26, 2025
8a1dcc1
wifi: rtw88: usb: Upload the firmware in bigger chunks (update)
Jun 26, 2025
7e74b62
Delete sta_mode_only check
Jun 26, 2025
9086ff2
Sync set_ampdu_factor stuff
Jun 26, 2025
cdd78f9
Sync SDIO RX aggregation stuff
Jun 26, 2025
b89af8c
wifi: rtw88: sdio: Remove redundant 'flush_workqueue()' calls
Jun 26, 2025
fa96fd4
wifi: rtw88: Fix macid assigned to TDLS station
Jul 13, 2025
549f33c
wifi: rtw88: Lock rtwdev->mutex before setting the LED
Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 132 additions & 125 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
SHELL := /bin/sh
KVER ?= $(if $(KERNELRELEASE),$(KERNELRELEASE),$(shell uname -r))
KSRC ?= $(if $(KERNEL_SRC),$(KERNEL_SRC),/lib/modules/$(KVER)/build)
FIRMWAREDIR := /lib/firmware/rtw88
PWD := $(shell pwd)
FWDIR := /lib/firmware/rtw88
JOBS ?= $(shell nproc --ignore=1)
MODLIST := rtw_8723cs rtw_8723de rtw_8723ds rtw_8723du \
rtw_8812au rtw_8814ae rtw_8814au rtw_8821au rtw_8821ce rtw_8821cs rtw_8821cu \
rtw_8822be rtw_8822bs rtw_8822bu rtw_8822ce rtw_8822cs rtw_8822cu \
rtw_8703b rtw_8723d rtw_8821a rtw_8812a rtw_8814a rtw_8821c rtw_8822b rtw_8822c \
rtw_8723x rtw_88xxa rtw_pci rtw_sdio rtw_usb rtw_core
# Handle the move of the entire rtw88 tree
ifneq ("","$(wildcard /lib/modules/$(KVER)/kernel/drivers/net/wireless/realtek)")
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/realtek/rtw88
Expand Down Expand Up @@ -31,149 +36,155 @@ ifeq ("","$(wildcard MOK.der)")
NO_SKIP_SIGN := y
endif

EXTRA_CFLAGS += -O2 -std=gnu11 -Wno-declaration-after-statement
ifeq ($(CONFIG_PCI), y)
EXTRA_CFLAGS += -DCONFIG_RTW88_8822BE=1
EXTRA_CFLAGS += -DCONFIG_RTW88_8821CE=1
EXTRA_CFLAGS += -DCONFIG_RTW88_8822CE=1
EXTRA_CFLAGS += -DCONFIG_RTW88_8723DE=1
endif
EXTRA_CFLAGS += -DCONFIG_RTW88_DEBUG=1
EXTRA_CFLAGS += -DCONFIG_RTW88_DEBUGFS=1
#EXTRA_CFLAGS += -DCONFIG_RTW88_REGD_USER_REG_HINTS

obj-m += rtw_core.o
rtw_core-objs += main.o \
mac80211.o \
util.o \
debug.o \
tx.o \
rx.o \
mac.o \
phy.o \
coex.o \
efuse.o \
fw.o \
ps.o \
sec.o \
bf.o \
regd.o \
sar.o
ccflags-y += -O2 -std=gnu11 -Wno-declaration-after-statement
ccflags-y += -DCONFIG_RTW88_LEDS=1
ccflags-y += -DCONFIG_RTW88_DEBUG=1
ccflags-y += -DCONFIG_RTW88_DEBUGFS=1
ccflags-y += -D__CHECK_ENDIAN__

obj-m += rtw_core.o
rtw_core-objs += main.o \
led.o \
mac80211.o \
util.o \
debug.o \
tx.o \
rx.o \
mac.o \
phy.o \
coex.o \
efuse.o \
fw.o \
ps.o \
sec.o \
bf.o \
regd.o \
sar.o

ifeq ($(CONFIG_PM), y)
rtw_core-objs += wow.o
rtw_core-objs += wow.o
endif

obj-m += rtw_8822b.o
rtw_8822b-objs := rtw8822b.o rtw8822b_table.o
obj-m += rtw_8703b.o
rtw_8703b-objs := rtw8703b.o rtw8703b_tables.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8822be.o
rtw_8822be-objs := rtw8822be.o
ifneq ($(CONFIG_MMC), )
obj-m += rtw_8723cs.o
rtw_8723cs-objs := rtw8723cs.o
endif

obj-m += rtw_8822bu.o
rtw_8822bu-objs := rtw8822bu.o
obj-m += rtw_8723d.o
rtw_8723d-objs := rtw8723d.o rtw8723d_table.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8723de.o
rtw_8723de-objs := rtw8723de.o
endif

ifneq ($(CONFIG_MMC), )
obj-m += rtw_8822bs.o
rtw_8822bs-objs := rtw8822bs.o
obj-m += rtw_8723ds.o
rtw_8723ds-objs := rtw8723ds.o
endif

obj-m += rtw_8822c.o
rtw_8822c-objs := rtw8822c.o rtw8822c_table.o
obj-m += rtw_8723du.o
rtw_8723du-objs := rtw8723du.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8822ce.o
rtw_8822ce-objs := rtw8822ce.o
endif
obj-m += rtw_8723x.o
rtw_8723x-objs := rtw8723x.o

obj-m += rtw_8822cu.o
rtw_8822cu-objs := rtw8822cu.o
obj-m += rtw_8812au.o
rtw_8812au-objs := rtw8812au.o

obj-m += rtw_8723x.o
rtw_8723x-objs := rtw8723x.o
obj-m += rtw_8821a.o
rtw_8821a-objs := rtw8821a.o rtw8821a_table.o

obj-m += rtw_8703b.o
rtw_8703b-objs := rtw8703b.o rtw8703b_tables.o
obj-m += rtw_8812a.o
rtw_8812a-objs := rtw8812a.o rtw8812a_table.o

obj-m += rtw_8723x.o
rtw_8723x-objs := rtw8723x.o
obj-m += rtw_88xxa.o
rtw_88xxa-objs := rtw88xxa.o

ifneq ($(CONFIG_MMC), )
obj-m += rtw_8822cs.o
rtw_8822cs-objs := rtw8822cs.o
obj-m += rtw_8821au.o
rtw_8821au-objs := rtw8821au.o

obj-m += rtw_8723cs.o
rtw_8723cs-objs := rtw8723cs.o
endif
obj-m += rtw_8814a.o
rtw_8814a-objs := rtw8814a.o rtw8814a_table.o

obj-m += rtw_8723d.o
rtw_8723d-objs := rtw8723d.o rtw8723d_table.o
obj-m += rtw_8814au.o
rtw_8814au-objs := rtw8814au.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8723de.o
rtw_8723de-objs := rtw8723de.o
obj-m += rtw_8814ae.o
rtw_8814ae-objs := rtw8814ae.o
endif

obj-m += rtw_8723du.o
rtw_8723du-objs := rtw8723du.o
obj-m += rtw_8821c.o
rtw_8821c-objs := rtw8821c.o rtw8821c_table.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8821ce.o
rtw_8821ce-objs := rtw8821ce.o
endif

ifneq ($(CONFIG_MMC), )
obj-m += rtw_8723ds.o
rtw_8723ds-objs := rtw8723ds.o
obj-m += rtw_8821cs.o
rtw_8821cs-objs := rtw8821cs.o
endif

obj-m += rtw_8821c.o
rtw_8821c-objs := rtw8821c.o rtw8821c_table.o
obj-m += rtw_8821cu.o
rtw_8821cu-objs := rtw8821cu.o

obj-m += rtw_8822b.o
rtw_8822b-objs := rtw8822b.o rtw8822b_table.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8821ce.o
rtw_8821ce-objs := rtw8821ce.o
obj-m += rtw_8822be.o
rtw_8822be-objs := rtw8822be.o
endif

ifneq ($(CONFIG_MMC), )
obj-m += rtw_8822bs.o
rtw_8822bs-objs := rtw8822bs.o
endif

obj-m += rtw_8821a.o
rtw_8821a-objs := rtw8821a.o rtw8821a_table.o rtw8812a_table.o
obj-m += rtw_8822bu.o
rtw_8822bu-objs := rtw8822bu.o

obj-m += rtw_8821au.o
rtw_8821au-objs := rtw8821au.o
obj-m += rtw_8822c.o
rtw_8822c-objs := rtw8822c.o rtw8822c_table.o

obj-m += rtw_8812au.o
rtw_8812au-objs := rtw8812au.o
ifeq ($(CONFIG_PCI), y)
obj-m += rtw_8822ce.o
rtw_8822ce-objs := rtw8822ce.o
endif

ifneq ($(CONFIG_MMC), )
obj-m += rtw_8821cs.o
rtw_8821cs-objs := rtw8821cs.o
obj-m += rtw_8822cs.o
rtw_8822cs-objs := rtw8822cs.o
endif

obj-m += rtw_8821cu.o
rtw_8821cu-objs := rtw8821cu.o
obj-m += rtw_8822cu.o
rtw_8822cu-objs := rtw8822cu.o

ifeq ($(CONFIG_PCI), y)
obj-m += rtw_pci.o
rtw_pci-objs := pci.o
obj-m += rtw_pci.o
rtw_pci-objs := pci.o
endif

ifneq ($(CONFIG_MMC), )
obj-m += rtw_sdio.o
rtw_sdio-objs := sdio.o
obj-m += rtw_sdio.o
rtw_sdio-objs := sdio.o
endif

obj-m += rtw_usb.o
rtw_usb-objs := usb.o

obj-m += rtw_usb.o
rtw_usb-objs := usb.o

ccflags-y += -D__CHECK_ENDIAN__
obj-m += rtw_usb.o
rtw_usb-objs := usb.o

all:
$(MAKE) -j`nproc` -C $(KSRC) M=$(PWD) modules
$(MAKE) -j$(JOBS) -C $(KSRC) M=$$PWD modules

install: all
@install -D -m 644 -t $(MODDESTDIR) *.ko
@# copy firmware images to target folder
@install -D -m 644 -t $(FIRMWAREDIR) firmware/*.bin
@install -D -m 644 -t /etc/modprobe.d rtw88.conf

ifeq ($(COMPRESS_GZIP), y)
@gzip -f $(MODDESTDIR)/*.ko
Expand All @@ -186,51 +197,47 @@ ifeq ($(COMPRESS_ZSTD), y)
endif

@depmod $(DEPMOD_ARGS) -a $(KVER)
@echo "The driver rtw88 and its firmware installed successfully!"
@echo "The rtw88 drivers and firmware files were installed successfully."

uninstall:
modprobe -r rtw_8723cs
ifeq ($(CONFIG_PCI), y)
modprobe -r rtw_8723de
install_fw:
ifeq ($(wildcard $(FWDIR)), )
@install -Dvm 644 -t $(FWDIR) firmware/*.bin
else
@cp -r firmware tmp
ifneq ($(wildcard $(FWDIR)/*.zst), )
@zstd -fq --rm tmp/*.bin
endif
modprobe -r rtw_8723ds
modprobe -r rtw_8723du
modprobe -r rtw_8812au
modprobe -r rtw_8821au
ifeq ($(CONFIG_PCI), y)
modprobe -r rtw_8821ce
ifneq ($(wildcard $(FWDIR)/*.xz), )
@xz -f -C crc32 tmp/*.bin
endif
modprobe -r rtw_8821cs
modprobe -r rtw_8821cu
ifeq ($(CONFIG_PCI), y)
modprobe -r rtw_8822be
ifneq ($(wildcard $(FWDIR)/*.gz), )
@gzip -f tmp/*.bin
endif
modprobe -r rtw_8822bs
modprobe -r rtw_8822bu
ifeq ($(CONFIG_PCI), y)
modprobe -r rtw_8822ce
@install -Dvm 644 -t $(FWDIR) tmp/*
@rm -rf tmp
endif
modprobe -r rtw_8822cs
modprobe -r rtw_8822cu

rm -f $(MODDESTDIR)/rtw_*.ko*

depmod $(DEPMOD_ARGS)

@echo "Uninstall rtw88 SUCCESS"

uninstall:
@for mod in $(MODLIST); do \
rmmod -s $$mod || true; \
done
@rm -vf $(MODDESTDIR)/rtw_*.ko*
@rm -vf /etc/modprobe.d/rtw88.conf
@depmod $(DEPMOD_ARGS)
@echo "The rtw88 drivers were removed successfully."

clean:
$(MAKE) -C $(KSRC) M=$$PWD clean
@rm -f MOK.*

sign:
ifeq ($(NO_SKIP_SIGN), y)
@openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Custom MOK/"
@openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=rtw88 driver key/"
@mokutil --import MOK.der
else
echo "Skipping key creation"
endif
@for mod in $(shell find ./ -name "*.ko"); do \
@for mod in $(wildcard *.ko); do \
$(KSRC)/scripts/sign-file sha256 MOK.priv MOK.der $$mod; \
done

Expand Down
Loading