Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ath-next-20260407' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath

Jeff Johnson says:
==================
ath.git patches for v7.1 (PR #3)

Add ath12k support for IPQ5424.

And of course there is the usual set of cleanups and bug fixes touching
the ath10k and ath12k drivers.
==================

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+383 -46
+1
Documentation/devicetree/bindings/net/wireless/qcom,ipq5332-wifi.yaml
··· 17 17 compatible: 18 18 enum: 19 19 - qcom,ipq5332-wifi 20 + - qcom,ipq5424-wifi 20 21 21 22 reg: 22 23 maxItems: 1
+15 -11
drivers/net/wireless/ath/ath10k/wmi-tlv.c
··· 3 3 * Copyright (c) 2005-2011 Atheros Communications Inc. 4 4 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 5 5 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 6 - * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. 6 + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. 7 7 */ 8 8 #include "core.h" 9 9 #include "debug.h" ··· 14 14 #include "wmi-tlv.h" 15 15 #include "p2p.h" 16 16 #include "testmode.h" 17 + #include "txrx.h" 17 18 #include <linux/bitfield.h> 18 19 19 20 /***************/ ··· 225 224 const void *ptr, void *data) 226 225 { 227 226 const struct wmi_tlv_peer_stats_info *stat = ptr; 228 - struct ieee80211_sta *sta; 227 + u32 vdev_id = *(u32 *)data; 229 228 struct ath10k_sta *arsta; 229 + struct ath10k_peer *peer; 230 230 231 231 if (tag != WMI_TLV_TAG_STRUCT_PEER_STATS_INFO) 232 232 return -EPROTO; ··· 243 241 __le32_to_cpu(stat->last_tx_rate_code), 244 242 __le32_to_cpu(stat->last_tx_bitrate_kbps)); 245 243 246 - rcu_read_lock(); 247 - sta = ieee80211_find_sta_by_ifaddr(ar->hw, stat->peer_macaddr.addr, NULL); 248 - if (!sta) { 249 - rcu_read_unlock(); 250 - ath10k_warn(ar, "not found station for peer stats\n"); 244 + guard(spinlock_bh)(&ar->data_lock); 245 + 246 + peer = ath10k_peer_find(ar, vdev_id, stat->peer_macaddr.addr); 247 + if (!peer || !peer->sta) { 248 + ath10k_warn(ar, "not found %s with vdev id %u mac addr %pM for peer stats\n", 249 + peer ? "sta" : "peer", vdev_id, stat->peer_macaddr.addr); 251 250 return -EINVAL; 252 251 } 253 252 254 - arsta = (struct ath10k_sta *)sta->drv_priv; 253 + arsta = (struct ath10k_sta *)peer->sta->drv_priv; 255 254 arsta->rx_rate_code = __le32_to_cpu(stat->last_rx_rate_code); 256 255 arsta->rx_bitrate_kbps = __le32_to_cpu(stat->last_rx_bitrate_kbps); 257 256 arsta->tx_rate_code = __le32_to_cpu(stat->last_tx_rate_code); 258 257 arsta->tx_bitrate_kbps = __le32_to_cpu(stat->last_tx_bitrate_kbps); 259 - rcu_read_unlock(); 260 258 261 259 return 0; 262 260 } ··· 268 266 const struct wmi_tlv_peer_stats_info_ev *ev; 269 267 const void *data; 270 268 u32 num_peer_stats; 269 + u32 vdev_id; 271 270 int ret; 272 271 273 272 tb = ath10k_wmi_tlv_parse_alloc(ar, skb->data, skb->len, GFP_ATOMIC); ··· 287 284 } 288 285 289 286 num_peer_stats = __le32_to_cpu(ev->num_peers); 287 + vdev_id = __le32_to_cpu(ev->vdev_id); 290 288 291 289 ath10k_dbg(ar, ATH10K_DBG_WMI, 292 290 "wmi tlv peer stats info update peer vdev id %d peers %i more data %d\n", 293 - __le32_to_cpu(ev->vdev_id), 291 + vdev_id, 294 292 num_peer_stats, 295 293 __le32_to_cpu(ev->more_data)); 296 294 297 295 ret = ath10k_wmi_tlv_iter(ar, data, ath10k_wmi_tlv_len(data), 298 - ath10k_wmi_tlv_parse_peer_stats_info, NULL); 296 + ath10k_wmi_tlv_parse_peer_stats_info, &vdev_id); 299 297 if (ret) 300 298 ath10k_warn(ar, "failed to parse stats info tlv: %d\n", ret); 301 299
+22 -14
drivers/net/wireless/ath/ath12k/ahb.c
··· 382 382 ATH12K_AHB_UPD_SWID; 383 383 384 384 /* Load FW image to a reserved memory location */ 385 - ret = qcom_mdt_load(dev, fw, fw_name, pasid, mem_region, mem_phys, mem_size, 386 - &mem_phys); 385 + if (ab_ahb->scm_auth_enabled) 386 + ret = qcom_mdt_load(dev, fw, fw_name, pasid, mem_region, 387 + mem_phys, mem_size, &mem_phys); 388 + else 389 + ret = qcom_mdt_load_no_init(dev, fw, fw_name, mem_region, 390 + mem_phys, mem_size, &mem_phys); 387 391 if (ret) { 388 392 ath12k_err(ab, "Failed to load MDT segments: %d\n", ret); 389 393 goto err_fw; ··· 418 414 goto err_fw2; 419 415 } 420 416 421 - /* Authenticate FW image using peripheral ID */ 422 - ret = qcom_scm_pas_auth_and_reset(pasid); 423 - if (ret) { 424 - ath12k_err(ab, "failed to boot the remote processor %d\n", ret); 425 - goto err_fw2; 417 + if (ab_ahb->scm_auth_enabled) { 418 + /* Authenticate FW image using peripheral ID */ 419 + ret = qcom_scm_pas_auth_and_reset(pasid); 420 + if (ret) { 421 + ath12k_err(ab, "failed to boot the remote processor %d\n", ret); 422 + goto err_fw2; 423 + } 426 424 } 427 425 428 426 /* Instruct Q6 to spawn userPD thread */ ··· 481 475 482 476 qcom_smem_state_update_bits(ab_ahb->stop_state, BIT(ab_ahb->stop_bit), 0); 483 477 484 - pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) | 485 - ATH12K_AHB_UPD_SWID; 486 - /* Release the firmware */ 487 - ret = qcom_scm_pas_shutdown(pasid); 488 - if (ret) 489 - ath12k_err(ab, "scm pas shutdown failed for userPD%d: %d\n", 490 - ab_ahb->userpd_id, ret); 478 + if (ab_ahb->scm_auth_enabled) { 479 + pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) | 480 + ATH12K_AHB_UPD_SWID; 481 + /* Release the firmware */ 482 + ret = qcom_scm_pas_shutdown(pasid); 483 + if (ret) 484 + ath12k_err(ab, "scm pas shutdown failed for userPD%d\n", 485 + ab_ahb->userpd_id); 486 + } 491 487 } 492 488 493 489 static void ath12k_ahb_init_qmi_ce_config(struct ath12k_base *ab)
+1
drivers/net/wireless/ath/ath12k/ahb.h
··· 68 68 int userpd_irq_num[ATH12K_USERPD_MAX_IRQ]; 69 69 const struct ath12k_ahb_ops *ahb_ops; 70 70 const struct ath12k_ahb_device_family_ops *device_family_ops; 71 + bool scm_auth_enabled; 71 72 }; 72 73 73 74 struct ath12k_ahb_driver {
+9 -4
drivers/net/wireless/ath/ath12k/ce.h
··· 38 38 #define PIPEDIR_INOUT 3 /* bidirectional */ 39 39 #define PIPEDIR_INOUT_H2H 4 /* bidirectional, host to host */ 40 40 41 - /* CE address/mask */ 42 - #define CE_HOST_IE_ADDRESS 0x75804C 43 - #define CE_HOST_IE_2_ADDRESS 0x758050 44 - #define CE_HOST_IE_3_ADDRESS CE_HOST_IE_ADDRESS 41 + /* IPQ5332 CE address/mask */ 42 + #define CE_HOST_IPQ5332_IE_ADDRESS 0x75804C 43 + #define CE_HOST_IPQ5332_IE_2_ADDRESS 0x758050 44 + #define CE_HOST_IPQ5332_IE_3_ADDRESS CE_HOST_IPQ5332_IE_ADDRESS 45 + 46 + /* IPQ5424 CE address/mask */ 47 + #define CE_HOST_IPQ5424_IE_ADDRESS 0x21804C 48 + #define CE_HOST_IPQ5424_IE_2_ADDRESS 0x218050 49 + #define CE_HOST_IPQ5424_IE_3_ADDRESS CE_HOST_IPQ5424_IE_ADDRESS 45 50 46 51 #define CE_HOST_IE_3_SHIFT 0xC 47 52
+2 -2
drivers/net/wireless/ath/ath12k/core.c
··· 835 835 goto err_qmi_deinit; 836 836 } 837 837 838 - ath12k_debugfs_pdev_create(ab); 839 - 840 838 return 0; 841 839 842 840 err_qmi_deinit: ··· 866 868 ath12k_err(ab, "could not register thermal device: %d\n", ret); 867 869 goto err_dp_pdev_free; 868 870 } 871 + 872 + ath12k_debugfs_pdev_create(ab); 869 873 870 874 return 0; 871 875
+8 -5
drivers/net/wireless/ath/ath12k/core.h
··· 157 157 ATH12K_HW_WCN7850_HW20, 158 158 ATH12K_HW_IPQ5332_HW10, 159 159 ATH12K_HW_QCC2072_HW10, 160 + ATH12K_HW_IPQ5424_HW10, 160 161 }; 161 162 162 163 enum ath12k_firmware_mode { ··· 589 588 struct ath12k_debug { 590 589 struct dentry *debugfs_pdev; 591 590 struct dentry *debugfs_pdev_symlink; 591 + struct dentry *debugfs_pdev_symlink_default; 592 592 struct ath12k_dbg_htt_stats htt_stats; 593 593 enum wmi_halphy_ctrl_path_stats_id tpc_stats_type; 594 594 bool tpc_request; ··· 675 673 u8 pdev_idx; 676 674 u8 lmac_id; 677 675 u8 hw_link_id; 676 + u8 radio_idx; 678 677 679 678 struct completion peer_assoc_done; 680 679 struct completion peer_delete_done; ··· 1369 1366 return hw->priv; 1370 1367 } 1371 1368 1372 - static inline struct ath12k *ath12k_ah_to_ar(struct ath12k_hw *ah, u8 hw_link_id) 1369 + static inline struct ath12k *ath12k_ah_to_ar(struct ath12k_hw *ah, u8 radio_idx) 1373 1370 { 1374 - if (WARN(hw_link_id >= ah->num_radio, 1375 - "bad hw link id %d, so switch to default link\n", hw_link_id)) 1376 - hw_link_id = 0; 1371 + if (WARN(radio_idx >= ah->num_radio, 1372 + "bad radio index %d, use default radio\n", radio_idx)) 1373 + radio_idx = 0; 1377 1374 1378 - return &ah->radio[hw_link_id]; 1375 + return &ah->radio[radio_idx]; 1379 1376 } 1380 1377 1381 1378 static inline struct ath12k_hw *ath12k_ar_to_ah(struct ath12k *ar)
+24 -5
drivers/net/wireless/ath/ath12k/debugfs.c
··· 1473 1473 { 1474 1474 struct ath12k_base *ab = ar->ab; 1475 1475 struct ieee80211_hw *hw = ar->ah->hw; 1476 - char pdev_name[5]; 1476 + struct ath12k_hw *ah = ath12k_hw_to_ah(hw); 1477 + struct dentry *ath12k_fs; 1477 1478 char buf[100] = {}; 1479 + char pdev_name[5]; 1478 1480 1479 1481 scnprintf(pdev_name, sizeof(pdev_name), "%s%d", "mac", ar->pdev_idx); 1480 1482 1481 1483 ar->debug.debugfs_pdev = debugfs_create_dir(pdev_name, ab->debugfs_soc); 1482 1484 1483 1485 /* Create a symlink under ieee80211/phy* */ 1484 - scnprintf(buf, sizeof(buf), "../../ath12k/%pd2", ar->debug.debugfs_pdev); 1485 - ar->debug.debugfs_pdev_symlink = debugfs_create_symlink("ath12k", 1486 - hw->wiphy->debugfsdir, 1487 - buf); 1486 + if (ar->radio_idx == 0) { 1487 + scnprintf(buf, sizeof(buf), "../../ath12k/%pd2", 1488 + ar->debug.debugfs_pdev); 1489 + ath12k_fs = hw->wiphy->debugfsdir; 1490 + 1491 + /* symbolic link for compatibility */ 1492 + ar->debug.debugfs_pdev_symlink_default = debugfs_create_symlink("ath12k", 1493 + ath12k_fs, 1494 + buf); 1495 + } 1496 + 1497 + if (ah->num_radio > 1) { 1498 + scnprintf(buf, sizeof(buf), "../../../ath12k/%pd2", 1499 + ar->debug.debugfs_pdev); 1500 + ath12k_fs = hw->wiphy->radio_cfg[ar->radio_idx].radio_debugfsdir; 1501 + ar->debug.debugfs_pdev_symlink = debugfs_create_symlink("ath12k", 1502 + ath12k_fs, 1503 + buf); 1504 + } 1488 1505 1489 1506 if (ar->mac.sbands[NL80211_BAND_5GHZ].channels) { 1490 1507 debugfs_create_file("dfs_simulate_radar", 0200, ··· 1530 1513 1531 1514 /* Remove symlink under ieee80211/phy* */ 1532 1515 debugfs_remove(ar->debug.debugfs_pdev_symlink); 1516 + debugfs_remove(ar->debug.debugfs_pdev_symlink_default); 1533 1517 debugfs_remove_recursive(ar->debug.debugfs_pdev); 1534 1518 ar->debug.debugfs_pdev_symlink = NULL; 1519 + ar->debug.debugfs_pdev_symlink_default = NULL; 1535 1520 ar->debug.debugfs_pdev = NULL; 1536 1521 }
+72
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c
··· 5722 5722 stats_req->buf_len = len; 5723 5723 } 5724 5724 5725 + static void 5726 + ath12k_htt_print_chan_switch_stats_tlv(const void *tag_buf, u16 tag_len, 5727 + struct debug_htt_stats_req *stats_req) 5728 + { 5729 + const struct ath12k_htt_chan_switch_stats_tlv *sbuf = tag_buf; 5730 + u32 buf_len = ATH12K_HTT_STATS_BUF_SIZE; 5731 + u32 switch_freq, switch_profile; 5732 + u32 len = stats_req->buf_len; 5733 + u8 *buf = stats_req->buf; 5734 + u8 i; 5735 + 5736 + if (tag_len < sizeof(*sbuf)) 5737 + return; 5738 + 5739 + i = min(le32_to_cpu(sbuf->switch_count), ATH12K_HTT_CHAN_SWITCH_STATS_BUF_LEN); 5740 + if (!i) 5741 + return; 5742 + 5743 + len += scnprintf(buf + len, buf_len - len, "Channel Change Timings:\n"); 5744 + len += scnprintf(buf + len, buf_len - len, 5745 + "|%-20s|%-21s|%-7s|%-12s|%-12s|%-15s|", 5746 + "PRIMARY CHANNEL FREQ", "BANDWIDTH CENTER FREQ", "PHYMODE", 5747 + "TX_CHAINMASK", "RX_CHAINMASK", "SWITCH TIME(us)"); 5748 + len += scnprintf(buf + len, buf_len - len, 5749 + "%-7s|%-11s|%-7s|%-8s|%-7s|%-10s|\n", 5750 + "INI(us)", "TPC+CTL(us)", "CAL(us)", "MISC(us)", "CTL(us)", 5751 + "SW PROFILE"); 5752 + 5753 + /* 5754 + * sbuf->switch_count has the number of successful channel changes. The firmware 5755 + * sends the record of channel change in such a way that sbuf->chan_stats[0] will 5756 + * point to the channel change that occurred first and the recent channel change 5757 + * records will be stored in sbuf->chan_stats[9]. As and when new channel change 5758 + * occurs, sbuf->chan_stats[0] will be replaced by records from the next index, 5759 + * sbuf->chan_stats[1]. While printing the records, reverse chronological order 5760 + * is followed, i.e., the most recent channel change records are printed first 5761 + * and the oldest one, last. 5762 + */ 5763 + while (i--) { 5764 + switch_freq = le32_to_cpu(sbuf->chan_stats[i].chan_switch_freq); 5765 + switch_profile = le32_to_cpu(sbuf->chan_stats[i].chan_switch_profile); 5766 + 5767 + len += scnprintf(buf + len, buf_len - len, 5768 + "|%20u|%21u|%7u|%12u|%12u|%15u|", 5769 + u32_get_bits(switch_freq, 5770 + ATH12K_HTT_STATS_CHAN_SWITCH_BW_MHZ), 5771 + u32_get_bits(switch_freq, 5772 + ATH12K_HTT_STATS_CHAN_SWITCH_BAND_FREQ), 5773 + u32_get_bits(switch_profile, 5774 + ATH12K_HTT_STATS_CHAN_SWITCH_PHY_MODE), 5775 + u32_get_bits(switch_profile, 5776 + ATH12K_HTT_STATS_CHAN_SWITCH_TX_CHAINMASK), 5777 + u32_get_bits(switch_profile, 5778 + ATH12K_HTT_STATS_CHAN_SWITCH_RX_CHAINMASK), 5779 + le32_to_cpu(sbuf->chan_stats[i].chan_switch_time)); 5780 + len += scnprintf(buf + len, buf_len - len, 5781 + "%7u|%11u|%7u|%8u|%7u|%10u|\n", 5782 + le32_to_cpu(sbuf->chan_stats[i].ini_module_time), 5783 + le32_to_cpu(sbuf->chan_stats[i].tpc_module_time), 5784 + le32_to_cpu(sbuf->chan_stats[i].cal_module_time), 5785 + le32_to_cpu(sbuf->chan_stats[i].misc_module_time), 5786 + le32_to_cpu(sbuf->chan_stats[i].ctl_module_time), 5787 + u32_get_bits(switch_profile, 5788 + ATH12K_HTT_STATS_CHAN_SWITCH_SW_PROFILE)); 5789 + } 5790 + 5791 + stats_req->buf_len = len; 5792 + } 5793 + 5725 5794 static int ath12k_dbg_htt_ext_stats_parse(struct ath12k_base *ab, 5726 5795 u16 tag, u16 len, const void *tag_buf, 5727 5796 void *user_data) ··· 6092 6023 break; 6093 6024 case HTT_STATS_TX_HWQ_CMN_TAG: 6094 6025 ath12k_htt_print_tx_hwq_stats_cmn_tlv(tag_buf, len, stats_req); 6026 + break; 6027 + case HTT_STATS_CHAN_SWITCH_STATS_TAG: 6028 + ath12k_htt_print_chan_switch_stats_tlv(tag_buf, len, stats_req); 6095 6029 break; 6096 6030 default: 6097 6031 break;
+26
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
··· 164 164 ATH12K_DBG_HTT_PDEV_MLO_IPC_STATS = 64, 165 165 ATH12K_DBG_HTT_EXT_PDEV_RTT_RESP_STATS = 65, 166 166 ATH12K_DBG_HTT_EXT_PDEV_RTT_INITIATOR_STATS = 66, 167 + ATH12K_DBG_HTT_EXT_CHAN_SWITCH_STATS = 76, 167 168 168 169 /* keep this last */ 169 170 ATH12K_DBG_HTT_NUM_EXT_STATS, ··· 268 267 HTT_STATS_PDEV_RTT_HW_STATS_TAG = 196, 269 268 HTT_STATS_PDEV_RTT_TBR_SELFGEN_QUEUED_STATS_TAG = 197, 270 269 HTT_STATS_PDEV_RTT_TBR_CMD_RESULT_STATS_TAG = 198, 270 + HTT_STATS_CHAN_SWITCH_STATS_TAG = 213, 271 271 272 272 HTT_STATS_MAX_TAG, 273 273 }; ··· 2156 2154 __le32 mpdu_filt_cnt; 2157 2155 __le32 false_mpdu_ack_count; 2158 2156 __le32 txq_timeout; 2157 + } __packed; 2158 + 2159 + #define ATH12K_HTT_CHAN_SWITCH_STATS_BUF_LEN 10 2160 + 2161 + #define ATH12K_HTT_STATS_CHAN_SWITCH_BW_MHZ GENMASK(15, 0) 2162 + #define ATH12K_HTT_STATS_CHAN_SWITCH_BAND_FREQ GENMASK(31, 16) 2163 + #define ATH12K_HTT_STATS_CHAN_SWITCH_PHY_MODE GENMASK(7, 0) 2164 + #define ATH12K_HTT_STATS_CHAN_SWITCH_TX_CHAINMASK GENMASK(15, 8) 2165 + #define ATH12K_HTT_STATS_CHAN_SWITCH_RX_CHAINMASK GENMASK(23, 16) 2166 + #define ATH12K_HTT_STATS_CHAN_SWITCH_SW_PROFILE GENMASK(31, 24) 2167 + 2168 + struct ath12k_htt_chan_switch_stats_tlv { 2169 + struct { 2170 + __le32 chan_switch_freq; 2171 + __le32 chan_switch_profile; 2172 + __le32 chan_switch_time; 2173 + __le32 cal_module_time; 2174 + __le32 ini_module_time; 2175 + __le32 tpc_module_time; 2176 + __le32 misc_module_time; 2177 + __le32 ctl_module_time; 2178 + __le32 reserved; 2179 + } chan_stats[ATH12K_HTT_CHAN_SWITCH_STATS_BUF_LEN]; 2180 + __le32 switch_count; /* shows how many channel changes have occurred */ 2159 2181 } __packed; 2160 2182 2161 2183 #endif
+2 -2
drivers/net/wireless/ath/ath12k/mac.c
··· 11131 11131 if (arvif == arvif_p) 11132 11132 continue; 11133 11133 11134 - if (!arvif_p->is_created) 11134 + if (!arvif_p->is_started) 11135 11135 continue; 11136 11136 11137 11137 link_conf = wiphy_dereference(ahvif->ah->hw->wiphy, ··· 15065 15065 ar->hw_link_id = pdev->hw_link_id; 15066 15066 ar->pdev = pdev; 15067 15067 ar->pdev_idx = pdev_idx; 15068 + ar->radio_idx = i; 15068 15069 pdev->ar = ar; 15069 15070 15070 15071 ag->hw_links[ar->hw_link_id].device_id = ab->device_id; ··· 15133 15132 if (!ab) 15134 15133 continue; 15135 15134 15136 - ath12k_debugfs_pdev_create(ab); 15137 15135 ath12k_mac_set_device_defaults(ab); 15138 15136 total_radio += ab->num_radios; 15139 15137 }
+8
drivers/net/wireless/ath/ath12k/wifi7/ahb.c
··· 19 19 { .compatible = "qcom,ipq5332-wifi", 20 20 .data = (void *)ATH12K_HW_IPQ5332_HW10, 21 21 }, 22 + { .compatible = "qcom,ipq5424-wifi", 23 + .data = (void *)ATH12K_HW_IPQ5424_HW10, 24 + }, 22 25 { } 23 26 }; 24 27 ··· 41 38 switch (hw_rev) { 42 39 case ATH12K_HW_IPQ5332_HW10: 43 40 ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID; 41 + ab_ahb->scm_auth_enabled = true; 42 + break; 43 + case ATH12K_HW_IPQ5424_HW10: 44 + ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID; 45 + ab_ahb->scm_auth_enabled = false; 44 46 break; 45 47 default: 46 48 return -EOPNOTSUPP;
+7
drivers/net/wireless/ath/ath12k/wifi7/hal.c
··· 50 50 .hal_params = &ath12k_hw_hal_params_wcn7850, 51 51 .hw_regs = &qcc2072_regs, 52 52 }, 53 + [ATH12K_HW_IPQ5424_HW10] = { 54 + .hal_ops = &hal_qcn9274_ops, 55 + .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9274_compact), 56 + .tcl_to_wbm_rbm_map = ath12k_hal_tcl_to_wbm_rbm_map_qcn9274, 57 + .hal_params = &ath12k_hw_hal_params_ipq5332, 58 + .hw_regs = &ipq5424_regs, 59 + }, 53 60 }; 54 61 55 62 int ath12k_wifi7_hal_init(struct ath12k_base *ab)
+3
drivers/net/wireless/ath/ath12k/wifi7/hal.h
··· 364 364 #define HAL_IPQ5332_CE_WFSS_REG_BASE 0x740000 365 365 #define HAL_IPQ5332_CE_SIZE 0x100000 366 366 367 + #define HAL_IPQ5424_CE_WFSS_REG_BASE 0x200000 368 + #define HAL_IPQ5424_CE_SIZE 0x100000 369 + 367 370 #define HAL_RX_MAX_BA_WINDOW 256 368 371 369 372 #define HAL_DEFAULT_BE_BK_VI_REO_TIMEOUT_USEC (100 * 1000)
+88
drivers/net/wireless/ath/ath12k/wifi7/hal_qcn9274.c
··· 484 484 HAL_IPQ5332_CE_WFSS_REG_BASE, 485 485 }; 486 486 487 + const struct ath12k_hw_regs ipq5424_regs = { 488 + /* SW2TCL(x) R0 ring configuration address */ 489 + .tcl1_ring_id = 0x00000918, 490 + .tcl1_ring_misc = 0x00000920, 491 + .tcl1_ring_tp_addr_lsb = 0x0000092c, 492 + .tcl1_ring_tp_addr_msb = 0x00000930, 493 + .tcl1_ring_consumer_int_setup_ix0 = 0x00000940, 494 + .tcl1_ring_consumer_int_setup_ix1 = 0x00000944, 495 + .tcl1_ring_msi1_base_lsb = 0x00000958, 496 + .tcl1_ring_msi1_base_msb = 0x0000095c, 497 + .tcl1_ring_base_lsb = 0x00000910, 498 + .tcl1_ring_base_msb = 0x00000914, 499 + .tcl1_ring_msi1_data = 0x00000960, 500 + .tcl2_ring_base_lsb = 0x00000988, 501 + .tcl_ring_base_lsb = 0x00000b68, 502 + 503 + /* TCL STATUS ring address */ 504 + .tcl_status_ring_base_lsb = 0x00000d48, 505 + 506 + /* REO DEST ring address */ 507 + .reo2_ring_base = 0x00000578, 508 + .reo1_misc_ctrl_addr = 0x00000b9c, 509 + .reo1_sw_cookie_cfg0 = 0x0000006c, 510 + .reo1_sw_cookie_cfg1 = 0x00000070, 511 + .reo1_qdesc_lut_base0 = 0x00000074, 512 + .reo1_qdesc_lut_base1 = 0x00000078, 513 + .reo1_ring_base_lsb = 0x00000500, 514 + .reo1_ring_base_msb = 0x00000504, 515 + .reo1_ring_id = 0x00000508, 516 + .reo1_ring_misc = 0x00000510, 517 + .reo1_ring_hp_addr_lsb = 0x00000514, 518 + .reo1_ring_hp_addr_msb = 0x00000518, 519 + .reo1_ring_producer_int_setup = 0x00000524, 520 + .reo1_ring_msi1_base_lsb = 0x00000548, 521 + .reo1_ring_msi1_base_msb = 0x0000054C, 522 + .reo1_ring_msi1_data = 0x00000550, 523 + .reo1_aging_thres_ix0 = 0x00000B28, 524 + .reo1_aging_thres_ix1 = 0x00000B2C, 525 + .reo1_aging_thres_ix2 = 0x00000B30, 526 + .reo1_aging_thres_ix3 = 0x00000B34, 527 + 528 + /* REO Exception ring address */ 529 + .reo2_sw0_ring_base = 0x000008c0, 530 + 531 + /* REO Reinject ring address */ 532 + .sw2reo_ring_base = 0x00000320, 533 + .sw2reo1_ring_base = 0x00000398, 534 + 535 + /* REO cmd ring address */ 536 + .reo_cmd_ring_base = 0x000002A8, 537 + 538 + /* REO status ring address */ 539 + .reo_status_ring_base = 0x00000aa0, 540 + 541 + /* WBM idle link ring address */ 542 + .wbm_idle_ring_base_lsb = 0x00000d3c, 543 + .wbm_idle_ring_misc_addr = 0x00000d4c, 544 + .wbm_r0_idle_list_cntl_addr = 0x00000240, 545 + .wbm_r0_idle_list_size_addr = 0x00000244, 546 + .wbm_scattered_ring_base_lsb = 0x00000250, 547 + .wbm_scattered_ring_base_msb = 0x00000254, 548 + .wbm_scattered_desc_head_info_ix0 = 0x00000260, 549 + .wbm_scattered_desc_head_info_ix1 = 0x00000264, 550 + .wbm_scattered_desc_tail_info_ix0 = 0x00000270, 551 + .wbm_scattered_desc_tail_info_ix1 = 0x00000274, 552 + .wbm_scattered_desc_ptr_hp_addr = 0x0000027c, 553 + 554 + /* SW2WBM release ring address */ 555 + .wbm_sw_release_ring_base_lsb = 0x0000037c, 556 + 557 + /* WBM2SW release ring address */ 558 + .wbm0_release_ring_base_lsb = 0x00000e08, 559 + .wbm1_release_ring_base_lsb = 0x00000e80, 560 + 561 + /* PPE release ring address */ 562 + .ppe_rel_ring_base = 0x0000046c, 563 + 564 + /* CE address */ 565 + .umac_ce0_src_reg_base = 0x00200000 - 566 + HAL_IPQ5424_CE_WFSS_REG_BASE, 567 + .umac_ce0_dest_reg_base = 0x00201000 - 568 + HAL_IPQ5424_CE_WFSS_REG_BASE, 569 + .umac_ce1_src_reg_base = 0x00202000 - 570 + HAL_IPQ5424_CE_WFSS_REG_BASE, 571 + .umac_ce1_dest_reg_base = 0x00203000 - 572 + HAL_IPQ5424_CE_WFSS_REG_BASE, 573 + }; 574 + 487 575 static inline 488 576 bool ath12k_hal_rx_desc_get_first_msdu_qcn9274(struct hal_rx_desc *desc) 489 577 {
+1
drivers/net/wireless/ath/ath12k/wifi7/hal_qcn9274.h
··· 17 17 extern const struct ath12k_hw_regs qcn9274_v1_regs; 18 18 extern const struct ath12k_hw_regs qcn9274_v2_regs; 19 19 extern const struct ath12k_hw_regs ipq5332_regs; 20 + extern const struct ath12k_hw_regs ipq5424_regs; 20 21 extern const struct ath12k_hal_tcl_to_wbm_rbm_map 21 22 ath12k_hal_tcl_to_wbm_rbm_map_qcn9274[DP_TCL_NUM_RING_MAX]; 22 23 extern const struct ath12k_hw_hal_params ath12k_hw_hal_params_qcn9274;
+94 -3
drivers/net/wireless/ath/ath12k/wifi7/hw.c
··· 329 329 }; 330 330 331 331 static const struct ce_ie_addr ath12k_wifi7_ce_ie_addr_ipq5332 = { 332 - .ie1_reg_addr = CE_HOST_IE_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 333 - .ie2_reg_addr = CE_HOST_IE_2_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 334 - .ie3_reg_addr = CE_HOST_IE_3_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 332 + .ie1_reg_addr = CE_HOST_IPQ5332_IE_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 333 + .ie2_reg_addr = CE_HOST_IPQ5332_IE_2_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 334 + .ie3_reg_addr = CE_HOST_IPQ5332_IE_3_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, 335 + }; 336 + 337 + static const struct ce_ie_addr ath12k_wifi7_ce_ie_addr_ipq5424 = { 338 + .ie1_reg_addr = CE_HOST_IPQ5424_IE_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, 339 + .ie2_reg_addr = CE_HOST_IPQ5424_IE_2_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, 340 + .ie3_reg_addr = CE_HOST_IPQ5424_IE_3_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, 335 341 }; 336 342 337 343 static const struct ce_remap ath12k_wifi7_ce_remap_ipq5332 = { 338 344 .base = HAL_IPQ5332_CE_WFSS_REG_BASE, 339 345 .size = HAL_IPQ5332_CE_SIZE, 346 + .cmem_offset = HAL_SEQ_WCSS_CMEM_OFFSET, 347 + }; 348 + 349 + static const struct ce_remap ath12k_wifi7_ce_remap_ipq5424 = { 350 + .base = HAL_IPQ5424_CE_WFSS_REG_BASE, 351 + .size = HAL_IPQ5424_CE_SIZE, 340 352 .cmem_offset = HAL_SEQ_WCSS_CMEM_OFFSET, 341 353 }; 342 354 ··· 764 752 .current_cc_support = true, 765 753 766 754 .dp_primary_link_only = false, 755 + }, 756 + { 757 + .name = "ipq5424 hw1.0", 758 + .hw_rev = ATH12K_HW_IPQ5424_HW10, 759 + .fw = { 760 + .dir = "IPQ5424/hw1.0", 761 + .board_size = 256 * 1024, 762 + .cal_offset = 128 * 1024, 763 + .m3_loader = ath12k_m3_fw_loader_remoteproc, 764 + .download_aux_ucode = false, 765 + }, 766 + .max_radios = 1, 767 + .single_pdev_only = false, 768 + .qmi_service_ins_id = ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ5332, 769 + .internal_sleep_clock = false, 770 + 771 + .hw_ops = &qcn9274_ops, 772 + .ring_mask = &ath12k_wifi7_hw_ring_mask_ipq5332, 773 + 774 + .host_ce_config = ath12k_wifi7_host_ce_config_ipq5332, 775 + .ce_count = 12, 776 + .target_ce_config = ath12k_wifi7_target_ce_config_wlan_ipq5332, 777 + .target_ce_count = 12, 778 + .svc_to_ce_map = 779 + ath12k_wifi7_target_service_to_ce_map_wlan_ipq5332, 780 + .svc_to_ce_map_len = 18, 781 + 782 + .rxdma1_enable = true, 783 + .num_rxdma_per_pdev = 1, 784 + .num_rxdma_dst_ring = 0, 785 + .rx_mac_buf_ring = false, 786 + .vdev_start_delay = false, 787 + 788 + .interface_modes = BIT(NL80211_IFTYPE_STATION) | 789 + BIT(NL80211_IFTYPE_AP) | 790 + BIT(NL80211_IFTYPE_MESH_POINT), 791 + .supports_monitor = true, 792 + 793 + .idle_ps = false, 794 + .download_calib = true, 795 + .supports_suspend = false, 796 + .tcl_ring_retry = true, 797 + .reoq_lut_support = false, 798 + .supports_shadow_regs = false, 799 + 800 + .num_tcl_banks = 48, 801 + .max_tx_ring = 4, 802 + 803 + .mhi_config = NULL, 804 + 805 + .wmi_init = &ath12k_wifi7_wmi_init_qcn9274, 806 + 807 + .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01), 808 + 809 + .rfkill_pin = 0, 810 + .rfkill_cfg = 0, 811 + .rfkill_on_level = 0, 812 + 813 + .rddm_size = 0, 814 + 815 + .def_num_link = 0, 816 + .max_mlo_peer = 256, 817 + 818 + .otp_board_id_register = 0, 819 + 820 + .supports_sta_ps = false, 821 + 822 + .acpi_guid = NULL, 823 + .supports_dynamic_smps_6ghz = false, 824 + .iova_mask = 0, 825 + .supports_aspm = false, 826 + 827 + .ce_ie_addr = &ath12k_wifi7_ce_ie_addr_ipq5424, 828 + .ce_remap = &ath12k_wifi7_ce_remap_ipq5424, 829 + .bdf_addr_offset = 0x940000, 830 + 831 + .current_cc_support = false, 832 + 833 + .dp_primary_link_only = true, 767 834 }, 768 835 }; 769 836