linux/drivers/net/wireless/realtek/rtw88
Ping-Ke Shih 90f4b5499c rtw88: 8821c: fix access const table of channel parameters
We would like to make chip_info table const, but 8821c uses one field as
a variable, and causes core dump. To fix this, move the field to another
struct that can be read and written.

BUG: unable to handle page fault for address: ffffffffc09f52f4
PGD 5b5215067 P4D 5b5215067 PUD 5b5217067 PMD 111f61067 PTE 8000000111e07161
Oops: 0003 [#1] PREEMPT SMP NOPTI
CPU: 6 PID: 436 Comm: NetworkManager Not tainted 5.18.0-rc7-debug-01822-g89d8f53ff6e7 #1 5cac31ca93432e53341863abfb3332fd98b144da
Hardware name: HP HP Desktop M01-F1xxx/87D6, BIOS F.12 12/17/2020
RIP: 0010:rtw8821c_phy_set_param+0x262/0x380 [rtw88_8821c]
Code: e8 53 f3 c0 d6 48 8b 43 10 4c 8b 63 38 be 24 0a 00 00 48 89 df 48
 8b 40 68 e8 3a f3 c0 d6 89 e9 be 28 0a 00 00 48 89 df d3 e8 <41> 89 84
 24 54 01 00 00 48 8b 43 10 4c 8b 63 38 48 8b 40 68 e8 15
RSP: 0018:ffffb08c417cb6f0 EFLAGS: 00010286
RAX: 0000000064b80c1c RBX: ffff93d15a0120e0 RCX: 0000000000000000
RDX: 0000000034028211 RSI: 0000000000000a28 RDI: ffff93d15a0120e0
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000006 R12: ffffffffc09f51a0
R13: ffff93d15a0156d0 R14: 0000000000000000 R15: 0000000000000001
FS:  00007f4e9b73d1c0(0000) GS:ffff93d83ab80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffc09f52f4 CR3: 0000000103b9e000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 rtw_core_start+0xbd/0x190 [rtw88_core de79d6bdfd083d102030858972032e5706726279]
 rtw_ops_start+0x26/0x40 [rtw88_core de79d6bdfd083d102030858972032e5706726279]
 drv_start+0x42/0x100 [mac80211 21e803d0ad10691f64c6c81ecc24c0c6c36e5d58]
 ieee80211_do_open+0x2fb/0x900 [mac80211 21e803d0ad10691f64c6c81ecc24c0c6c36e5d58]
 ieee80211_open+0x67/0x80 [mac80211 21e803d0ad10691f64c6c81ecc24c0c6c36e5d58]
 __dev_open+0xdd/0x180
 [...]

Fixes: 89d8f53ff6 ("wifi: rtw88: Fix Sparse warning for rtw8821c_hw_spec")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220608020312.9663-1-pkshih@realtek.com
2022-06-10 10:46:06 +03:00
..
bf.c mac80211: prepare sta handling for MLO support 2022-04-11 16:42:03 +02:00
bf.h rtw88: don't check CRC of VHT-SIG-B in 802.11ac signal 2021-12-20 20:49:02 +02:00
coex.c rtw88: coex: Add C2H/H2C handshake with BT mailbox for asking HID Info 2022-02-21 10:49:20 +02:00
coex.h rtw88: coex: Add C2H/H2C handshake with BT mailbox for asking HID Info 2022-02-21 10:49:20 +02:00
debug.c rtw88: change rtw_info() to proper message level 2022-02-22 17:31:13 +02:00
debug.h rtw88: change rtw_info() to proper message level 2022-02-22 17:31:13 +02:00
efuse.c rtw88: extract: export symbols used in chip functionalities 2020-05-18 15:16:15 +03:00
efuse.h rtw88: set power trim according to efuse PG values 2020-04-21 16:00:21 +03:00
fw.c wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim 2022-05-30 12:15:07 +03:00
fw.h wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim 2022-05-30 12:15:07 +03:00
hci.h rtw88: add flush hci support 2021-04-11 12:24:31 +03:00
Kconfig rtw88: 8821c: Add 8821CE to Kconfig and Makefile 2020-07-15 12:08:16 +03:00
mac80211.c wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim 2022-05-30 12:15:07 +03:00
mac.c rtw88: use the correct bit in the REG_HCI_OPT_CTRL register 2022-04-27 07:58:00 +03:00
mac.h rtw88: 8822c: support FW crash dump when FW crash 2021-03-15 10:27:13 +02:00
main.c wifi: rtw88: add a work to correct atomic scheduling warning of ::set_tim 2022-05-30 12:15:07 +03:00
main.h rtw88: 8821c: fix access const table of channel parameters 2022-06-10 10:46:06 +03:00
Makefile rtw88: support SAR via kernel common API 2021-12-21 20:22:38 +02:00
pci.c rtw88: remove a copy of the NAPI_POLL_WEIGHT define 2022-05-02 17:38:48 +03:00
pci.h rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE 2021-12-20 20:48:10 +02:00
phy.c rtw88: add ieee80211:sta_rc_update ops 2022-04-12 16:52:05 +03:00
phy.h rtw88: support SAR via kernel common API 2021-12-21 20:22:38 +02:00
ps.c rtw88: don't consider deep PS mode when transmitting packet 2021-12-22 19:48:50 +02:00
ps.h rtw88: don't consider deep PS mode when transmitting packet 2021-12-22 19:48:50 +02:00
reg.h rtw88: Add update beacon flow for AP mode 2022-04-12 16:52:05 +03:00
regd.c rtw88: support adaptivity for ETSI/JP DFS region 2021-09-21 17:51:56 +03:00
regd.h rtw88: add regulatory strategy by chip type 2021-09-21 17:51:56 +03:00
rtw8723d_table.c rtw88: 8723d: Add mac/bb/rf/agc/power_limit tables 2020-04-21 15:59:21 +03:00
rtw8723d_table.h rtw88: 8723d: Add mac/bb/rf/agc/power_limit tables 2020-04-21 15:59:21 +03:00
rtw8723d.c rtw88: add HT MPDU density value for each chip 2022-05-01 19:13:22 +03:00
rtw8723d.h rtw88: 8723d: add cck pd seetings 2020-11-24 11:15:22 +02:00
rtw8723de.c rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8723de.h rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8821c_table.c rtw88: 8821c: Enable TX report for management frames 2022-04-12 16:52:05 +03:00
rtw8821c_table.h rtw88: 8821c: support RFE type2 wifi NIC 2021-02-08 12:51:39 +02:00
rtw8821c.c rtw88: 8821c: fix access const table of channel parameters 2022-06-10 10:46:06 +03:00
rtw8821c.h rtw88: 8822c: update rx settings to prevent potential hw deadlock 2021-12-20 20:50:13 +02:00
rtw8821ce.c rtw88: 8821ce: add support for device ID 0xb821 2022-04-12 16:52:54 +03:00
rtw8821ce.h rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8822b_table.c
rtw8822b_table.h
rtw8822b.c rtw88: add HT MPDU density value for each chip 2022-05-01 19:13:22 +03:00
rtw8822b.h rtw88: support adaptivity for ETSI/JP DFS region 2021-09-21 17:51:56 +03:00
rtw8822be.c rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8822be.h rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8822c_table.c rtw88: 8822c: update RF parameter tables to v62 2021-06-22 18:19:26 +03:00
rtw8822c_table.h rtw88: 8822c: update phy parameter tables to v50 2020-05-04 12:46:14 +03:00
rtw8822c.c rtw88: add HT MPDU density value for each chip 2022-05-01 19:13:22 +03:00
rtw8822c.h rtw88: 8822c: add ieee80211_ops::hw_scan 2021-12-21 20:19:13 +02:00
rtw8822ce.c rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rtw8822ce.h rtw88: pci: Add prototypes for .probe, .remove and .shutdown 2020-12-07 18:32:17 +02:00
rx.c rtw88: fix incorrect frequency reported 2022-04-12 16:52:05 +03:00
rx.h
sar.c rtw88: change rtw_info() to proper message level 2022-02-22 17:31:13 +02:00
sar.h rtw88: support SAR via kernel common API 2021-12-21 20:22:38 +02:00
sec.c rtw88: fill zeros to words 0x06 and 0x07 of security cam entry 2020-05-13 18:48:52 +03:00
sec.h
tx.c rtw88: Add update beacon flow for AP mode 2022-04-12 16:52:05 +03:00
tx.h rtw88: Add update beacon flow for AP mode 2022-04-12 16:52:05 +03:00
util.c rtw88: extract: export symbols used in chip functionalities 2020-05-18 15:16:15 +03:00
util.h rtw88: handle and recover when firmware crash 2020-09-29 11:22:19 +03:00
wow.c rtw88: wow: report wow reason through mac80211 api 2021-08-21 22:19:15 +03:00
wow.h rtw88: Add wowlan net-detect support 2020-01-26 17:37:05 +02:00