1. 31 Jan, 2022 8 commits
    • Colin Ian King's avatar
      carl9170: fix missing bit-wise or operator for tx_params · 02a95374
      Colin Ian King authored
      Currently tx_params is being re-assigned with a new value and the
      previous setting IEEE80211_HT_MCS_TX_RX_DIFF is being overwritten.
      The assignment operator is incorrect, the original intent was to
      bit-wise or the value in. Fix this by replacing the = operator
      with |= instead.
      
      Kudos to Christian Lamparter for suggesting the correct fix.
      
      Fixes: fe8ee9ad ("carl9170: mac80211 glue and command interface")
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Cc: <Stable@vger.kernel.org>
      Acked-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220125004406.344422-1-colin.i.king@gmail.com
      02a95374
    • Bryan O'Donoghue's avatar
      wcn36xx: Differentiate wcn3660 from wcn3620 · 98d504a8
      Bryan O'Donoghue authored
      The spread of capability between the three WiFi silicon parts wcn36xx
      supports is:
      
      wcn3620 - 802.11 a/b/g
      wcn3660 - 802.11 a/b/g/n
      wcn3680 - 802.11 a/b/g/n/ac
      
      We currently treat wcn3660 as wcn3620 thus limiting it to 2GHz channels.
      Fix this regression by ensuring we differentiate between all three parts.
      
      Fixes: 8490987b ("wcn36xx: Hook and identify RF_IRIS_WCN3680")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Reviewed-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220125004046.4058284-1-bryan.odonoghue@linaro.org
      98d504a8
    • Kalle Valo's avatar
      ath11k: mhi: use mhi_sync_power_up() · 3df6d74a
      Kalle Valo authored
      If amss.bin was missing ath11k would crash during 'rmmod ath11k_pci'. The
      reason for that was that we were using mhi_async_power_up() which does not
      check any errors. But mhi_sync_power_up() on the other hand does check for
      errors so let's use that to fix the crash.
      
      I was not able to find a reason why an async version was used.
      ath11k_mhi_start() (which enables state ATH11K_MHI_POWER_ON) is called from
      ath11k_hif_power_up(), which can sleep. So sync version should be safe to use
      here.
      
      [  145.569731] general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN PTI
      [  145.569789] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
      [  145.569843] CPU: 2 PID: 1628 Comm: rmmod Kdump: loaded Tainted: G        W         5.16.0-wt-ath+ #567
      [  145.569898] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0067.2021.0528.1339 05/28/2021
      [  145.569956] RIP: 0010:ath11k_hal_srng_access_begin+0xb5/0x2b0 [ath11k]
      [  145.570028] Code: df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 ec 01 00 00 48 8b ab a8 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 <0f> b6 14 02 48 89 e8 83 e0 07 83 c0 03 45 85 ed 75 48 38 d0 7c 08
      [  145.570089] RSP: 0018:ffffc900025d7ac0 EFLAGS: 00010246
      [  145.570144] RAX: dffffc0000000000 RBX: ffff88814fca2dd8 RCX: 1ffffffff50cb455
      [  145.570196] RDX: 0000000000000000 RSI: ffff88814fca2dd8 RDI: ffff88814fca2e80
      [  145.570252] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffa8659497
      [  145.570329] R10: fffffbfff50cb292 R11: 0000000000000001 R12: ffff88814fca0000
      [  145.570410] R13: 0000000000000000 R14: ffff88814fca2798 R15: ffff88814fca2dd8
      [  145.570465] FS:  00007fa399988540(0000) GS:ffff888233e00000(0000) knlGS:0000000000000000
      [  145.570519] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  145.570571] CR2: 00007fa399b51421 CR3: 0000000137898002 CR4: 00000000003706e0
      [  145.570623] Call Trace:
      [  145.570675]  <TASK>
      [  145.570727]  ? ath11k_ce_tx_process_cb+0x34b/0x860 [ath11k]
      [  145.570797]  ath11k_ce_tx_process_cb+0x356/0x860 [ath11k]
      [  145.570864]  ? tasklet_init+0x150/0x150
      [  145.570919]  ? ath11k_ce_alloc_pipes+0x280/0x280 [ath11k]
      [  145.570986]  ? tasklet_clear_sched+0x42/0xe0
      [  145.571042]  ? tasklet_kill+0xe9/0x1b0
      [  145.571095]  ? tasklet_clear_sched+0xe0/0xe0
      [  145.571148]  ? irq_has_action+0x120/0x120
      [  145.571202]  ath11k_ce_cleanup_pipes+0x45a/0x580 [ath11k]
      [  145.571270]  ? ath11k_pci_stop+0x10e/0x170 [ath11k_pci]
      [  145.571345]  ath11k_core_stop+0x8a/0xc0 [ath11k]
      [  145.571434]  ath11k_core_deinit+0x9e/0x150 [ath11k]
      [  145.571499]  ath11k_pci_remove+0xd2/0x260 [ath11k_pci]
      [  145.571553]  pci_device_remove+0x9a/0x1c0
      [  145.571605]  __device_release_driver+0x332/0x660
      [  145.571659]  driver_detach+0x1e7/0x2c0
      [  145.571712]  bus_remove_driver+0xe2/0x2d0
      [  145.571772]  pci_unregister_driver+0x21/0x250
      [  145.571826]  __do_sys_delete_module+0x30a/0x4b0
      [  145.571879]  ? free_module+0xac0/0xac0
      [  145.571933]  ? lockdep_hardirqs_on_prepare.part.0+0x18c/0x370
      [  145.571986]  ? syscall_enter_from_user_mode+0x1d/0x50
      [  145.572039]  ? lockdep_hardirqs_on+0x79/0x100
      [  145.572097]  do_syscall_64+0x3b/0x90
      [  145.572153]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220127090117.2024-2-kvalo@kernel.org
      3df6d74a
    • Kalle Valo's avatar
      ath11k: pci: fix crash on suspend if board file is not found · b4f4c564
      Kalle Valo authored
      Mario reported that the kernel was crashing on suspend if ath11k was not able
      to find a board file:
      
      [  473.693286] PM: Suspending system (s2idle)
      [  473.693291] printk: Suspending console(s) (use no_console_suspend to debug)
      [  474.407787] BUG: unable to handle page fault for address: 0000000000002070
      [  474.407791] #PF: supervisor read access in kernel mode
      [  474.407794] #PF: error_code(0x0000) - not-present page
      [  474.407798] PGD 0 P4D 0
      [  474.407801] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [  474.407805] CPU: 2 PID: 2350 Comm: kworker/u32:14 Tainted: G        W         5.16.0 #248
      [...]
      [  474.407868] Call Trace:
      [  474.407870]  <TASK>
      [  474.407874]  ? _raw_spin_lock_irqsave+0x2a/0x60
      [  474.407882]  ? lock_timer_base+0x72/0xa0
      [  474.407889]  ? _raw_spin_unlock_irqrestore+0x29/0x3d
      [  474.407892]  ? try_to_del_timer_sync+0x54/0x80
      [  474.407896]  ath11k_dp_rx_pktlog_stop+0x49/0xc0 [ath11k]
      [  474.407912]  ath11k_core_suspend+0x34/0x130 [ath11k]
      [  474.407923]  ath11k_pci_pm_suspend+0x1b/0x50 [ath11k_pci]
      [  474.407928]  pci_pm_suspend+0x7e/0x170
      [  474.407935]  ? pci_pm_freeze+0xc0/0xc0
      [  474.407939]  dpm_run_callback+0x4e/0x150
      [  474.407947]  __device_suspend+0x148/0x4c0
      [  474.407951]  async_suspend+0x20/0x90
      dmesg-efi-164255130401001:
      Oops#1 Part1
      [  474.407955]  async_run_entry_fn+0x33/0x120
      [  474.407959]  process_one_work+0x220/0x3f0
      [  474.407966]  worker_thread+0x4a/0x3d0
      [  474.407971]  kthread+0x17a/0x1a0
      [  474.407975]  ? process_one_work+0x3f0/0x3f0
      [  474.407979]  ? set_kthread_struct+0x40/0x40
      [  474.407983]  ret_from_fork+0x22/0x30
      [  474.407991]  </TASK>
      
      The issue here is that board file loading happens after ath11k_pci_probe()
      succesfully returns (ath11k initialisation happends asynchronously) and the
      suspend handler is still enabled, of course failing as ath11k is not properly
      initialised. Fix this by checking ATH11K_FLAG_QMI_FAIL during both suspend and
      resume.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
      Reported-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215504Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220127090117.2024-1-kvalo@kernel.org
      b4f4c564
    • Baochen Qiang's avatar
      ath11k: Fix missing rx_desc_get_ldpc_support in wcn6855_ops · 648ab472
      Baochen Qiang authored
      rx_desc_get_ldpc_support is missing in wcn6855_ops, resulting on WCN6855 a
      kernel crash after connecting to an AP and waiting for few minutes. Fix it by
      implementing WCN6855's version of this field and adding it to wcn6855_ops.
      
      Crash stack:
      [  184.862605] BUG: kernel NULL pointer dereference, address: 0000000000000000
      [  184.862615] #PF: supervisor instruction fetch in kernel mode
      [  184.862620] #PF: error_code(0x0010) - not-present page
      [  184.862626] PGD 0 P4D 0
      [  184.862634] Oops: 0010 [#1] PREEMPT SMP PTI
      [  184.862642] CPU: 1 PID: 0 Comm: swapper/1 Kdump: loaded Not tainted 5.16.0-wt-ath+ #1
      [  184.862651] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0059.2019.1112.1124 11/12/2019
      [  184.862656] RIP: 0010:0x0
      [  184.862669] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
      [  184.862673] RSP: 0018:ffff9eedc003cca8 EFLAGS: 00010202
      [  184.862680] RAX: 0000000000000000 RBX: ffff9eedc003cd30 RCX: 0000000000000002
      [  184.862686] RDX: 0000000000000002 RSI: ffffffffc1773458 RDI: ffff8eb5843de240
      [  184.862692] RBP: ffff8eb59685a0e0 R08: 0000000000000001 R09: ffff8eb6fef2b000
      [  184.862700] R10: ffff9eedc003cd70 R11: ffff8eb5880a9ff0 R12: ffff8eb5843de240
      [  184.862707] R13: 0000000000000000 R14: 0000000000000008 R15: 0000000000000003
      [  184.862714] FS:  0000000000000000(0000) GS:ffff8eb6f6c40000(0000) knlGS:0000000000000000
      [  184.862723] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  184.862733] CR2: ffffffffffffffd6 CR3: 000000002f60a001 CR4: 00000000003706e0
      [  184.862743] Call Trace:
      [  184.862751]  <IRQ>
      [  184.862759]  ath11k_dp_rx_h_ppdu+0x210/0x350 [ath11k]
      [  184.862841]  ath11k_dp_rx_process_received_packets+0x1e6/0x6b0 [ath11k]
      [  184.862891]  ath11k_dp_process_rx+0x32d/0x3e0 [ath11k]
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
      
      Fixes: b3febdcc ("ath11k: add LDPC FEC type in 802.11 radiotap header")
      Signed-off-by: default avatarBaochen Qiang <quic_bqiang@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220126010144.2090-1-quic_bqiang@quicinc.com
      648ab472
    • Anilkumar Kolli's avatar
      ath11k: Fix uninitialized symbol 'rx_buf_sz' · dca857f0
      Anilkumar Kolli authored
      Add missing else statement in ath11k_dp_rx_process_mon_status()
      to fix below smatch warnings,
          drivers/net/wireless/ath/ath11k/dp_rx.c:3105
          ath11k_dp_rx_process_mon_status()
          error: uninitialized symbol 'rx_buf_sz'.
      
      Fixes: ab18e3bc ("ath11k: Fix pktlog lite rx events")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAnilkumar Kolli <quic_akolli@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1642605793-13518-1-git-send-email-quic_akolli@quicinc.com
      dca857f0
    • Venkateswara Naralasetty's avatar
      ath11k: fix kernel panic during unload/load ath11k modules · 22b59cb9
      Venkateswara Naralasetty authored
      Call netif_napi_del() from ath11k_ahb_free_ext_irq() to fix
      the following kernel panic when unload/load ath11k modules
      for few iterations.
      
      [  971.201365] Unable to handle kernel paging request at virtual address 6d97a208
      [  971.204227] pgd = 594c2919
      [  971.211478] [6d97a208] *pgd=00000000
      [  971.214120] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      [  971.412024] CPU: 2 PID: 4435 Comm: insmod Not tainted 5.4.89 #0
      [  971.434256] Hardware name: Generic DT based system
      [  971.440165] PC is at napi_by_id+0x10/0x40
      [  971.445019] LR is at netif_napi_add+0x160/0x1dc
      
      [  971.743127] (napi_by_id) from [<807d89a0>] (netif_napi_add+0x160/0x1dc)
      [  971.751295] (netif_napi_add) from [<7f1209ac>] (ath11k_ahb_config_irq+0xf8/0x414 [ath11k_ahb])
      [  971.759164] (ath11k_ahb_config_irq [ath11k_ahb]) from [<7f12135c>] (ath11k_ahb_probe+0x40c/0x51c [ath11k_ahb])
      [  971.768567] (ath11k_ahb_probe [ath11k_ahb]) from [<80666864>] (platform_drv_probe+0x48/0x94)
      [  971.779670] (platform_drv_probe) from [<80664718>] (really_probe+0x1c8/0x450)
      [  971.789389] (really_probe) from [<80664cc4>] (driver_probe_device+0x15c/0x1b8)
      [  971.797547] (driver_probe_device) from [<80664f60>] (device_driver_attach+0x44/0x60)
      [  971.805795] (device_driver_attach) from [<806650a0>] (__driver_attach+0x124/0x140)
      [  971.814822] (__driver_attach) from [<80662adc>] (bus_for_each_dev+0x58/0xa4)
      [  971.823328] (bus_for_each_dev) from [<80663a2c>] (bus_add_driver+0xf0/0x1e8)
      [  971.831662] (bus_add_driver) from [<806658a4>] (driver_register+0xa8/0xf0)
      [  971.839822] (driver_register) from [<8030269c>] (do_one_initcall+0x78/0x1ac)
      [  971.847638] (do_one_initcall) from [<80392524>] (do_init_module+0x54/0x200)
      [  971.855968] (do_init_module) from [<803945b0>] (load_module+0x1e30/0x1ffc)
      [  971.864126] (load_module) from [<803948b0>] (sys_init_module+0x134/0x17c)
      [  971.871852] (sys_init_module) from [<80301000>] (ret_fast_syscall+0x0/0x50)
      
      Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1
      Signed-off-by: default avatarVenkateswara Naralasetty <quic_vnaralas@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1642583973-21599-1-git-send-email-quic_vnaralas@quicinc.com
      22b59cb9
    • Venkateswara Naralasetty's avatar
      ath11k: Rename ath11k_ahb_ext_irq_config · a76ed591
      Venkateswara Naralasetty authored
      Rename ath11k_ahb_ext_irq_config() to ath11k_ahb_config_ext_irq()
      for just symmetry with ath11k_ahb_free_ext_irq().
      Signed-off-by: default avatarVenkateswara Naralasetty <quic_vnaralas@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1642583893-21485-1-git-send-email-quic_vnaralas@quicinc.com
      a76ed591
  2. 28 Jan, 2022 25 commits
  3. 27 Jan, 2022 7 commits