1. 28 Sep, 2022 1 commit
    • Aditya Kumar Singh's avatar
      wifi: ath11k: stop tx queues immediately upon firmware exit · 81e60b2d
      Aditya Kumar Singh authored
      Currently, recovery flag is set immediately upon firmware
      exit but tx queues are stopped once firmware arrives back
      and is ready which is during ath11k_core_restart. Once
      ieee80211 hw restart is completed, tx queues are resumed.
      If during the time delta between firmware exit and firmware
      ready, mac80211 send packets, currently ath11k will drop it
      since recovery flag will be set. But warning prints will
      come -
        "ath11k c000000.wifi: failed to transmit frame -108"
      
      If more tx packets are there, this could lead to flooding
      of above print.
      
      However, actually tx queues should be stopped immediately
      when firmware leaves. This will prevent packets to get
      dropped when firmware is recovering.
      
      Add fix to stop tx queues immediately after firmware exit.
      
      Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
      Signed-off-by: default avatarAditya Kumar Singh <quic_adisi@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
      81e60b2d
  2. 27 Sep, 2022 6 commits
  3. 26 Sep, 2022 4 commits
    • Baochen Qiang's avatar
      wifi: ath11k: Fix deadlock during WoWLAN suspend · d78c8b71
      Baochen Qiang authored
      We are seeing system hangs during WoWLAN suspend, and get below
      two stacks:
      
      Stack1:
      [ffffb02cc1557b20] __schedule at ffffffff8bb10860
      [ffffb02cc1557ba8] schedule at ffffffff8bb10f24
      [ffffb02cc1557bb8] schedule_timeout at ffffffff8bb16d88
      [ffffb02cc1557c30] wait_for_completion at ffffffff8bb11778
      [ffffb02cc1557c78] __flush_work at ffffffff8b0b30cd
      [ffffb02cc1557cf0] __cancel_work_timer at ffffffff8b0b33ad
      [ffffb02cc1557d60] ath11k_mac_drain_tx at ffffffffc0c1f0ca [ath11k]
      [ffffb02cc1557d70] ath11k_wow_op_suspend at ffffffffc0c5201e [ath11k]
      [ffffb02cc1557da8] __ieee80211_suspend at ffffffffc11e2bd3 [mac80211]
      [ffffb02cc1557dd8] wiphy_suspend at ffffffffc0f901ac [cfg80211]
      [ffffb02cc1557e08] dpm_run_callback at ffffffff8b75118a
      [ffffb02cc1557e38] __device_suspend at ffffffff8b751630
      [ffffb02cc1557e70] async_suspend at ffffffff8b7519ea
      [ffffb02cc1557e88] async_run_entry_fn at ffffffff8b0bf4ce
      [ffffb02cc1557ea8] process_one_work at ffffffff8b0b1a24
      [ffffb02cc1557ee0] worker_thread at ffffffff8b0b1c4a
      [ffffb02cc1557f18] kthread at ffffffff8b0b9cb8
      [ffffb02cc1557f50] ret_from_fork at ffffffff8b001d32
      
      Stack2:
      [ffffb02cc00b7d18] __schedule at ffffffff8bb10860
      [ffffb02cc00b7da0] schedule at ffffffff8bb10f24
      [ffffb02cc00b7db0] schedule_preempt_disabled at ffffffff8bb112b4
      [ffffb02cc00b7db8] __mutex_lock at ffffffff8bb127ea
      [ffffb02cc00b7e38] ath11k_mgmt_over_wmi_tx_work at ffffffffc0c1aa44 [ath11k]
      [ffffb02cc00b7ea8] process_one_work at ffffffff8b0b1a24
      [ffffb02cc00b7ee0] worker_thread at ffffffff8b0b1c4a
      [ffffb02cc00b7f18] kthread at ffffffff8b0b9cb8
      [ffffb02cc00b7f50] ret_from_fork at ffffffff8b001d32
      
      From the first stack, ath11k_mac_drain_tx calls
      cancel_work_sync(&ar->wmi_mgmt_tx_work) and waits all packets to be sent
      out or dropped. However, we find from Stack2 that this work item is blocked
      because ar->conf_mutex is already held by ath11k_wow_op_suspend.
      
      Fix this issue by moving ath11k_mac_wait_tx_complete to the start of
      ath11k_wow_op_suspend where ar->conf_mutex has not been acquired. And
      this change also makes the logic in ath11k_wow_op_suspend match the
      logic in ath11k_mac_op_start and ath11k_mac_op_stop.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
      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/20220919021435.2459-1-quic_bqiang@quicinc.com
      d78c8b71
    • Baochen Qiang's avatar
      wifi: ath11k: Remove redundant ath11k_mac_drain_tx · d50ebec1
      Baochen Qiang authored
      ath11k_mac_drain_tx is already called in ath11k_mac_wait_tx_complete, no need to call it again. So remove it.
      
      This is found in code review.
      
      Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
      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/20220919020259.1746-1-quic_bqiang@quicinc.com
      d50ebec1
    • Tamizh Chelvam Raja's avatar
      wifi: ath11k: Add spectral scan support for 160 MHz · c92f774a
      Tamizh Chelvam Raja authored
      There are two types of 160 MHz spectral scan support mentioned below
      
      1. Fragmented approach
      2. Single event approach
      
      In this fragmented approach, single 160 MHz will be split as two
      80 MHz buffer. First fft sample buffer will contain spectral scan
      result of primary 80 MHz and the second fft sample buffer will contain
      secondary 80 MHz and here cfreq1 and cfreq2 will be mentioned.
      In case of 160 MHz on 36th channel will contain cfreq1 as 5210 and
      cfreq2 as 5290. Chipsets which support this approach are IPQ8074/IPQ6018.
      
      Replacing freq1 with freq2 in every secondary sepctral scan event to
      distinguish between two different 80 MHz spectral event data.
      
      In the 2nd approach each fft sample buffer will contain spectral scan
      result for whole 160 MHz by mentioning cfreq1 as 5250 which is center
      frequency of whole 160 MHz. Chipset which support this approach is QCN9074.
      
      Host will receive spectral event from target for every 5 fft samples.
      
      Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01120-QCAHKSWPL-1
      Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01120-QCAHKSWP
      Signed-off-by: default avatarTamizh Chelvam Raja <quic_tamizhr@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220725055001.15194-1-quic_tamizhr@quicinc.com
      c92f774a
    • Venkateswara Naralasetty's avatar
      wifi: ath11k: Add support to get power save duration for each client · 710a95f9
      Venkateswara Naralasetty authored
      Add support to get the following power save information through debugfs interface,
      
       * Current ps state of the peer
       * Time duration since the peer is in power save
       * Total duration of the peer spent in power save
      
      Above information is helpful in debugging the issues with power save clients.
      
      This patch also add trace log support for PS timekeeper to track the PS state
      change of the peers alongs with the peer MAC address and timestamp.
      
      Use the below commands to get the above power save information,
      
      To know the time_since_station_in_power_save:
      cat /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/
      XX:XX:XX:XX:XX:XX/current_ps_duration
      
      To know power_save_duration:
      cat /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/
      XX:XX:XX:XX:XX:XX/total_ps_duration
      
      To reset the power_save_duration of all stations connected to AP:
      echo 1 > /sys/kernel/debug/ieee80211/phyX/ath11k/reset_ps_duration
      
      To enable/disable the ps_timekeeper:
      echo Y > /sys/kernel/debug/ieee80211/phyX/ath11k/ps_timekeeper_enable
      Y = 1 to enable and Y = 0 to disable.
      
      To record PS timekeeer logs after enabling ps_timekeeper:
      trace-cmd record -e ath11k_ps_timekeeper
      
      Tested-on: Tested-on: IPQ8074 WLAN.HK.2.5.0.1-00991-QCAHKSWPL_SILICONZ-1
      Signed-off-by: default avatarVenkateswara Naralasetty <quic_vnaralas@quicinc.com>
      Signed-off-by: default avatarTamizh Chelvam Raja <quic_tamizhr@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://lore.kernel.org/r/20220725054601.14719-1-quic_tamizhr@quicinc.com
      710a95f9
  4. 24 Sep, 2022 24 commits
  5. 22 Sep, 2022 5 commits