]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtw89: fix wrong pci_get_drvdata type in AER handlers
authorChristos Longros <chris.longros@gmail.com>
Sun, 29 Mar 2026 07:38:57 +0000 (09:38 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 29 Apr 2026 02:43:12 +0000 (10:43 +0800)
commit7068c379cf9aa8afe4dce4d9d82390187aa9c4d0
tree6274f9134ee0e35667901aafbc29f9640e38906b
parent7baf5857e15d722776898510a10546d6b2f18645
wifi: rtw89: fix wrong pci_get_drvdata type in AER handlers

rtw89 stores an ieee80211_hw pointer via pci_set_drvdata() at probe
time, but io_error_detected() and io_resume() retrieve it as a
net_device pointer.  This causes netif_device_detach/attach to
operate on an ieee80211_hw struct, reading and writing at wrong
offsets.  The adjacent io_slot_reset() already does it correctly.

Use ieee80211_stop_queues/wake_queues instead, consistent with
every other queue stop/start path in the driver.

Tested on RTL8852CE by calling the handlers from a test module
before and after the fix.

Fixes: 16e3d93c6183 ("wifi: rtw89: pci: add PCI Express error handling")
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260329073857.113081-1-chris.longros@gmail.com
drivers/net/wireless/realtek/rtw89/pci.c