diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index ec939b938b3b..e220818fe843 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -1181,7 +1181,7 @@ struct cdp_config_params { * @param1: opaque argument 1 to be passed to htt * @param2: opaque argument 2 to be passed to htt * @param3: opaque argument 3 to be passed to htt - * @channel_param: Channel Information + * @mac id: mac_id */ struct cdp_txrx_stats_req { enum cdp_stats stats; @@ -1190,7 +1190,7 @@ struct cdp_txrx_stats_req { uint32_t param2; uint32_t param3; uint32_t cookie_val; - uint8_t channel; + uint8_t mac_id; }; /** diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index aaec3f94537f..15e8b0f98def 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -3065,31 +3065,6 @@ htt_soc_detach(void *htt_soc) qdf_mem_free(soc); } -/* - * dp_get_pdev_mask_for_channel_id() - Retrieve pdev_id mask based on channel - * information - * @pdev - DP PDEV Handle - * @channel - frequency - * - * Return - Pdev_id mask - */ -static inline -uint8_t dp_get_pdev_mask_for_channel_id(struct dp_pdev *pdev, uint8_t channel) -{ - uint8_t pdev_mask = 0; - - if (!channel) - return 1 << (pdev->pdev_id + 1); - - else if (channel && WLAN_CHAN_IS_5GHZ(channel)) - pdev_mask = 0; - - else if (channel && WLAN_CHAN_IS_2GHZ(channel)) - pdev_mask = 1; - - return 1 << (pdev_mask + 1); -} - /** * dp_h2t_ext_stats_msg_send(): function to contruct HTT message to pass to FW * @pdev: DP PDEV handle @@ -3098,6 +3073,7 @@ uint8_t dp_get_pdev_mask_for_channel_id(struct dp_pdev *pdev, uint8_t channel) * @config_param_1: extra configuration parameters * @config_param_2: extra configuration parameters * @config_param_3: extra configuration parameters + * @mac_id: mac number * * return: QDF STATUS */ @@ -3105,7 +3081,7 @@ QDF_STATUS dp_h2t_ext_stats_msg_send(struct dp_pdev *pdev, uint32_t stats_type_upload_mask, uint32_t config_param_0, uint32_t config_param_1, uint32_t config_param_2, uint32_t config_param_3, int cookie_val, int cookie_msb, - uint8_t channel) + uint8_t mac_id) { struct htt_soc *soc = pdev->soc->htt_handle; struct dp_htt_htc_pkt *pkt; @@ -3127,8 +3103,9 @@ QDF_STATUS dp_h2t_ext_stats_msg_send(struct dp_pdev *pdev, * Bit 2: Pdev stats for pdev id 1 * Bit 3: Pdev stats for pdev id 2 */ - pdev_mask = dp_get_pdev_mask_for_channel_id(pdev, channel); + mac_id = dp_get_mac_id_for_pdev(mac_id, pdev->pdev_id); + pdev_mask = 1 << DP_SW2HW_MACID(mac_id); /* * Set the length of the message. * The contribution from the HTC_HDR_ALIGNMENT_PADDING is added diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index 53ffbb30cff6..c279eef37b13 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -399,7 +399,7 @@ QDF_STATUS dp_h2t_ext_stats_msg_send(struct dp_pdev *pdev, uint32_t stats_type_upload_mask, uint32_t config_param_0, uint32_t config_param_1, uint32_t config_param_2, uint32_t config_param_3, int cookie, int cookie_msb, - uint8_t channel); + uint8_t mac_id); void dp_htt_stats_print_tag(uint8_t tag_type, uint32_t *tag_buf); void dp_htt_stats_copy_tag(struct dp_pdev *pdev, uint8_t tag_type, uint32_t *tag_buf); void dp_peer_rxtid_stats(struct dp_peer *peer, void (*callback_fn), diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 9224c9c985ad..daa64d58ce7e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6282,7 +6282,7 @@ static int dp_fw_stats_process(struct cdp_vdev *vdev_handle, struct dp_vdev *vdev = (struct dp_vdev *)vdev_handle; struct dp_pdev *pdev = NULL; uint32_t stats = req->stats; - uint8_t channel = req->channel; + uint8_t mac_id = req->mac_id; if (!vdev) { DP_TRACE(NONE, "VDEV not found"); @@ -6309,7 +6309,7 @@ static int dp_fw_stats_process(struct cdp_vdev *vdev_handle, return dp_h2t_ext_stats_msg_send(pdev, stats, req->param0, req->param1, req->param2, req->param3, - 0, 0, channel); + 0, 0, mac_id); } /**