]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Move HTT specific code from dp.c to newly introduced files
authorHarsh Kumar Bijlani <quic_hbijlani@quicinc.com>
Thu, 28 Aug 2025 17:35:53 +0000 (23:05 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 3 Sep 2025 17:07:00 +0000 (10:07 -0700)
WLAN Host driver interacts with the Firmware and vice versa using
Host-To-Target (HTT) interface.

Relocate HTT specific code from dp.c to newly introduced file dp_htt.c
for HTT interface.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-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: Harsh Kumar Bijlani <quic_hbijlani@quicinc.com>
Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20250828173553.3341351-21-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp.c
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/dp_htt.c
drivers/net/wireless/ath/ath12k/dp_htt.h

index d0bdf058633ff231182cf06901ba5d35bc746bfd..8909415df2e271db6165f8c9d4ff201eac8dc1ec 100644 (file)
@@ -19,12 +19,6 @@ enum ath12k_dp_desc_type {
        ATH12K_DP_RX_DESC,
 };
 
-static void ath12k_dp_htt_htc_tx_complete(struct ath12k_base *ab,
-                                         struct sk_buff *skb)
-{
-       dev_kfree_skb_any(skb);
-}
-
 void ath12k_dp_peer_cleanup(struct ath12k *ar, int vdev_id, const u8 *addr)
 {
        struct ath12k_base *ab = ar->ab;
@@ -957,29 +951,6 @@ out:
        return ret;
 }
 
-int ath12k_dp_htt_connect(struct ath12k_dp *dp)
-{
-       struct ath12k_htc_svc_conn_req conn_req = {};
-       struct ath12k_htc_svc_conn_resp conn_resp = {};
-       int status;
-
-       conn_req.ep_ops.ep_tx_complete = ath12k_dp_htt_htc_tx_complete;
-       conn_req.ep_ops.ep_rx_complete = ath12k_dp_htt_htc_t2h_msg_handler;
-
-       /* connect to control service */
-       conn_req.service_id = ATH12K_HTC_SVC_ID_HTT_DATA_MSG;
-
-       status = ath12k_htc_connect_service(&dp->ab->htc, &conn_req,
-                                           &conn_resp);
-
-       if (status)
-               return status;
-
-       dp->eid = conn_resp.eid;
-
-       return 0;
-}
-
 static void ath12k_dp_update_vdev_search(struct ath12k_link_vif *arvif)
 {
        switch (arvif->ahvif->vdev_type) {
index ad93e63e3344b305f5c14b37efda56bb5e50fd60..18a3287945b70ff78b8d1e3c6b2821f51ccc33c0 100644 (file)
@@ -432,7 +432,6 @@ static inline void ath12k_dp_get_mac_addr(u32 addr_l32, u16 addr_h16, u8 *addr)
        memcpy(addr + 4, &addr_h16, ETH_ALEN - 4);
 }
 
-int ath12k_dp_htt_connect(struct ath12k_dp *dp);
 void ath12k_dp_vdev_tx_attach(struct ath12k *ar, struct ath12k_link_vif *arvif);
 void ath12k_dp_free(struct ath12k_base *ab);
 int ath12k_dp_alloc(struct ath12k_base *ab);
index 45aa8ae86a14ce54ab2c39725186ce58b3e113fd..6ab5b2d8aac9460b18f04872ad8e249e00921e8d 100644 (file)
 #include "debugfs_htt_stats.h"
 #include "debugfs.h"
 
+static void ath12k_dp_htt_htc_tx_complete(struct ath12k_base *ab,
+                                         struct sk_buff *skb)
+{
+       dev_kfree_skb_any(skb);
+}
+
+int ath12k_dp_htt_connect(struct ath12k_dp *dp)
+{
+       struct ath12k_htc_svc_conn_req conn_req = {};
+       struct ath12k_htc_svc_conn_resp conn_resp = {};
+       int status;
+
+       conn_req.ep_ops.ep_tx_complete = ath12k_dp_htt_htc_tx_complete;
+       conn_req.ep_ops.ep_rx_complete = ath12k_dp_htt_htc_t2h_msg_handler;
+
+       /* connect to control service */
+       conn_req.service_id = ATH12K_HTC_SVC_ID_HTT_DATA_MSG;
+
+       status = ath12k_htc_connect_service(&dp->ab->htc, &conn_req,
+                                           &conn_resp);
+
+       if (status)
+               return status;
+
+       dp->eid = conn_resp.eid;
+
+       return 0;
+}
+
 static int ath12k_get_ppdu_user_index(struct htt_ppdu_stats *ppdu_stats,
                                      u16 peer_id)
 {
@@ -818,8 +847,6 @@ err_free:
        return ret;
 }
 
-#define HTT_TARGET_VERSION_TIMEOUT_HZ (3 * HZ)
-
 int ath12k_dp_tx_htt_h2t_ver_req_msg(struct ath12k_base *ab)
 {
        struct ath12k_dp *dp = &ab->dp;
index b13af1c69253dee976d19b128eb5dab6d3779e64..6020e632f74ecf4098f3d1b4c92c15c1b0176786 100644 (file)
@@ -36,6 +36,8 @@ struct ath12k_dp;
 
 #define HTT_TX_WBM_COMP_INFO2_ACK_RSSI         GENMASK(31, 24)
 
+#define HTT_TARGET_VERSION_TIMEOUT_HZ (3 * HZ)
+
 struct htt_tx_wbm_completion {
        __le32 rsvd0[2];
        __le32 info0;
@@ -1514,6 +1516,7 @@ struct htt_mac_addr {
        __le32 mac_addr_h16;
 } __packed;
 
+int ath12k_dp_htt_connect(struct ath12k_dp *dp);
 int ath12k_dp_tx_htt_srng_setup(struct ath12k_base *ab, u32 ring_id,
                                int mac_id, enum hal_ring_type ring_type);