wifi: iwlwifi: updates - 2023-10-22
cover wifi: iwlwifi: updates - 2023-10-22
From: Gregory Greenman <[email protected]>
Hi,
This patch set includes iwlwifi patches intended for v6.7
It contains a few bugfixes and cleanups.
In addition, it implements the new statistis firmware API and bumps firmware API to 86.
Thanks,
Gregory
Anjaneyulu (2):
wifi: iwlwifi: mvm: implement new firmware API for statistics
wifi: iwlwifi: mvm: debugfs for fw system stats
Daniel Gabay (1):
wifi: iwlwifi: read DSM func 2 for specific RF types
Gregory Greenman (1):
wifi: iwlwifi: bump FW API to 86 for AX/BZ/SC devices
Johannes Berg (3):
wifi: iwlwifi: trace full frames with TX status request
wifi: iwlwifi: mvm: cycle FW link on chanctx removal
wifi: iwlwifi: mvm: show dump even for pldr_sync
Miri Korenblit (2):
wifi: iwlwifi: mvm: add a print when sending RLC command
wifi: iwlwifi: empty overflow queue during flush
Mukesh Sisodiya (1):
wifi: iwlwifi: fw: Add support for UATS table in UHB
.../net/wireless/intel/iwlwifi/cfg/ax210.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- drivers/net/wireless/intel/iwlwifi/dvm/tx.c | 5 +- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 26 ++- .../wireless/intel/iwlwifi/fw/api/commands.h | 30 ++++ .../wireless/intel/iwlwifi/fw/api/nvm-reg.h | 18 ++ .../net/wireless/intel/iwlwifi/fw/api/stats.h | 153 +++++++++++++++-- .../net/wireless/intel/iwlwifi/fw/runtime.h | 4 + drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 50 ++++++ drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 17 ++ .../net/wireless/intel/iwlwifi/iwl-devtrace.h | 8 +- .../net/wireless/intel/iwlwifi/iwl-trans.h | 7 +- .../net/wireless/intel/iwlwifi/mvm/debugfs.c | 104 ++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 59 +++++++ .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 46 +++-- .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 13 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 27 ++- .../net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 3 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 157 +++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +- .../net/wireless/intel/iwlwifi/mvm/utils.c | 61 +++++++ drivers/net/wireless/intel/iwlwifi/queue/tx.c | 9 +- drivers/net/wireless/intel/iwlwifi/queue/tx.h | 2 +- 25 files changed, 756 insertions(+), 65 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/10 wifi: iwlwifi: mvm: implement new firmware API for statistics
From: Anjaneyulu <[email protected]>
The new firmware API uses a new command and notification, the command configures in which statistics types driver is interested and the notification is sent periodically. An additional change in the API is that most of the statistics data is accumulated and reported by the firmware per MLO link. Implement new command and notification handlers and adjust to per-link statistics.
--- .../wireless/intel/iwlwifi/fw/api/commands.h | 30 ++++ .../net/wireless/intel/iwlwifi/fw/api/stats.h | 153 +++++++++++++++-- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 46 +++-- .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ++ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 24 +++ drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 157 +++++++++++++++++- .../net/wireless/intel/iwlwifi/mvm/utils.c | 61 +++++++ 8 files changed, 451 insertions(+), 38 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/commands.h +30 -0
@@ -30,6 +30,8 @@* @REGULATORY_AND_NVM_GROUP: regulatory/NVM group, uses command IDs from * &enum iwl_regulatory_and_nvm_subcmd_ids * @DEBUG_GROUP: Debug group, uses command IDs from &enum iwl_debug_cmds +* @STATISTICS_GROUP: Statistics group, uses command IDs from +* &enum iwl_statistics_subcmd_ids */ enum iwl_mvm_command_groups {LEGACY_GROUP =0x0 ,
@@ -44,6 +46,7 @@ enum iwl_mvm_command_groups {PROT_OFFLOAD_GROUP =0xb ,REGULATORY_AND_NVM_GROUP =0xc ,DEBUG_GROUP =0xf , + STATISTICS_GROUP = 0x10, };/**
@@ -616,10 +619,37 @@ enum iwl_system_subcmd_ids {*/ SYSTEM_FEATURES_CONTROL_CMD =0xd , +/** +* @SYSTEM_STATISTICS_CMD: &struct iwl_system_statistics_cmd +*/ +SYSTEM_STATISTICS_CMD =0xf , + +/** +* @SYSTEM_STATISTICS_END_NOTIF: &struct iwl_system_statistics_end_notif +*/ +SYSTEM_STATISTICS_END_NOTIF =0xfd , +/** * @RFI_DEACTIVATE_NOTIF: &struct iwl_rfi_deactivate_notif */ RFI_DEACTIVATE_NOTIF = 0xff, }; +/** +* enum iwl_statistics_subcmd_ids - Statistics group command IDs +*/ +enum iwl_statistics_subcmd_ids { +/** +* @STATISTICS_OPER_NOTIF: Notification about operational +* statistics &struct iwl_system_statistics_notif_oper +*/ +STATISTICS_OPER_NOTIF =0x0 , + +/** +* @STATISTICS_OPER_PART1_NOTIF: Notification about operational part1 +* statistics &struct iwl_system_statistics_part1_notif_oper +*/ +STATISTICS_OPER_PART1_NOTIF =0x1 , +}; +#endif /* __iwl_fw_api_commands_h__ */
drivers/net/wireless/intel/iwlwifi/fw/api/stats.h +139 -14
217 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +31 -15
104 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +4 -2
@@ -10,6 +10,7 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw,struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw);struct iwl_mvm_vif *mvmvif =iwl_mvm_vif_from_mac80211 (vif);int ret; +int i;mutex_lock (&mvm->mutex);
@@ -22,8 +23,9 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw,/* make sure that beacon statistics don't go backwards with FW reset */ if (test_bit (IWL_MVM_STATUS_IN_HW_RESTART , &mvm->status)) - mvmvif->deflink.beacon_stats.accu_num_beacons += - mvmvif->deflink.beacon_stats.num_beacons; +for_each_mvm_vif_valid_link (mvmvif, i) + mvmvif->link[i]->beacon_stats.accu_num_beacons += + mvmvif->link[i]->beacon_stats.num_beacons;/* Allocate resources for the MAC context, and add it to the fw */ ret =iwl_mvm_mac_ctxt_init (mvm, vif);
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +12 -0
@@ -1194,6 +1194,8 @@ struct iwl_mvm {struct iwl_time_sync_data time_sync;struct iwl_mei_scan_filter mei_scan_filter; + +bool statistics_clear; };/* Extract MVM priv from op_mode and _hw */
@@ -1685,6 +1687,16 @@ static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm) }/* Statistics */ +void iwl_mvm_handle_rx_system_oper_stats (struct iwl_mvm *mvm, +struct iwl_rx_cmd_buffer *rxb); +void iwl_mvm_handle_rx_system_oper_part1_stats (struct iwl_mvm *mvm, +struct iwl_rx_cmd_buffer *rxb); +static inline void +iwl_mvm_handle_rx_system_end_stats_notif (struct iwl_mvm *mvm, +struct iwl_rx_cmd_buffer *rxb) +{ +} +void iwl_mvm_handle_rx_statistics (struct iwl_mvm *mvm,struct iwl_rx_packet *pkt); void iwl_mvm_rx_statistics(struct iwl_mvm *mvm,
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +24 -0
@@ -322,6 +322,19 @@ static const struct iwl_rx_handlers iwl_mvm_rx_handlers[] = {RX_HANDLER_NO_SIZE (STATISTICS_NOTIFICATION , iwl_mvm_rx_statistics,RX_HANDLER_ASYNC_LOCKED ), +RX_HANDLER_GRP (STATISTICS_GROUP ,STATISTICS_OPER_NOTIF , + iwl_mvm_handle_rx_system_oper_stats, +RX_HANDLER_ASYNC_LOCKED , + struct iwl_system_statistics_notif_oper), +RX_HANDLER_GRP (STATISTICS_GROUP ,STATISTICS_OPER_PART1_NOTIF , + iwl_mvm_handle_rx_system_oper_part1_stats, +RX_HANDLER_ASYNC_LOCKED , + struct iwl_system_statistics_part1_notif_oper), +RX_HANDLER_GRP (SYSTEM_GROUP ,SYSTEM_STATISTICS_END_NOTIF , + iwl_mvm_handle_rx_system_end_stats_notif, +RX_HANDLER_ASYNC_LOCKED , + struct iwl_system_statistics_end_notif), +RX_HANDLER (BA_WINDOW_STATUS_NOTIFICATION_ID , iwl_mvm_window_status_notif,RX_HANDLER_SYNC , struct iwl_ba_window_status_notif),
@@ -538,6 +551,8 @@ static const struct iwl_hcmd_names iwl_mvm_system_names[] = {HCMD_NAME (RFI_GET_FREQ_TABLE_CMD ),HCMD_NAME (SYSTEM_FEATURES_CONTROL_CMD ),HCMD_NAME (RFI_DEACTIVATE_NOTIF ), +HCMD_NAME (SYSTEM_STATISTICS_CMD ), + HCMD_NAME(SYSTEM_STATISTICS_END_NOTIF), };/* Please keep this array *SORTED* by hex value.
@@ -591,6 +606,14 @@ static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = { HCMD_NAME(RX_QUEUES_NOTIFICATION), }; +/* Please keep this array *SORTED* by hex value. +* Access is done through binary search +*/ +static const struct iwl_hcmd_names iwl_mvm_statistics_names[] = { +HCMD_NAME (STATISTICS_OPER_NOTIF ), +HCMD_NAME (STATISTICS_OPER_PART1_NOTIF ), +}; +/* Please keep this array *SORTED* by hex value. * Access is done through binary search */
@@ -645,6 +668,7 @@ static const struct iwl_hcmd_arr iwl_mvm_groups[] = { [PROT_OFFLOAD_GROUP] = HCMD_ARR(iwl_mvm_prot_offload_names), [REGULATORY_AND_NVM_GROUP ] = HCMD_ARR(iwl_mvm_regulatory_and_nvm_names), + [STATISTICS_GROUP] = HCMD_ARR(iwl_mvm_statistics_names), };/* this forward declaration can avoid to export the function */
drivers/net/wireless/intel/iwlwifi/mvm/rx.c +150 -7
201 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/mvm/utils.c +61 -0
75 lines not on this page · raw message
Signature · 1 line
2.38.1
Re: [PATCH 01/10] wifi: iwlwifi: mvm: implement new firmware API for statistics
Hi Gregory and Anjaneyulu,
Quoted 10 lines · On Sun, Oct 22, 2023 at 05:55:47PM +0300, [email protected] wrote:
From: Anjaneyulu <[email protected]>
The new firmware API uses a new command and notification, the command configures in which statistics types driver is interested and the notification is sent periodically. An additional change in the API is that most of the statistics data is accumulated and reported by the firmware per MLO link. Implement new command and notification handlers and adjust to per-link statistics.
Quoted 2 lines
Signed-off-by Anjaneyulu <[email protected]>Signed-off-by Gregory Greenman <[email protected]>
I'm seeing a warning at boot time due to this patch. See below. It's from 'WARN_ON(iwl_cmd_groups_verify_sorted(trans_cfg));'. Looks like there's an array that is supposed to be sorted that isn't sorted anymore.
[ 5.342367] Intel(R) Wireless WiFi driver for Linux [ 5.342405] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002) [ 5.342978] iwlwifi 0000:04:00.0: Detected crf-id 0xbadcafe, cnv-id 0x10 wfpm id 0x80000000 [ 5.342993] iwlwifi 0000:04:00.0: PCI dev 24fd/1010, rev=0x230, rfid=0xd55555d5 [ 5.343131] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 5.343137] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 5.346469] iwlwifi 0000:04:00.0: loaded firmware version 36.ca7b901d.0 8265-36.ucode op_mode iwlmvm [ 5.346502] ------------[ cut here ]------------ [ 5.346503] WARNING: CPU: 1 PID: 20 at drivers/net/wireless/intel/iwlwifi/mvm/../iwl-trans.h:1158 iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346511] CPU: 1 PID: 20 Comm: kworker/1:0 Not tainted 6.6.0-11999-gae7b1149d4fb #1 [ 5.346514] Hardware name: Gigabyte Technology Co., Ltd. X399 AORUS Gaming 7/X399 AORUS Gaming 7, BIOS F2 08/31/2017 [ 5.346516] Workqueue: events request_firmware_work_func [ 5.346520] RIP: 0010:iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346524] Code: 41 5e 41 5f 5d e9 2b 4c 59 00 cc 48 c7 c7 10 58 a2 ba 48 c7 c6 8a 0c a3 ba e8 87 f1 57 00 e9 b6 fb ff ff 0f 0b e9 b2 fe ff ff <0f> 0b e9 aa fc ff ff e8 6f 96 58 00 66 66 66 66 66 66 2e 0f 1f 84 [ 5.346526] RSP: 0018:ffffa87d402e7bf8 EFLAGS: 00010286 [ 5.346529] RAX: 00000000ffffffff RBX: ffffa87d402e7c00 RCX: ffffffffba721630 [ 5.346531] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffffffffba721cc0 [ 5.346532] RBP: ffff8ba7c72e0028 R08: 0000000000000090 R09: 0000000000000070 [ 5.346534] R10: 0000000000000070 R11: 00000000000000ff R12: ffff8ba7c7241f88 [ 5.346536] R13: ffff8ba7c6fff814 R14: ffff8ba7c7241f80 R15: 0000000000000000 [ 5.346537] FS: 0000000000000000(0000) GS:ffff8baf1e840000(0000) knlGS:0000000000000000 [ 5.346540] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.346541] CR2: 0000000000000000 CR3: 0000000056228000 CR4: 00000000003506f0 [ 5.346543] Call Trace: [ 5.346546] <TASK> [ 5.346548] ? __warn+0xa7/0x140 [ 5.346551] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346554] ? report_bug+0xe8/0x180 [ 5.346557] ? handle_bug+0x3d/0x90 [ 5.346560] ? exc_invalid_op+0x1a/0x60 [ 5.346562] ? asm_exc_invalid_op+0x1a/0x20 [ 5.346566] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346568] ? iwl_op_mode_mvm_start+0x63e/0x9b0 [ 5.346571] _iwl_op_mode_start+0x4e/0xa0 [ 5.346575] iwl_req_fw_callback+0x2501/0x2610 [ 5.346579] ? srso_return_thunk+0x5/0x5f [ 5.346582] ? __switch_to+0x80/0x480 [ 5.346586] request_firmware_work_func+0x62/0xa0 [ 5.346589] process_scheduled_works+0x263/0x3d0 [ 5.346593] worker_thread+0x222/0x300 [ 5.346595] ? __cfi_worker_thread+0x10/0x10 [ 5.346598] kthread+0xf4/0x110 [ 5.346602] ? __cfi_kthread+0x10/0x10 [ 5.346604] ret_from_fork+0x43/0x50 [ 5.346608] ? __cfi_kthread+0x10/0x10 [ 5.346610] ret_from_fork_asm+0x1b/0x30 [ 5.346614] </TASK> [ 5.346615] ---[ end trace 0000000000000000 ]--- [ 5.346617] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
Re: [PATCH 01/10] wifi: iwlwifi: mvm: implement new firmware API for statistics
Quoted 13 lines · Eric Biggers
Hi Gregory and Anjaneyulu,
Quoted 10 lines · On Sun, Oct 22, 2023 at 05:55:47PM +0300, [email protected] wrote:
From: Anjaneyulu <[email protected]>
The new firmware API uses a new command and notification, the command configures in which statistics types driver is interested and the notification is sent periodically. An additional change in the API is that most of the statistics data is accumulated and reported by the firmware per MLO link. Implement new command and notification handlers and adjust to per-link statistics.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Anjaneyulu <[email protected]>Signed-off-by Gregory Greenman <[email protected]>I'm seeing a warning at boot time due to this patch. See below. It's from 'WARN_ON(iwl_cmd_groups_verify_sorted(trans_cfg));'. Looks like there's an array that is supposed to be sorted that isn't sorted anymore.
Hello together,
is there an update on this kernel dump below ?
Many Thanks for an update and a nice weekend
Damian
Quoted 49 lines
[ 5.342367] Intel(R) Wireless WiFi driver for Linux [ 5.342405] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002) [ 5.342978] iwlwifi 0000:04:00.0: Detected crf-id 0xbadcafe, cnv-id 0x10 wfpm id 0x80000000 [ 5.342993] iwlwifi 0000:04:00.0: PCI dev 24fd/1010, rev=0x230, rfid=0xd55555d5 [ 5.343131] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 5.343137] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 5.346469] iwlwifi 0000:04:00.0: loaded firmware version 36.ca7b901d.0 8265-36.ucode op_mode iwlmvm [ 5.346502] ------------[ cut here ]------------ [ 5.346503] WARNING: CPU: 1 PID: 20 at drivers/net/wireless/intel/iwlwifi/mvm/../iwl-trans.h:1158 iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346511] CPU: 1 PID: 20 Comm: kworker/1:0 Not tainted 6.6.0-11999-gae7b1149d4fb #1 [ 5.346514] Hardware name: Gigabyte Technology Co., Ltd. X399 AORUS Gaming 7/X399 AORUS Gaming 7, BIOS F2 08/31/2017 [ 5.346516] Workqueue: events request_firmware_work_func [ 5.346520] RIP: 0010:iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346524] Code: 41 5e 41 5f 5d e9 2b 4c 59 00 cc 48 c7 c7 10 58 a2 ba 48 c7 c6 8a 0c a3 ba e8 87 f1 57 00 e9 b6 fb ff ff 0f 0b e9 b2 fe ff ff <0f> 0b e9 aa fc ff ff e8 6f 96 58 00 66 66 66 66 66 66 2e 0f 1f 84 [ 5.346526] RSP: 0018:ffffa87d402e7bf8 EFLAGS: 00010286 [ 5.346529] RAX: 00000000ffffffff RBX: ffffa87d402e7c00 RCX: ffffffffba721630 [ 5.346531] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffffffffba721cc0 [ 5.346532] RBP: ffff8ba7c72e0028 R08: 0000000000000090 R09: 0000000000000070 [ 5.346534] R10: 0000000000000070 R11: 00000000000000ff R12: ffff8ba7c7241f88 [ 5.346536] R13: ffff8ba7c6fff814 R14: ffff8ba7c7241f80 R15: 0000000000000000 [ 5.346537] FS: 0000000000000000(0000) GS:ffff8baf1e840000(0000) knlGS:0000000000000000 [ 5.346540] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.346541] CR2: 0000000000000000 CR3: 0000000056228000 CR4: 00000000003506f0 [ 5.346543] Call Trace: [ 5.346546] <TASK> [ 5.346548] ? __warn+0xa7/0x140 [ 5.346551] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346554] ? report_bug+0xe8/0x180 [ 5.346557] ? handle_bug+0x3d/0x90 [ 5.346560] ? exc_invalid_op+0x1a/0x60 [ 5.346562] ? asm_exc_invalid_op+0x1a/0x20 [ 5.346566] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346568] ? iwl_op_mode_mvm_start+0x63e/0x9b0 [ 5.346571] _iwl_op_mode_start+0x4e/0xa0 [ 5.346575] iwl_req_fw_callback+0x2501/0x2610 [ 5.346579] ? srso_return_thunk+0x5/0x5f [ 5.346582] ? __switch_to+0x80/0x480 [ 5.346586] request_firmware_work_func+0x62/0xa0 [ 5.346589] process_scheduled_works+0x263/0x3d0 [ 5.346593] worker_thread+0x222/0x300 [ 5.346595] ? __cfi_worker_thread+0x10/0x10 [ 5.346598] kthread+0xf4/0x110 [ 5.346602] ? __cfi_kthread+0x10/0x10 [ 5.346604] ret_from_fork+0x43/0x50 [ 5.346608] ? __cfi_kthread+0x10/0x10 [ 5.346610] ret_from_fork_asm+0x1b/0x30 [ 5.346614] </TASK> [ 5.346615] ---[ end trace 0000000000000000 ]--- [ 5.346617] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
Re: [PATCH 01/10] wifi: iwlwifi: mvm: implement new firmware API for statistics
Hi,
Quoted 18 lines · Damian Tometzki
Quoted 16 lines · Eric Biggers
Hi Gregory and Anjaneyulu,
Quoted 12 lines · On Sun, Oct 22, 2023 at 05:55:47PM +0300, [email protected] wrote:
From: Anjaneyulu <[email protected]>
The new firmware API uses a new command and notification, the command configures in which statistics types driver is interested and the notification is sent periodically. An additional change in the API is that most of the statistics data is accumulated and reported by the firmware per MLO link. Implement new command and notification handlers and adjust to per-link statistics.
Signed-off-by Anjaneyulu <[email protected]>Signed-off-by Gregory Greenman <[email protected]>
Quoted 8 lines
Quoted 4 lines
I'm seeing a warning at boot time due to this patch. See below. It's from 'WARN_ON(iwl_cmd_groups_verify_sorted(trans_cfg));'. Looks like there's an array that is supposed to be sorted that isn't sorted anymore.
Hello together,
is there an update on this kernel dump below ?
Fixed by:
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
Quoted 2 lines
Many Thanks for an update and a nice weekend
you too
Quoted 53 lines
Damian
Quoted 49 lines
[ 5.342367] Intel(R) Wireless WiFi driver for Linux [ 5.342405] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002) [ 5.342978] iwlwifi 0000:04:00.0: Detected crf-id 0xbadcafe, cnv-id 0x10 wfpm id 0x80000000 [ 5.342993] iwlwifi 0000:04:00.0: PCI dev 24fd/1010, rev=0x230, rfid=0xd55555d5 [ 5.343131] xhci_hcd 0000:01:00.0: xHCI Host Controller [ 5.343137] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 5.346469] iwlwifi 0000:04:00.0: loaded firmware version 36.ca7b901d.0 8265-36.ucode op_mode iwlmvm [ 5.346502] ------------[ cut here ]------------ [ 5.346503] WARNING: CPU: 1 PID: 20 at drivers/net/wireless/intel/iwlwifi/mvm/../iwl-trans.h:1158 iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346511] CPU: 1 PID: 20 Comm: kworker/1:0 Not tainted 6.6.0-11999-gae7b1149d4fb #1 [ 5.346514] Hardware name: Gigabyte Technology Co., Ltd. X399 AORUS Gaming 7/X399 AORUS Gaming 7, BIOS F2 08/31/2017 [ 5.346516] Workqueue: events request_firmware_work_func [ 5.346520] RIP: 0010:iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346524] Code: 41 5e 41 5f 5d e9 2b 4c 59 00 cc 48 c7 c7 10 58 a2 ba 48 c7 c6 8a 0c a3 ba e8 87 f1 57 00 e9 b6 fb ff ff 0f 0b e9 b2 fe ff ff <0f> 0b e9 aa fc ff ff e8 6f 96 58 00 66 66 66 66 66 66 2e 0f 1f 84 [ 5.346526] RSP: 0018:ffffa87d402e7bf8 EFLAGS: 00010286 [ 5.346529] RAX: 00000000ffffffff RBX: ffffa87d402e7c00 RCX: ffffffffba721630 [ 5.346531] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffffffffba721cc0 [ 5.346532] RBP: ffff8ba7c72e0028 R08: 0000000000000090 R09: 0000000000000070 [ 5.346534] R10: 0000000000000070 R11: 00000000000000ff R12: ffff8ba7c7241f88 [ 5.346536] R13: ffff8ba7c6fff814 R14: ffff8ba7c7241f80 R15: 0000000000000000 [ 5.346537] FS: 0000000000000000(0000) GS:ffff8baf1e840000(0000) knlGS:0000000000000000 [ 5.346540] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.346541] CR2: 0000000000000000 CR3: 0000000056228000 CR4: 00000000003506f0 [ 5.346543] Call Trace: [ 5.346546] <TASK> [ 5.346548] ? __warn+0xa7/0x140 [ 5.346551] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346554] ? report_bug+0xe8/0x180 [ 5.346557] ? handle_bug+0x3d/0x90 [ 5.346560] ? exc_invalid_op+0x1a/0x60 [ 5.346562] ? asm_exc_invalid_op+0x1a/0x20 [ 5.346566] ? iwl_op_mode_mvm_start+0x995/0x9b0 [ 5.346568] ? iwl_op_mode_mvm_start+0x63e/0x9b0 [ 5.346571] _iwl_op_mode_start+0x4e/0xa0 [ 5.346575] iwl_req_fw_callback+0x2501/0x2610 [ 5.346579] ? srso_return_thunk+0x5/0x5f [ 5.346582] ? __switch_to+0x80/0x480 [ 5.346586] request_firmware_work_func+0x62/0xa0 [ 5.346589] process_scheduled_works+0x263/0x3d0 [ 5.346593] worker_thread+0x222/0x300 [ 5.346595] ? __cfi_worker_thread+0x10/0x10 [ 5.346598] kthread+0xf4/0x110 [ 5.346602] ? __cfi_kthread+0x10/0x10 [ 5.346604] ret_from_fork+0x43/0x50 [ 5.346608] ? __cfi_kthread+0x10/0x10 [ 5.346610] ret_from_fork_asm+0x1b/0x30 [ 5.346614] </TASK> [ 5.346615] ---[ end trace 0000000000000000 ]--- [ 5.346617] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8265, REV=0x230
PATCH 2/10 wifi: iwlwifi: mvm: debugfs for fw system stats
In reply to [email protected]From: Anjaneyulu <[email protected]>
Add debgufs handler for fw system statistics command.
--- .../net/wireless/intel/iwlwifi/mvm/debugfs.c | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +104 -0
@@ -1005,6 +1005,13 @@ static ssize_t iwl_dbgfs_fw_rx_stats_read(struct file *file,char *buf;int ret;size_t bufsz; +u8 cmd_ver =iwl_fw_lookup_cmd_ver (mvm->fw, +WIDE_ID (SYSTEM_GROUP , +SYSTEM_STATISTICS_CMD ), +IWL_FW_CMD_VER_UNKNOWN ); + +if (cmd_ver !=IWL_FW_CMD_VER_UNKNOWN ) +return -EOPNOTSUPP ;if (iwl_mvm_has_new_rx_stats_api (mvm)) bufsz = ((sizeof(struct mvm_statistics_rx) /
@@ -1184,6 +1191,101 @@ static ssize_t iwl_dbgfs_fw_rx_stats_read(struct file *file, }#undef PRINT_STAT_LE32 +static ssize_t iwl_dbgfs_fw_system_stats_read (struct file *file, +char __user *user_buf, +size_t count,loff_t *ppos) +{ +char *buff, *pos, *endpos; +int ret; +size_t bufsz; +int i; +struct iwl_mvm_vif *mvmvif; +struct ieee80211_vif *vif; +struct iwl_mvm *mvm = file->private_data; +u8 cmd_ver =iwl_fw_lookup_cmd_ver (mvm->fw, +WIDE_ID (SYSTEM_GROUP , +SYSTEM_STATISTICS_CMD ), +IWL_FW_CMD_VER_UNKNOWN ); + +/* in case of a wrong cmd version, allocate buffer only for error msg */ + bufsz = (cmd_ver ==1 ) ?4096 :64 ; + + buff =kzalloc (bufsz,GFP_KERNEL ); +if (!buff) +return -ENOMEM ; + + pos = buff; + endpos = pos + bufsz; + +if (cmd_ver !=1 ) { + pos +=scnprintf (pos, endpos - pos, +"System stats not supported:%d\n" , cmd_ver); + goto send_out; + } + +mutex_lock (&mvm->mutex); +if (iwl_mvm_firmware_running (mvm)) +iwl_mvm_request_statistics (mvm, false); + +for (i =0 ; i <NUM_MAC_INDEX_DRIVER ; i++) { + vif =iwl_mvm_rcu_dereference_vif_id (mvm, i, false); +if (!vif) +continue ; + +if (vif->type ==NL80211_IFTYPE_STATION ) +break ; + } + +if (i ==NUM_MAC_INDEX_DRIVER || !vif) { + pos +=scnprintf (pos, endpos - pos,"vif is NULL\n" ); + goto release_send_out; + } + + mvmvif =iwl_mvm_vif_from_mac80211 (vif); +if (!mvmvif) { + pos +=scnprintf (pos, endpos - pos,"mvmvif is NULL\n" ); + goto release_send_out; + } + +for_each_mvm_vif_valid_link (mvmvif, i) { +struct iwl_mvm_vif_link_info *link_info = mvmvif->link[i]; + + pos +=scnprintf (pos, endpos - pos, +"link_id %d" , i); + pos +=scnprintf (pos, endpos - pos, +" num_beacons %d" , + link_info->beacon_stats.num_beacons); + pos +=scnprintf (pos, endpos - pos, +" accu_num_beacons %d" , + link_info->beacon_stats.accu_num_beacons); + pos +=scnprintf (pos, endpos - pos, +" avg_signal %d\n" , + link_info->beacon_stats.avg_signal); + } + + pos +=scnprintf (pos, endpos - pos, +"radio_stats.rx_time %lld\n" , + mvm->radio_stats.rx_time); + pos +=scnprintf (pos, endpos - pos, +"radio_stats.tx_time %lld\n" , + mvm->radio_stats.tx_time); + pos +=scnprintf (pos, endpos - pos, +"accu_radio_stats.rx_time %lld\n" , + mvm->accu_radio_stats.rx_time); + pos +=scnprintf (pos, endpos - pos, +"accu_radio_stats.tx_time %lld\n" , + mvm->accu_radio_stats.tx_time); + +release_send_out: +mutex_unlock (&mvm->mutex); + +send_out: + ret =simple_read_from_buffer (user_buf, count, ppos, buff, pos - buff); +kfree (buff); + +return ret; +} + static ssize_t iwl_dbgfs_frame_stats_read(struct iwl_mvm *mvm, char __user *user_buf, size_t count, loff_t *ppos,
@@ -2053,6 +2155,7 @@ MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);MVM_DEBUGFS_READ_WRITE_FILE_OPS (disable_power_off,64 );MVM_DEBUGFS_READ_FILE_OPS (fw_rx_stats);MVM_DEBUGFS_READ_FILE_OPS (drv_rx_stats); +MVM_DEBUGFS_READ_FILE_OPS (fw_system_stats);MVM_DEBUGFS_READ_FILE_OPS (fw_ver);MVM_DEBUGFS_READ_FILE_OPS (phy_integration_ver);MVM_DEBUGFS_READ_FILE_OPS (tas_get_status);
@@ -2260,6 +2363,7 @@ void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm)MVM_DEBUGFS_ADD_FILE (fw_ver, mvm->debugfs_dir,0400 );MVM_DEBUGFS_ADD_FILE (fw_rx_stats, mvm->debugfs_dir,0400 );MVM_DEBUGFS_ADD_FILE (drv_rx_stats, mvm->debugfs_dir,0400 ); +MVM_DEBUGFS_ADD_FILE (fw_system_stats, mvm->debugfs_dir,0400 );MVM_DEBUGFS_ADD_FILE (fw_restart, mvm->debugfs_dir,0200 );MVM_DEBUGFS_ADD_FILE (fw_nmi, mvm->debugfs_dir,0200 );MVM_DEBUGFS_ADD_FILE (bt_tx_prio, mvm->debugfs_dir,0200 );
Signature · 1 line
2.38.1
PATCH 3/10 wifi: iwlwifi: mvm: add a print when sending RLC command
In reply to [email protected]From: Miri Korenblit <[email protected]>
Expand RLC logging to simplify the debug.
--- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +3 -0
@@ -192,6 +192,9 @@ int iwl_mvm_phy_send_rlc(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt,iwl_mvm_phy_ctxt_set_rxchain (mvm, ctxt, &cmd.rlc.rx_chain_info, chains_static, chains_dynamic); +IWL_DEBUG_FW (mvm,"Send RLC command: phy=%d, rx_chain_info=0x%x\n" , + ctxt->id, cmd.rlc.rx_chain_info); +return iwl_mvm_send_cmd_pdu (mvm,iwl_cmd_id (RLC_CONFIG_CMD ,DATA_PATH_GROUP ,2 ),0 ,sizeof (cmd), &cmd);
Signature · 1 line
2.38.1
PATCH 4/10 wifi: iwlwifi: fw: Add support for UATS table in UHB
In reply to [email protected]From: Mukesh Sisodiya <[email protected]>
Driver need to provide details of VLP, AFC
AP type supported for the specific MCC to firmware. Driver will read the UATS (UHB AP type support) table from BIOS and sent to firmware using UATS_TABLE_CMD.
Add the support for the same in the driver.
--- .../wireless/intel/iwlwifi/fw/api/nvm-reg.h | 18 ++++++ .../net/wireless/intel/iwlwifi/fw/runtime.h | 4 ++ drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 50 ++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 17 ++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 59 +++++++++++++++++++ 5 files changed, 148 insertions(+)
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +18 -0
@@ -44,6 +44,11 @@ enum iwl_regulatory_and_nvm_subcmd_ids {*/ SAR_OFFSET_MAPPING_TABLE_CMD =0x4 , +/** +* @UATS_TABLE_CMD: &struct iwl_uats_table_cmd +*/ + UATS_TABLE_CMD = 0x5, +/** * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy */
@@ -650,4 +655,17 @@ struct iwl_pnvm_init_complete_ntfy { __le32 status; } __packed;/* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */ +#define UATS_TABLE_ROW_SIZE 26 +#define UATS_TABLE_COL_SIZE 13 + +/** +* struct iwl_uats_table_cmd - struct for UATS_TABLE_CMD +* @offset_map: mapping a mcc to UHB AP type support (UATS) allowed +* @reserved: reserved +*/ +struct iwl_uats_table_cmd { +u8 offset_map[UATS_TABLE_ROW_SIZE ][UATS_TABLE_COL_SIZE ]; +__le16 reserved; +} __packed;/* UATS_TABLE_CMD_S_VER_1 */ +#endif /* __iwl_fw_api_nvm_reg_h__ */
drivers/net/wireless/intel/iwlwifi/fw/runtime.h +4 -0
@@ -98,6 +98,8 @@ struct iwl_txf_iter_data {* @cur_fw_img: current firmware image, must be maintained by * the driver by calling &iwl_fw_set_current_image() * @dump: debug dump data +* @uats_enabled: VLP or AFC AP is enabled +* @uats_table: AP type table */ struct iwl_fw_runtime {struct iwl_trans *trans;
@@ -171,6 +173,8 @@ struct iwl_fw_runtime {struct iwl_sar_offset_mapping_cmd sgom_table;bool sgom_enabled;u8 reduced_power_flags; +bool uats_enabled; +struct iwl_uats_table_cmd uats_table;#endif };
drivers/net/wireless/intel/iwlwifi/fw/uefi.c +50 -0
54 lines not on this page · raw message
drivers/net/wireless/intel/iwlwifi/fw/uefi.h +17 -0
@@ -9,8 +9,10 @@#define IWL_UEFI_REDUCED_POWER_NAME L"UefiCnvWlanReducedPower"#define IWL_UEFI_SGOM_NAME L"UefiCnvWlanSarGeoOffsetMapping"#define IWL_UEFI_STEP_NAME L"UefiCnvCommonSTEP" +#define IWL_UEFI_UATS_NAME L"CnvUefiWlanUATS"#define IWL_SGOM_MAP_SIZE 339 +#define IWL_UATS_MAP_SIZE 339struct pnvm_sku_package {u8 rev;
@@ -25,6 +27,11 @@ struct uefi_cnv_wlan_sgom_data {u8 offset_map[IWL_SGOM_MAP_SIZE -1 ]; } __packed; +struct uefi_cnv_wlan_uats_data { +u8 revision; +u8 offset_map[IWL_UATS_MAP_SIZE -1 ]; +} __packed; +struct uefi_cnv_common_step_data {u8 revision;u8 step_mode;
@@ -82,10 +89,20 @@ iwl_uefi_handle_tlv_mem_desc(struct iwl_trans *trans, const u8 *data,#if defined(CONFIG_EFI ) && defined(CONFIG_ACPI )void iwl_uefi_get_sgom_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt); +int iwl_uefi_get_uats_table (struct iwl_trans *trans, +struct iwl_fw_runtime *fwrt);#else static inline void iwl_uefi_get_sgom_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt) { } + +static inline +int iwl_uefi_get_uats_table (struct iwl_trans *trans, +struct iwl_fw_runtime *fwrt) +{ +return 0 ; +} +#endif #endif /* __iwl_fw_uefi__ */
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +59 -0
95 lines not on this page · raw message
Signature · 1 line
2.38.1
PATCH 5/10 wifi: iwlwifi: empty overflow queue during flush
In reply to [email protected]From: Miri Korenblit <[email protected]>
If a TX queue has no space for new TX frames, the driver will keep these frames in the overflow queue, and during reclaim flow it will retry to send the frames from that queue.
But if the reclaim flow was invoked from TX queue flush, we will also TX these frames, which is wrong as we don't want to TX anything after flush.
This might also cause assert 0x125F when removing the queue, saying that the driver removes a non-empty queue
Fix this by TXing the overflow queue's frames only if we are not in flush queue flow.
--- drivers/net/wireless/intel/iwlwifi/dvm/tx.c | 5 +++-- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 7 ++++--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/queue/tx.c | 9 +++++---- drivers/net/wireless/intel/iwlwifi/queue/tx.h | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-)
drivers/net/wireless/intel/iwlwifi/dvm/tx.c +3 -2
@@ -3,6 +3,7 @@* * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. * Copyright (C) 2019 Intel Corporation +* Copyright (C) 2023 Intel Corporation *****************************************************************************/ #include <linux/kernel.h>
@@ -1169,7 +1170,7 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)iwlagn_check_ratid_empty (priv, sta_id, tid); } -iwl_trans_reclaim (priv->trans, txq_id, ssn, &skbs); +iwl_trans_reclaim (priv->trans, txq_id, ssn, &skbs, false); freed =0 ;
@@ -1315,7 +1316,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,* block-ack window (we assume that they've been successfully * transmitted ... if not, it's too late anyway). */ iwl_trans_reclaim (priv->trans, scd_flow, ba_resp_scd_ssn, - &reclaimed_skbs); + &reclaimed_skbs, false); IWL_DEBUG_TX_REPLY(priv, "REPLY_COMPRESSED_BA [%d] Received from %pM, " "sta_id = %d\n",
drivers/net/wireless/intel/iwlwifi/iwl-trans.h +4 -3
@@ -589,7 +589,7 @@ struct iwl_trans_ops {int (*tx)(struct iwl_trans *trans,struct sk_buff *skb,struct iwl_device_tx_cmd *dev_cmd,int queue);void (*reclaim)(struct iwl_trans *trans,int queue,int ssn, -struct sk_buff_head *skbs); +struct sk_buff_head *skbs,bool is_flush);void (*set_q_ptrs)(struct iwl_trans *trans,int queue,int ptr);
@@ -1274,14 +1274,15 @@ static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb, }static inline void iwl_trans_reclaim (struct iwl_trans *trans,int queue, -int ssn,struct sk_buff_head *skbs) +int ssn,struct sk_buff_head *skbs, +bool is_flush) {if (WARN_ON_ONCE (trans->state !=IWL_TRANS_FW_ALIVE )) {IWL_ERR (trans,"%s bad state = %d\n" , __func__, trans->state);return ; } - trans->ops->reclaim (trans, queue, ssn, skbs); + trans->ops->reclaim (trans, queue, ssn, skbs, is_flush); } static inline void iwl_trans_set_q_ptrs(struct iwl_trans *trans, int queue,
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +2 -2
@@ -1623,7 +1623,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, seq_ctl =le16_to_cpu (tx_resp->seq_ctl);/* we can free until ssn % q.n_bd not inclusive */ -iwl_trans_reclaim (mvm->trans, txq_id, ssn, &skbs); +iwl_trans_reclaim (mvm->trans, txq_id, ssn, &skbs, false);while (!skb_queue_empty (&skbs)) {struct sk_buff *skb =__skb_dequeue (&skbs);
@@ -1975,7 +1975,7 @@ static void iwl_mvm_tx_reclaim(struct iwl_mvm *mvm, int sta_id, int tid,* block-ack window (we assume that they've been successfully * transmitted ... if not, it's too late anyway). */ -iwl_trans_reclaim (mvm->trans, txq, index, &reclaimed_skbs); +iwl_trans_reclaim (mvm->trans, txq, index, &reclaimed_skbs, is_flush); skb_queue_walk(&reclaimed_skbs, skb) {struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);
drivers/net/wireless/intel/iwlwifi/queue/tx.c +5 -4
@@ -1575,7 +1575,7 @@ void iwl_txq_progress(struct iwl_txq *txq)/* Frees buffers until index _not_ inclusive */ void iwl_txq_reclaim (struct iwl_trans *trans,int txq_id,int ssn, -struct sk_buff_head *skbs) +struct sk_buff_head *skbs,bool is_flush) {struct iwl_txq *txq = trans->txqs.txq[txq_id];int tfd_num, read_ptr, last_to_free;
@@ -1650,9 +1650,11 @@ void iwl_txq_reclaim(struct iwl_trans *trans, int txq_id, int ssn,if (iwl_txq_space (trans, txq) > txq->low_mark &&test_bit (txq_id, trans->txqs.queue_stopped)) {struct sk_buff_head overflow_skbs; +struct sk_buff *skb;__skb_queue_head_init (&overflow_skbs); -skb_queue_splice_init (&txq->overflow_q, &overflow_skbs); +skb_queue_splice_init (&txq->overflow_q, + is_flush ? skbs : &overflow_skbs);/* * We are going to transmit from the overflow queue.
@@ -1672,8 +1674,7 @@ void iwl_txq_reclaim(struct iwl_trans *trans, int txq_id, int ssn,*/ spin_unlock_bh (&txq->lock); -while (!skb_queue_empty (&overflow_skbs)) { -struct sk_buff *skb =__skb_dequeue (&overflow_skbs); +while ((skb =__skb_dequeue (&overflow_skbs))) {struct iwl_device_tx_cmd *dev_cmd_ptr; dev_cmd_ptr = *(void **)((u8 *)skb->cb +
drivers/net/wireless/intel/iwlwifi/queue/tx.h +1 -1
@@ -181,7 +181,7 @@ void iwl_txq_gen1_update_byte_cnt_tbl(struct iwl_trans *trans, struct iwl_txq *txq, u16 byte_cnt, int num_tbs);void iwl_txq_reclaim (struct iwl_trans *trans,int txq_id,int ssn, -struct sk_buff_head *skbs); +struct sk_buff_head *skbs,bool is_flush);void iwl_txq_set_q_ptrs (struct iwl_trans *trans,int txq_id,int ptr);void iwl_trans_txq_freeze_timer (struct iwl_trans *trans,unsigned long txqs,bool freeze);
Signature · 1 line
2.38.1
PATCH 6/10 wifi: iwlwifi: trace full frames with TX status request
In reply to [email protected]From: Johannes Berg <[email protected]>
If upper layers requested a TX status, then the frames are more important, so trace frames in that case.
--- drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h +7 -1
@@ -3,17 +3,19 @@* * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(C) 2016 Intel Deutschland GmbH -* Copyright(c) 2018 Intel Corporation +* Copyright(c) 2018, 2023 Intel Corporation *****************************************************************************/ #ifndef __IWLWIFI_DEVICE_TRACE #include <linux/skbuff.h> #include <linux/ieee80211.h> #include <net/cfg80211.h> +#include <net/mac80211.h> #include "iwl-trans.h" #if !defined(__IWLWIFI_DEVICE_TRACE) static inline bool iwl_trace_data(struct sk_buff *skb) { + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (void *)skb->data; __le16 fc = hdr->frame_control; int offs = 24; /* start with normal header length */
@@ -21,6 +23,10 @@ static inline bool iwl_trace_data(struct sk_buff *skb)if (!ieee80211_is_data (fc))return false; +/* If upper layers wanted TX status it's an important frame */ +if (info->flags &IEEE80211_TX_CTL_REQ_TX_STATUS ) +return false; +/* Try to determine if the frame is EAPOL. This might have false * positives (if there's no RFC 1042 header and we compare to some * payload instead) but since we're only doing tracing that's not
Signature · 1 line
2.38.1
PATCH 7/10 wifi: iwlwifi: mvm: cycle FW link on chanctx removal
In reply to [email protected]From: Johannes Berg <[email protected]>
When the vif is in MLD mode, we'll get a vif links change from non-zero to zero on disassociation, which removes all links in the firmware and adds the 'deflink' the driver/mac80211 has. This causes the firmware to clear some internal state.
However, in non-MLD mode, this doesn't happen, and causes some state to be left around in firmware, which can particularly cause trouble with the ref-BSSID in multi-BSSID, leading to an assert later if immediately making a new multi-BSSID connection with a different ref-BSSID.
Fix this by removing/re-adding the link in the non-MLD case when the channel is removed from the vif. This way, all of the state will get cleared out, even if we need the deflink, which is more for software architecture purposes than otherwise.
--- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +7 -0
@@ -462,10 +462,17 @@ static void iwl_mvm_mld_unassign_vif_chanctx(struct ieee80211_hw *hw,struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *ctx) { + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);struct iwl_mvm *mvm =IWL_MAC80211_GET_MVM (hw);mutex_lock (&mvm->mutex);__iwl_mvm_mld_unassign_vif_chanctx (mvm, vif, link_conf, ctx, false); +/* in the non-MLD case, remove/re-add the link to clean up FW state */ +if (!ieee80211_vif_is_mld (vif) && !mvmvif->ap_sta && + !WARN_ON_ONCE (vif->cfg.assoc)) { +iwl_mvm_remove_link (mvm, vif, link_conf); +iwl_mvm_add_link (mvm, vif, link_conf); + }mutex_unlock (&mvm->mutex); }
Signature · 1 line
2.38.1
PATCH 8/10 wifi: iwlwifi: mvm: show dump even for pldr_sync
In reply to [email protected]From: Johannes Berg <[email protected]>
Worst case it's extra (garbage) data, best case we see why things failed ... Seems the trade-off is better if we print it.
--- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/ops.c +0 -3
@@ -1979,9 +1979,6 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode, bool sync) {struct iwl_mvm *mvm =IWL_OP_MODE_GET_MVM (op_mode); -if (mvm->pldr_sync) -return ; -if (!test_bit (STATUS_TRANS_DEAD , &mvm->trans->status) && !test_and_clear_bit (IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE , &mvm->status))
Signature · 1 line
2.38.1
PATCH 9/10 wifi: iwlwifi: read DSM func 2 for specific RF types
In reply to [email protected]From: Daniel Gabay <[email protected]>
By definition, this DSM func is valid only for HR/JF RF types. Until now firmware ignored this bit (if set) on other than the above types, but in future firmware versions sending this bit will lead to firmware 0x3426 assert.
Avoid that by verifying the HW in driver first.
--- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 26 ++++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/acpi.c +18 -8
@@ -1015,15 +1015,25 @@ __le32 iwl_acpi_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt)__le32 config_bitmap =0 ;/* -** Evaluate func 'DSM_FUNC_ENABLE_INDONESIA_5G2' +* Evaluate func 'DSM_FUNC_ENABLE_INDONESIA_5G2'. +* Setting config_bitmap Indonesia bit is valid only for HR/JF. */ - ret =iwl_acpi_get_dsm_u8 (fwrt->dev,0 , -DSM_FUNC_ENABLE_INDONESIA_5G2 , - &iwl_guid, &value); - -if (!ret && value ==DSM_VALUE_INDONESIA_ENABLE ) - config_bitmap |= -cpu_to_le32 (LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK ); +switch (CSR_HW_RFID_TYPE (fwrt->trans->hw_rf_id)) { +case IWL_CFG_RF_TYPE_HR1 : +case IWL_CFG_RF_TYPE_HR2 : +case IWL_CFG_RF_TYPE_JF1 : +case IWL_CFG_RF_TYPE_JF2 : + ret =iwl_acpi_get_dsm_u8 (fwrt->dev,0 , +DSM_FUNC_ENABLE_INDONESIA_5G2 , + &iwl_guid, &value); + +if (!ret && value ==DSM_VALUE_INDONESIA_ENABLE ) + config_bitmap |= +cpu_to_le32 (LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK ); +break ; +default : +break ; + }/* ** Evaluate func 'DSM_FUNC_DISABLE_SRD'
Signature · 1 line
2.38.1
PATCH 10/10 wifi: iwlwifi: bump FW API to 86 for AX/BZ/SC devices
In reply to [email protected]From: Gregory Greenman <[email protected]>
Start supporting API version 86 for new devices.
--- drivers/net/wireless/intel/iwlwifi/cfg/ax210.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +1 -1
@@ -10,7 +10,7 @@#include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_AX210_UCODE_API_MAX 84 +#define IWL_AX210_UCODE_API_MAX 86/* Lowest firmware API version supported */ #define IWL_AX210_UCODE_API_MIN 59
drivers/net/wireless/intel/iwlwifi/cfg/bz.c +1 -1
@@ -10,7 +10,7 @@#include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_BZ_UCODE_API_MAX 84 +#define IWL_BZ_UCODE_API_MAX 86/* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 80
drivers/net/wireless/intel/iwlwifi/cfg/sc.c +1 -1
@@ -10,7 +10,7 @@#include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_SC_UCODE_API_MAX 84 +#define IWL_SC_UCODE_API_MAX 86/* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 82
Signature · 1 line
2.38.1