1. 16 Dec, 2021 9 commits
  2. 15 Dec, 2021 1 commit
  3. 14 Dec, 2021 18 commits
  4. 13 Dec, 2021 7 commits
    • Loic Poulain's avatar
      brcmfmac: Fix incorrect type assignments for keep-alive · 3db30b79
      Loic Poulain authored
      cpu_to_le16 has been used for all keep-alive fields, but 'perdio_msec'
      is a 32-bit field and 'keep_alive_id' a 8-bit one. Fix that.
      
      Fixes: 7a6cfe28 ("brcmfmac: Configure keep-alive packet on suspend")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/1638953708-29192-1-git-send-email-loic.poulain@linaro.org
      3db30b79
    • Rameshkumar Sundaram's avatar
      ath11k: Fix deleting uninitialized kernel timer during fragment cache flush · ba53ee7f
      Rameshkumar Sundaram authored
      frag_timer will be created & initialized for stations when
      they associate and will be deleted during every key installation
      while flushing old fragments.
      
      For AP interface self peer will be created and Group keys
      will be installed for this peer, but there will be no real
      Station entry & hence frag_timer won't be created and
      initialized, deleting such uninitialized kernel timers causes below
      warnings and backtraces printed with CONFIG_DEBUG_OBJECTS_TIMERS
      enabled.
      
      [ 177.828008] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: 0x0
      [ 177.836833] WARNING: CPU: 3 PID: 188 at lib/debugobjects.c:508 debug_print_object+0xb0/0xf0
      [ 177.845185] Modules linked in: ath11k_pci ath11k qmi_helpers qrtr_mhi qrtr ns mhi
      [ 177.852679] CPU: 3 PID: 188 Comm: hostapd Not tainted 5.14.0-rc3-32919-g4034139e1838-dirty #14
      [ 177.865805] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
      [ 177.871804] pc : debug_print_object+0xb0/0xf0
      [ 177.876155] lr : debug_print_object+0xb0/0xf0
      [ 177.880505] sp : ffffffc01169b5a0
      [ 177.883810] x29: ffffffc01169b5a0 x28: ffffff80081c2320 x27: ffffff80081c4078
      [ 177.890942] x26: ffffff8003fe8f28 x25: ffffff8003de9890 x24: ffffffc01134d738
      [ 177.898075] x23: ffffffc010948f20 x22: ffffffc010b2d2e0 x21: ffffffc01169b628
      [ 177.905206] x20: ffffffc01134d700 x19: ffffffc010c80d98 x18: 00000000000003f6
      [ 177.912339] x17: 203a657079742074 x16: 63656a626f202930 x15: 0000000000000152
      [ 177.919471] x14: 0000000000000152 x13: 00000000ffffffea x12: ffffffc010d732e0
      [ 177.926603] x11: 0000000000000003 x10: ffffffc010d432a0 x9 : ffffffc010d432f8
      [ 177.933735] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 0000000000000001
      [ 177.940866] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000ffffffff
      [ 177.947997] x2 : ffffffc010c93240 x1 : ffffff80023624c0 x0 : 0000000000000054
      [ 177.955130] Call trace:
      [ 177.957567] debug_print_object+0xb0/0xf0
      [ 177.961570] debug_object_assert_init+0x124/0x178
      [ 177.966269] try_to_del_timer_sync+0x1c/0x70
      [ 177.970536] del_timer_sync+0x30/0x50
      [ 177.974192] ath11k_peer_frags_flush+0x34/0x68 [ath11k]
      [ 177.979439] ath11k_mac_op_set_key+0x1e4/0x338 [ath11k]
      [ 177.984673] ieee80211_key_enable_hw_accel+0xc8/0x3d0
      [ 177.989722] ieee80211_key_replace+0x360/0x740
      [ 177.994160] ieee80211_key_link+0x16c/0x210
      [ 177.998337] ieee80211_add_key+0x138/0x338
      [ 178.002426] nl80211_new_key+0xfc/0x258
      [ 178.006257] genl_family_rcv_msg_doit.isra.17+0xd8/0x120
      [ 178.011565] genl_rcv_msg+0xd8/0x1c8
      [ 178.015134] netlink_rcv_skb+0x38/0xf8
      [ 178.018877] genl_rcv+0x34/0x48
      [ 178.022012] netlink_unicast+0x174/0x230
      [ 178.025928] netlink_sendmsg+0x188/0x388
      [ 178.029845] ____sys_sendmsg+0x218/0x250
      [ 178.033763] ___sys_sendmsg+0x68/0x90
      [ 178.037418] __sys_sendmsg+0x44/0x88
      [ 178.040988] __arm64_sys_sendmsg+0x20/0x28
      [ 178.045077] invoke_syscall.constprop.5+0x54/0xe0
      [ 178.049776] do_el0_svc+0x74/0xc0
      [ 178.053084] el0_svc+0x10/0x18
      [ 178.056133] el0t_64_sync_handler+0x88/0xb0
      [ 178.060310] el0t_64_sync+0x148/0x14c
      [ 178.063966] ---[ end trace 8a5cf0bf9d34a058 ]---
      
      Add changes to not to delete frag timer for peers during
      group key installation.
      
      Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01092-QCAHKSWPL_SILICONZ-1
      
      Fixes: c3944a56 ("ath11k: Clear the fragment cache during key install")
      Signed-off-by: default avatarRameshkumar Sundaram <quic_ramess@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1639071421-25078-1-git-send-email-quic_ramess@quicinc.com
      ba53ee7f
    • Baochen Qiang's avatar
      ath11k: Avoid false DEADLOCK warning reported by lockdep · 767c94ca
      Baochen Qiang authored
      With CONFIG_LOCKDEP=y and CONFIG_DEBUG_SPINLOCK=y, lockdep reports
      below warning:
      
      [  166.059415] ============================================
      [  166.059416] WARNING: possible recursive locking detected
      [  166.059418] 5.15.0-wt-ath+ #10 Tainted: G        W  O
      [  166.059420] --------------------------------------------
      [  166.059421] kworker/0:2/116 is trying to acquire lock:
      [  166.059423] ffff9905f2083160 (&srng->lock){+.-.}-{2:2}, at: ath11k_hal_reo_cmd_send+0x20/0x490 [ath11k]
      [  166.059440]
                     but task is already holding lock:
      [  166.059442] ffff9905f2083230 (&srng->lock){+.-.}-{2:2}, at: ath11k_dp_process_reo_status+0x95/0x2d0 [ath11k]
      [  166.059491]
                     other info that might help us debug this:
      [  166.059492]  Possible unsafe locking scenario:
      
      [  166.059493]        CPU0
      [  166.059494]        ----
      [  166.059495]   lock(&srng->lock);
      [  166.059498]   lock(&srng->lock);
      [  166.059500]
                      *** DEADLOCK ***
      
      [  166.059501]  May be due to missing lock nesting notation
      
      [  166.059502] 3 locks held by kworker/0:2/116:
      [  166.059504]  #0: ffff9905c0081548 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1f6/0x660
      [  166.059511]  #1: ffff9d2400a5fe68 ((debug_obj_work).work){+.+.}-{0:0}, at: process_one_work+0x1f6/0x660
      [  166.059517]  #2: ffff9905f2083230 (&srng->lock){+.-.}-{2:2}, at: ath11k_dp_process_reo_status+0x95/0x2d0 [ath11k]
      [  166.059532]
                     stack backtrace:
      [  166.059534] CPU: 0 PID: 116 Comm: kworker/0:2 Kdump: loaded Tainted: G        W  O      5.15.0-wt-ath+ #10
      [  166.059537] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0059.2019.1112.1124 11/12/2019
      [  166.059539] Workqueue: events free_obj_work
      [  166.059543] Call Trace:
      [  166.059545]  <IRQ>
      [  166.059547]  dump_stack_lvl+0x56/0x7b
      [  166.059552]  __lock_acquire+0xb9a/0x1a50
      [  166.059556]  lock_acquire+0x1e2/0x330
      [  166.059560]  ? ath11k_hal_reo_cmd_send+0x20/0x490 [ath11k]
      [  166.059571]  _raw_spin_lock_bh+0x33/0x70
      [  166.059574]  ? ath11k_hal_reo_cmd_send+0x20/0x490 [ath11k]
      [  166.059584]  ath11k_hal_reo_cmd_send+0x20/0x490 [ath11k]
      [  166.059594]  ath11k_dp_tx_send_reo_cmd+0x3f/0x130 [ath11k]
      [  166.059605]  ath11k_dp_rx_tid_del_func+0x221/0x370 [ath11k]
      [  166.059618]  ath11k_dp_process_reo_status+0x22f/0x2d0 [ath11k]
      [  166.059632]  ? ath11k_dp_service_srng+0x2ea/0x2f0 [ath11k]
      [  166.059643]  ath11k_dp_service_srng+0x2ea/0x2f0 [ath11k]
      [  166.059655]  ath11k_pci_ext_grp_napi_poll+0x1c/0x70 [ath11k_pci]
      [  166.059659]  __napi_poll+0x28/0x230
      [  166.059664]  net_rx_action+0x285/0x310
      [  166.059668]  __do_softirq+0xe6/0x4d2
      [  166.059672]  irq_exit_rcu+0xd2/0xf0
      [  166.059675]  common_interrupt+0xa5/0xc0
      [  166.059678]  </IRQ>
      [  166.059679]  <TASK>
      [  166.059680]  asm_common_interrupt+0x1e/0x40
      [  166.059683] RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70
      [  166.059686] Code: 83 c7 18 e8 2a 95 43 ff 48 89 ef e8 22 d2 43 ff 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 <e8> 63 2e 40 ff 65 8b 05 8c 59 97 5c 85 c0 74 0a 5b 5d c3 e8 00 6a
      [  166.059689] RSP: 0018:ffff9d2400a5fca0 EFLAGS: 00000206
      [  166.059692] RAX: 0000000000000002 RBX: 0000000000000200 RCX: 0000000000000006
      [  166.059694] RDX: 0000000000000000 RSI: ffffffffa404879b RDI: 0000000000000001
      [  166.059696] RBP: ffff9905c0053000 R08: 0000000000000001 R09: 0000000000000001
      [  166.059698] R10: ffff9d2400a5fc50 R11: 0000000000000001 R12: ffffe186c41e2840
      [  166.059700] R13: 0000000000000001 R14: ffff9905c78a1c68 R15: 0000000000000001
      [  166.059704]  free_debug_processing+0x257/0x3d0
      [  166.059708]  ? free_obj_work+0x1f5/0x250
      [  166.059712]  __slab_free+0x374/0x5a0
      [  166.059718]  ? kmem_cache_free+0x2e1/0x370
      [  166.059721]  ? free_obj_work+0x1f5/0x250
      [  166.059724]  kmem_cache_free+0x2e1/0x370
      [  166.059727]  free_obj_work+0x1f5/0x250
      [  166.059731]  process_one_work+0x28b/0x660
      [  166.059735]  ? process_one_work+0x660/0x660
      [  166.059738]  worker_thread+0x37/0x390
      [  166.059741]  ? process_one_work+0x660/0x660
      [  166.059743]  kthread+0x176/0x1a0
      [  166.059746]  ? set_kthread_struct+0x40/0x40
      [  166.059749]  ret_from_fork+0x22/0x30
      [  166.059754]  </TASK>
      
      Since these two lockes are both initialized in ath11k_hal_srng_setup,
      they are assigned with the same key. As a result lockdep suspects that
      the task is trying to acquire the same lock (due to same key) while
      already holding it, and thus reports the DEADLOCK warning. However as
      they are different spinlock instances, the warning is false positive.
      
      On the other hand, even no dead lock indeed, this is a major issue for
      upstream regression testing as it disables lockdep functionality.
      
      Fix it by assigning separate lock class key for each srng->lock.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
      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/20211209011949.151472-1-quic_bqiang@quicinc.com
      767c94ca
    • Carl Huang's avatar
      ath11k: set DTIM policy to stick mode for station interface · 55e18e5a
      Carl Huang authored
      Set DTIM policy to DTIM stick mode, so station follows AP DTIM
      interval rather than listen interval which is set in peer assoc cmd.
      DTIM stick mode is more preferred per firmware team request.
      
      Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
      Signed-off-by: default avatarCarl Huang <quic_cjhuang@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1638948694-15582-1-git-send-email-quic_cjhuang@quicinc.com
      55e18e5a
    • Carl Huang's avatar
      ath11k: support MAC address randomization in scan · 9cbd7fc9
      Carl Huang authored
      The driver reports NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR capability
      to upper layer based on the service bit firmware reported. Driver
      sets the spoofed flag in scan_ctrl_flag to firmware if upper layer
      has enabled this feature in scan request.
      
      Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
      Signed-off-by: default avatarCarl Huang <quic_cjhuang@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/1638948007-9609-1-git-send-email-quic_cjhuang@quicinc.com
      9cbd7fc9
    • Kalle Valo's avatar
      ath10k: wmi: remove array of flexible structures · 5341d57b
      Kalle Valo authored
      I updated to sparse v0.6.4 and it warns:
      
      drivers/net/wireless/ath/ath10k/wmi.c: note: in included file (through drivers/net/wireless/ath/ath10k/core.h):
      drivers/net/wireless/ath/ath10k/wmi.h:3481:34: warning: array of flexible structures
      
      Fix it by changing the type to u8 array, in struct wmi_phyerr_hdr_arg it's
      stored as a void pointer anyway.
      
      Compile tested only.
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20211209091545.6098-2-kvalo@kernel.org
      5341d57b
    • Kalle Valo's avatar
      ath10k: htt: remove array of flexible structures · 56789eef
      Kalle Valo authored
      I updated to sparse v0.6.4 and it warns:
      
      drivers/net/wireless/ath/ath10k/hw.c: note: in included file (through drivers/net/wireless/ath/ath10k/core.h):
      drivers/net/wireless/ath/ath10k/htt.h:1503:41: warning: array of flexible structures
      drivers/net/wireless/ath/ath10k/htt_rx.c: note: in included file (through drivers/net/wireless/ath/ath10k/core.h):
      drivers/net/wireless/ath/ath10k/htt.h:1503:41: warning: array of flexible structures
      
      The structure is unused in ath10k so let's just remove it.
      
      Compile tested only.
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20211209091545.6098-1-kvalo@kernel.org
      56789eef
  5. 09 Dec, 2021 5 commits