1. 23 Apr, 2022 4 commits
  2. 12 Apr, 2022 4 commits
  3. 06 Apr, 2022 28 commits
  4. 05 Apr, 2022 4 commits
    • Johannes Berg's avatar
      net: ensure net_todo_list is processed quickly · 0b5c21bb
      Johannes Berg authored
      In [1], Will raised a potential issue that the cfg80211 code,
      which does (from a locking perspective)
      
        rtnl_lock()
        wiphy_lock()
        rtnl_unlock()
      
      might be suspectible to ABBA deadlocks, because rtnl_unlock()
      calls netdev_run_todo(), which might end up calling rtnl_lock()
      again, which could then deadlock (see the comment in the code
      added here for the scenario).
      
      Some back and forth and thinking ensued, but clearly this can't
      happen if the net_todo_list is empty at the rtnl_unlock() here.
      Clearly, the code here cannot actually put an entry on it, and
      all other users of rtnl_unlock() will empty it since that will
      always go through netdev_run_todo(), emptying the list.
      
      So the only other way to get there would be to add to the list
      and then unlock the RTNL without going through rtnl_unlock(),
      which is only possible through __rtnl_unlock(). However, this
      isn't exported and not used in many places, and none of them
      seem to be able to unregister before using it.
      
      Therefore, add a WARN_ON() in the code to ensure this invariant
      won't be broken, so that the cfg80211 (or any similar) code
      stays safe.
      
      [1] https://lore.kernel.org/r/Yjzpo3TfZxtKPMAG@google.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Link: https://lore.kernel.org/r/20220404113847.0ee02e4a70da.Ic73d206e217db20fd22dcec14fe5442ca732804b@changeidSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0b5c21bb
    • Tom Rix's avatar
      mlxsw: spectrum_router: simplify list unwinding · 6f2f36e5
      Tom Rix authored
      The setting of i here
      err_nexthop6_group_get:
      	i = nrt6;
      Is redundant, i is already nrt6.  So remove
      this statement.
      
      The for loop for the unwinding
      err_rt6_create:
      	for (i--; i >= 0; i--) {
      Is equivelent to
      	for (; i > 0; i--) {
      
      Two consecutive labels can be reduced to one.
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Link: https://lore.kernel.org/r/20220402121516.2750284-1-trix@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6f2f36e5
    • Nagarajan Maran's avatar
      ath11k: fix driver initialization failure with WoW unsupported hw · 633469e3
      Nagarajan Maran authored
      In the "ath11k_wow_init", error value "EINVAL" is returned
      when the check for firmware support of WoW feature fails,
      which in turn stops the driver initialization.
      
      Warning message:
      [   31.040144] ------------[ cut here ]------------
      [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
      [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
      [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W	5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
      [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
      [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
      [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
      [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
      [   31.097567] sp : ffff80000aa13c40
      [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
      [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
      [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
      [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
      [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
      [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
      [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
      [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
      [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
      [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
      [   31.170314] Call trace:
      [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
      [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
      [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
      [   31.190623]  process_one_work+0x134/0x350
      [   31.196262]  worker_thread+0x12c/0x450
      [   31.200340]  kthread+0xf4/0x110
      [   31.203986]  ret_from_fork+0x10/0x20
      [   31.207026] ---[ end trace 0000000000000000 ]---
      [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
      [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
      [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
      
      Fix this by returning value "0" when FW doesn't support WoW
      to allow driver to proceed with initialize sequence and also
      remove the unnecessary "WARN_ON".
      
      
      Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
      
      Fixes: ba9177fc ("ath11k: Add basic WoW functionalities")
      Signed-off-by: default avatarNagarajan Maran <quic_nmaran@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220331073110.3846-1-quic_nmaran@quicinc.com
      633469e3
    • Baochen Qiang's avatar
      ath11k: Remove unnecessary delay in ath11k_core_suspend · 2dd398de
      Baochen Qiang authored
      The intended delay in ath11k_core_suspend is introduced in commit
      d1b0c338 ("ath11k: implement suspend for QCA6390 PCI devices"),
      now with ath11k_mac_wait_tx_complete added in commit ba9177fc
      ("ath11k: Add basic WoW functionalities"), that delay is not
      necessary now, so remove it.
      
      This is found in code review.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-02431-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/20220331002105.1162099-1-quic_bqiang@quicinc.com
      2dd398de