qcacmn: Generate pdev mask based on mac number

Set pdev mask in the HTT Stats request based on
mac id number provided from the user.

Change-Id: Ie8f1208fd3598efd2ea3736719c8b444ef86881a
CRs-Fixed: 2237467
Этот коммит содержится в:
Venkata Sharath Chandra Manchala
2018-04-23 11:48:28 -07:00
коммит произвёл nshrivas
родитель 54c0385480
Коммит 4face24247
4 изменённых файлов: 9 добавлений и 32 удалений

Просмотреть файл

@@ -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;
};
/**

Просмотреть файл

@@ -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

Просмотреть файл

@@ -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),

Просмотреть файл

@@ -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);
}
/**