1. 01 Jul, 2024 7 commits
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Support TQM stats · 5344fc76
      Dinesh Karthikeyan authored
      Add support to request pdev TQM stats from firmware through HTT stats
      type 6. This stat type gives information such as TQM error, MPDU
      related information and TQM pdev stats.
      
      Sample output:
      -------------
      echo 6 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
      cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
      
      HTT_TX_TQM_ERROR_STATS_TLV:
      q_empty_failure = 0
      q_not_empty_failure = 0
      add_msdu_failure = 0
      
      TQM_ERROR_RESET_STATS:
      tqm_cache_ctl_err = 0
      tqm_soft_reset = 0
      tqm_reset_total_num_in_use_link_descs = 0
      .....
      
      HTT_TX_TQM_GEN_MPDU_STATS_TLV:
      gen_mpdu_end_reason =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0,
      10:0, 11:0, 12:0, 13:0, 14:0, 15:0, 16:0
      
      HTT_TX_TQM_LIST_MPDU_STATS_TLV:
      list_mpdu_end_reason =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0,
      10:0, 11:0, 12:0
      
      HTT_TX_TQM_LIST_MPDU_CNT_TLV_V:
      list_mpdu_cnt_hist =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      
      HTT_TX_TQM_PDEV_STATS_TLV_V:
      msdu_count = 0
      mpdu_count = 0
      remove_msdu = 0
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Signed-off-by: default avatarRoopni Devanathan <quic_rdevanat@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240625042217.1303332-4-quic_rdevanat@quicinc.com
      5344fc76
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Support pdev error stats · cf1187b3
      Dinesh Karthikeyan authored
      Add support to request pdev error stats from firmware through HTT stats
      type 5. This stats type gives information such as list of pdev errors,
      reasons for reset, logging information about recovery, drain and war
      stats. etc.
      
      Sample output:
      -------------
      echo 5 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
      cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
      
      HTT_HW_STATS_PDEV_ERRS_TLV:
      mac_id = 0
      tx_abort = 0
      tx_abort_fail_count = 0
      rx_abort = 53
      .....
      
      PDEV_PHY_WARM_RESET_REASONS:
      phy_warm_reset_reason_phy_m3 = 0
      phy_warm_reset_reason_tx_hw_stuck = 0
      phy_warm_reset_reason_num_cca_rx_frame_stuck = 0
      .....
      
      WAL_RX_RECOVERY_STATS:
      wal_rx_recovery_rst_mac_hang_count = 0
      wal_rx_recovery_rst_known_sig_count = 0
      wal_rx_recovery_rst_no_rx_count = 0
      .....
      
      HTT_RX_DEST_DRAIN_STATS:
      rx_dest_drain_rx_descs_leak_prevention_done = 0
      rx_dest_drain_rx_descs_saved_cnt = 0
      rx_dest_drain_rxdma2reo_leak_detected = 0
      .....
      
      HTT_HW_STATS_INTR_MISC_TLV:
      hw_intr_name = AMPI
      mask = 0
      count = 2
      
      HTT_HW_STATS_WHAL_TX_TLV:
      mac_id = 0
      last_unpause_ppdu_id = 0
      hwsch_unpause_wait_tqm_write = 0
      .....
      
      HTT_HW_WAR_STATS_TLV:
      mac_id = 0
      hw_war 0 = 0
      hw_war 1 = 0
      .....
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Signed-off-by: default avatarRoopni Devanathan <quic_rdevanat@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240625042217.1303332-3-quic_rdevanat@quicinc.com
      cf1187b3
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Support Transmit Scheduler stats · 4b6dfc75
      Dinesh Karthikeyan authored
      Add support to request transmission scheduler stats from firmware through
      HTT stats type 4. This stat gives information such as pdev stats
      scheduled per transmission queue, transmission queue command posted and
      reaped, scheduler order, scheduler ineligibility and supercycle triggers.
      
      Sample output:
      -------------
      echo 4 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
      cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
      HTT_STATS_TX_SCHED_CMN_TLV:
      mac_id = 0
      current_timestamp = 952546828
      
      HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TLV:
      mac_id = 0
      txq_id = 14
      sched_policy = 2
      .....
      
      HTT_SCHED_TXQ_CMD_POSTED_TLV:
      sched_cmd_posted =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0,
      10:0, 11:0, 12:0
      
      HTT_SCHED_TXQ_CMD_REAPED_TLV:
      sched_cmd_reaped =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0,
      10:0, 11:0, 12:0
      
      HTT_SCHED_TXQ_SCHED_ORDER_SU_TLV:
      sched_order_su =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0, 10:0,
      11:0, 12:0, 13:0, 14:0, 15:0, 16:0, 17:0, 18:0, 19:0
      
      HTT_SCHED_TXQ_SCHED_INELIGIBILITY:
      sched_ineligibility =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0,
      10:0, 11:0, 12:0, 13:0, 14:0, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0,
      22:0, 23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0,
      34:0, 35:0
      
      HTT_SCHED_TXQ_SUPERCYCLE_TRIGGER:
      supercycle_triggers =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Signed-off-by: default avatarRoopni Devanathan <quic_rdevanat@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240625042217.1303332-2-quic_rdevanat@quicinc.com
      4b6dfc75
    • Ramya Gnanasekar's avatar
      wifi: ath12k: Dump additional Tx PDEV HTT stats · a9f2976f
      Ramya Gnanasekar authored
      Support to dump additional Tx PDEV stats through HTT stats debugfs.
      Following stats dump are supported:
              1. PDEV control path stat to dump Tx management frame count
              2. Tx PDEV SIFS histogram stats
              3. Tx MU MIMO PPDU stats for 802.11ac, 802.11ax and 802.11be
      
      Sample Output:
      ---------------
      echo 1 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
      cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
      
      HTT_TX_PDEV_STATS_CMN_TLV:
      mac_id = 0
      comp_delivered = 0
      self_triggers = 13
      ......
      ......
      HTT_TX_PDEV_STATS_CTRL_PATH_TX_STATS:
      fw_tx_mgmt_subtype =  0:1, 1:0, 2:0, 3:0, 4:38, 5:0, 6:0, 7:0, 8:0, 9:0, 10:0, 11:1, 12:0, 13:7, 14:0, 15:0
      
      HTT_TX_PDEV_STATS_SIFS_HIST_TLV:
      sifs_hist_status =  0:237, 1:185, 2:1, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      
      HTT_TX_PDEV_AC_MU_PPDU_DISTRIBUTION_STATS:
      ac_mu_mimo_num_seq_posted_nr4 = 0
      ac_mu_mimo_num_ppdu_posted_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ac_mu_mimo_num_ppdu_completed_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ac_mu_mimo_num_seq_term_status_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      ac_mu_mimo_num_seq_posted_nr8 = 0
      ac_mu_mimo_num_ppdu_posted_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ac_mu_mimo_num_ppdu_completed_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ac_mu_mimo_num_seq_term_status_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      HTT_TX_PDEV_AX_MU_PPDU_DISTRIBUTION_STATS:
      ax_mu_mimo_num_seq_posted_nr4 = 0
      ax_mu_mimo_num_ppdu_posted_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ax_mu_mimo_num_ppdu_completed_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ax_mu_mimo_num_seq_term_status_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      ax_mu_mimo_num_seq_posted_nr8 = 0
      ax_mu_mimo_num_ppdu_posted_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ax_mu_mimo_num_ppdu_completed_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      ax_mu_mimo_num_seq_term_status_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      HTT_TX_PDEV_BE_MU_PPDU_DISTRIBUTION_STATS:
      be_mu_mimo_num_seq_posted_nr4 = 0
      be_mu_mimo_num_ppdu_posted_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      be_mu_mimo_num_ppdu_completed_per_burst_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      be_mu_mimo_num_seq_term_status_nr4 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      be_mu_mimo_num_seq_posted_nr8 = 0
      be_mu_mimo_num_ppdu_posted_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      be_mu_mimo_num_ppdu_completed_per_burst_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0
      be_mu_mimo_num_seq_term_status_nr8 =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
      Signed-off-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240626085854.2500681-5-quic_rgnanase@quicinc.com
      a9f2976f
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Add support to parse requested stats_type · adf6df96
      Dinesh Karthikeyan authored
      Add extended htt stats parser and print the corresponding TLVs associated
      with the requested htt_stats_type.
      Add support for TX PDEV related htt stats.
      
      Sample output:
      --------------
      echo 1 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
      cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
      
      HTT_TX_PDEV_STATS_CMN_TLV:
      mac_id = 0
      comp_delivered = 0
      self_triggers = 256
      hw_queued = 275
      hw_reaped = 275
      underrun = 241
      hw_paused = 0
      hw_flush = 0
      hw_filt = 1
      tx_abort = 0
      ppdu_ok = 246
      mpdu_requeued = 0
      tx_xretry = 0
      data_rc = 3
      mpdu_dropped_xretry = 0
      illegal_rate_phy_err = 0
      cont_xretry = 0
      tx_timeout = 0
      tx_time_dur_data = 0
      pdev_resets = 0
      phy_underrun = 0
      txop_ovf = 0
      seq_posted = 247
      seq_failed_queueing = 0
      seq_completed = 247
      seq_restarted = 0
      seq_txop_repost_stop = 0
      next_seq_cancel = 0
      dl_mu_mimo_seq_posted = 0
      dl_mu_ofdma_seq_posted = 0
      ul_mu_mimo_seq_posted = 0
      ul_mu_ofdma_seq_posted = 0
      mu_mimo_peer_blacklisted = 0
      seq_qdepth_repost_stop = 0
      seq_min_msdu_repost_stop = 0
      mu_seq_min_msdu_repost_stop = 0
      seq_switch_hw_paused = 0
      next_seq_posted_dsr = 0
      seq_posted_isr = 0
      seq_ctrl_cached = 0
      mpdu_count_tqm = 0
      msdu_count_tqm = 0
      mpdu_removed_tqm = 0
      msdu_removed_tqm = 0
      remove_mpdus_max_retries = 0
      mpdus_sw_flush = 0
      mpdus_hw_filter = 0
      mpdus_truncated = 0
      mpdus_ack_failed = 0
      mpdus_expired = 0
      mpdus_seq_hw_retry = 0
      ack_tlv_proc = 0
      coex_abort_mpdu_cnt_valid = 0
      coex_abort_mpdu_cnt = 5
      num_total_ppdus_tried_ota = 5
      num_data_ppdus_tried_ota = 0
      local_ctrl_mgmt_enqued = 247
      local_ctrl_mgmt_freed = 247
      local_data_enqued = 0
      local_data_freed = 0
      mpdu_tried = 0
      isr_wait_seq_posted = 0
      tx_active_dur_us_low = 0
      tx_active_dur_us_high = 0
      fes_offsets_err_cnt = 0
      
      HTT_TX_PDEV_STATS_URRN_TLV:
      urrn_stats =  0:0, 1:241, 2:0
      
      HTT_TX_PDEV_STATS_SIFS_TLV:
      sifs_status =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0
      
      HTT_TX_PDEV_STATS_FLUSH_TLV:
      flush_errs =  0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0, 10:0,
      11:0, 12:0, 13:0, 14:0, 15:0, 16:0, 17:0, 18:0, 19:0, 20:0, 21:0, 22:0,
      23:0, 24:0, 25:0, 26:0, 27:0, 28:0, 29:0, 30:0, 31:0, 32:0, 33:0, 34:0,
      35:0, 36:0, 37:0, 38:0, 39:0, 40:0, 41:0, 42:0, 43:0, 44:0, 45:0, 46:0,
      47:0, 48:0, 49:0, 50:0, 51:0, 52:0, 53:0, 54:0, 55:0, 56:0, 57:0, 58:0,
      59:0, 60:0, 61:0, 62:0, 63:0, 64:0, 65:0, 66:0, 67:0, 68:0, 69:0, 70:0,
      71:0, 72:0, 73:0, 74:0, 75:0, 76:0, 77:0, 78:0, 79:0, 80:0, 81:0, 82:0,
      83:0, 84:0, 85:0, 86:0, 87:0, 88:0, 89:0, 90:0, 91:0, 92:0, 93:0, 94:0,
      95:0, 96:0, 97:0, 98:0, 99:0, 100:0, 101:0, 102:0, 103:0, 104:0, 105:0,
      106:0, 107:0, 108:0, 109:0, 110:0, 111:0, 112:0, 113:0, 114:0, 115:0,
      116:0, 117:0, 118:0, 119:0, 120:0, 121:0, 122:0, 123:0, 124:0, 125:0,
      126:0, 127:0
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Co-developed-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Signed-off-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240626085854.2500681-4-quic_rgnanase@quicinc.com
      adf6df96
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Add htt_stats_dump file ops support · ad201b35
      Dinesh Karthikeyan authored
      Add dump_htt_stats file operation to dump the stats value requested
      for the requested stats_type.
      Stats sent from firmware will be cumulative. Hence add debugfs to reset
      the requested stats type.
      
      Example with one ath12k device:
      
      ath12k
      `-- pci-0000:06:00.0
          |-- mac0
              `-- htt_stats
              |-- htt_stats_type
              |-- htt_stats_reset
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Co-developed-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Signed-off-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240626085854.2500681-3-quic_rgnanase@quicinc.com
      ad201b35
    • Dinesh Karthikeyan's avatar
      wifi: ath12k: Add support to enable debugfs_htt_stats · 3f73c24f
      Dinesh Karthikeyan authored
      Create debugfs_htt_stats file when ath12k debugfs support is enabled.
      Add basic ath12k_debugfs_htt_stats_register and handle htt_stats_type
      file operations.
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
      Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
      Co-developed-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Signed-off-by: default avatarRamya Gnanasekar <quic_rgnanase@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://patch.msgid.link/20240626085854.2500681-2-quic_rgnanase@quicinc.com
      3f73c24f
  2. 27 Jun, 2024 1 commit
  3. 26 Jun, 2024 2 commits
  4. 24 Jun, 2024 8 commits
  5. 19 Jun, 2024 7 commits
  6. 17 Jun, 2024 4 commits
    • Harshitha Prem's avatar
      wifi: ath12k: Remove unused ath12k_base from ath12k_hw · 4f15b06e
      Harshitha Prem authored
      Currently, device (ab) reference in hardware abstraction (ah)
      is not used anywhere. Also, with multiple device group abstraction,
      hardware abstraction would be coupled with device group abstraction
      rather than single device.
      
      Hence, remove the ab reference from hardware abstraction.
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Signed-off-by: default avatarHarshitha Prem <quic_hprem@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://msgid.link/20240529060939.4156281-1-quic_hprem@quicinc.com
      4f15b06e
    • Aaradhana Sahu's avatar
      wifi: ath12k: Fix WARN_ON during firmware crash in split-phy · 670d4949
      Aaradhana Sahu authored
      Whenever firmware is crashed in split-phy below WARN_ON() triggered:
      
      WARNING: CPU: 3 PID: 82 at net/mac80211/driver-ops.c:41 drv_stop+0xac/0xbc
      Modules linked in: ath12k qmi_helpers
      CPU: 3 PID: 82 Comm: kworker/3:2 Tainted: G      D W          6.9.0-next-20240520-00113-gd981a3784e15 #39
      Hardware name: Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C9 (DT)
      Workqueue: events_freezable ieee80211_restart_work
      pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      pc : drv_stop+0xac/0xbc
      lr : ieee80211_stop_device+0x54/0x64
      sp : ffff8000848dbb20
      x29: ffff8000848dbb20 x28: 0000000000000790 x27: ffff000014d78900
      x26: ffff000014d791f8 x25: ffff000007f0d9b0 x24: 0000000000000018
      x23: 0000000000000001 x22: 0000000000000000 x21: ffff000014d78e10
      x20: ffff800081dc0000 x19: ffff000014d78900 x18: ffffffffffffffff
      x17: ffff7fffbca84000 x16: ffff800083fe0000 x15: ffff800081dc0b48
      x14: 0000000000000076 x13: 0000000000000076 x12: 0000000000000001
      x11: 0000000000000000 x10: 0000000000000a60 x9 : ffff8000848db980
      x8 : ffff000000dddfc0 x7 : 0000000000000400 x6 : ffff800083b012d8
      x5 : ffff800083b012d8 x4 : 0000000000000000 x3 : ffff000014d78398
      x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000014d78900
      Call trace:
       drv_stop+0xac/0xbc
       ieee80211_stop_device+0x54/0x64
       ieee80211_do_stop+0x5a0/0x790
       ieee80211_stop+0x4c/0x178
       __dev_close_many+0xb0/0x150
       dev_close_many+0x88/0x130
       dev_close.part.171+0x44/0x74
       dev_close+0x1c/0x28
       cfg80211_shutdown_all_interfaces+0x44/0xfc
       ieee80211_restart_work+0xfc/0x14c
       process_scheduled_works+0x18c/0x2dc
       worker_thread+0x13c/0x314
       kthread+0x118/0x124
       ret_from_fork+0x10/0x20
      ---[ end trace 0000000000000000 ]---
      
      The warning in question is from drv_stop():
      
      	if (WARN_ON(!local->started))
      		return;
      
      The sequence of WARN_ON() is:
      Thread 1:
      -Firmware crash calls ath12k_core_reset().
      -Call ieee80211_restart_hw() inside
       ath12k_core_post_reconfigure_recovery() which schedules worker
       for both hardware.
      -Wait for completion of ab->recovery_start.
      
      Thread 2 (worker thread):
      -One hardware acquires rtnl_lock() inside ieee80211_restart_hw() and
       calls ath12k_mac_wait_reconfigure() into ath12k_mac_op_start().
      -Hardware is waiting for ab->reconfigure_complete but at this time
       recovery_start_count value is 1 because another worker thread
       (local->restart_work) is still waiting for rtnl_lock().
       recovery_start_count is not equal to number of radios
       (2 in split-phy). So ab->recovery_start complete does not set
       due to this, thread 1 is still waiting and not able to perform
       hif power down up and firmware reload.
      -Wait timeout happens for ab->reconfigure_complete and comeback
       to caller (ath12k_mac_op_start()) and sends WMI command to
       crashed firmware and gets error.
      -This returns error to drv_start() and local->started is set to false.
      -Hardware calls cfg80211_shutdown_all_interfaces() after receiving error
       inside ieee80211_restart_work() and goes to drv_stop(), here we trigger
       WARN_ON as local->started is false.
      
      To fix this issue call ieee80211_restart_hw() after firmware has been
      reloaded. Now, each hardware can send WMI command to firmware
      successfully. With this fix we don't need to wait for
      ab->recovery_start completion so remove
      ath12k_mac_wait_reconfigure().
      
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
      Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1
      Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
      Signed-off-by: default avatarAaradhana Sahu <quic_aarasahu@quicinc.com>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://msgid.link/20240529034405.2863150-1-quic_aarasahu@quicinc.com
      670d4949
    • Bartosz Golaszewski's avatar
      dt-bindings: net: wireless: describe the ath12k PCI module · aa17d384
      Bartosz Golaszewski authored
      Add device-tree bindings for the ATH12K module found in the WCN7850
      package.
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://msgid.link/20240605122106.23818-3-brgl@bgdev.pl
      aa17d384
    • Bartosz Golaszewski's avatar
      dt-bindings: net: wireless: qcom,ath11k: describe the ath11k on QCA6390 · 71839a92
      Bartosz Golaszewski authored
      Add a PCI compatible for the ATH11K module on QCA6390 and describe the
      power inputs from the PMU that it consumes.
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
      Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
      Link: https://msgid.link/20240605122106.23818-2-brgl@bgdev.pl
      71839a92
  7. 11 Jun, 2024 11 commits