qcacld-3.0: Enhance congestion report
Enhance congestion report by pdev extend stats. Change-Id: Ica61112f95e6264db5b46db807e1f5df04b26c98 CRs-Fixed: 3234080
This commit is contained in:

committed by
Madan Koyyalamudi

parent
45cfd4b5fc
commit
25e3dfc1ee
@@ -218,17 +218,21 @@ struct big_data_stats_event {
|
||||
|
||||
/**
|
||||
* struct medium_assess_data - medium assess data from firmware
|
||||
* @part1_valid: the flag for part1 data
|
||||
* @part1_valid: the flag for part1 data, include cycle_count,
|
||||
* rx_clear_count and tx_frame_count
|
||||
* @cycle_count: accumulative cycle count (total time)
|
||||
* @rx_clear_count: accumulative rx clear count (busy time)
|
||||
* @tx_frame_count: accumulative tx frame count (total time)
|
||||
* @part2_valid: the flag for part2 data, include my_rx_count
|
||||
* @my_rx_count: my RX count
|
||||
*/
|
||||
struct medium_assess_data {
|
||||
/* part1 data */
|
||||
uint8_t part1_valid;
|
||||
bool part1_valid;
|
||||
uint32_t cycle_count;
|
||||
uint32_t rx_clear_count;
|
||||
uint32_t tx_frame_count;
|
||||
bool part2_valid;
|
||||
uint32_t my_rx_count;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -254,7 +258,8 @@ struct request_info {
|
||||
void (*get_peer_stats_cb)(struct stats_event *ev,
|
||||
void *cookie);
|
||||
void (*congestion_notif_cb)(uint8_t vdev_id,
|
||||
struct medium_assess_data *data);
|
||||
struct medium_assess_data *data,
|
||||
bool last);
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
void (*get_big_data_stats_cb)(struct big_data_stats_event *ev,
|
||||
void *cookie);
|
||||
@@ -306,6 +311,24 @@ struct psoc_mc_cp_stats {
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pdev_extd_stats - pdev extd stats
|
||||
* @pdev_id: pdev id
|
||||
* @my_rx_count: What portion of time, as measured by the MAC HW clock was
|
||||
* occupied, by receiving PPDUs addressed to one of the vdevs
|
||||
* within this pdev.
|
||||
* @rx_matched_11ax_msdu_cnt: number of Rx 11ax MSDUs with matching BSS color
|
||||
* counter updated at EOP (end of packet)
|
||||
* @rx_other_11ax_msdu_cnt: number of Rx 11ax MSDUs with other BSS color counter
|
||||
* updated at EOP (end of packet)
|
||||
*/
|
||||
struct pdev_mc_cp_extd_stats {
|
||||
uint32_t pdev_id;
|
||||
uint32_t my_rx_count;
|
||||
uint32_t rx_matched_11ax_msdu_cnt;
|
||||
uint32_t rx_other_11ax_msdu_cnt;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pdev_mc_cp_stats: pdev specific stats
|
||||
* @max_pwr: max tx power for pdev
|
||||
@@ -643,6 +666,9 @@ struct peer_stats_info_ext_event {
|
||||
* struct stats_event - parameters populated by stats event
|
||||
* @num_pdev_stats: num pdev stats
|
||||
* @pdev_stats: if populated array indicating pdev stats (index = pdev_id)
|
||||
* @num_pdev_extd_stats: num pdev extended stats
|
||||
* @pdev_extd_stats: if populated array indicating pdev extended stats
|
||||
* (index = pdev_id)
|
||||
* @num_peer_stats: num peer stats
|
||||
* @peer_stats: if populated array indicating peer stats
|
||||
* @peer_adv_stats: if populated, indicates peer adv (extd2) stats
|
||||
@@ -667,6 +693,8 @@ struct peer_stats_info_ext_event {
|
||||
struct stats_event {
|
||||
uint32_t num_pdev_stats;
|
||||
struct pdev_mc_cp_stats *pdev_stats;
|
||||
uint32_t num_pdev_extd_stats;
|
||||
struct pdev_mc_cp_extd_stats *pdev_extd_stats;
|
||||
uint32_t num_peer_stats;
|
||||
struct peer_mc_cp_stats *peer_stats;
|
||||
uint32_t num_peer_adv_stats;
|
||||
|
@@ -709,8 +709,10 @@ tgt_mc_cp_stats_extract_congestion_stats(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t i, index;
|
||||
struct request_info last_req = {0};
|
||||
struct medium_assess_data data[WLAN_UMAC_MAX_RP_PID] = { {0} };
|
||||
bool is_last_event = tgt_mc_cp_stats_is_last_event(ev,
|
||||
TYPE_CONGESTION_STATS);
|
||||
|
||||
if (!ev->num_pdev_stats) {
|
||||
if (!(ev->num_pdev_stats || ev->num_pdev_extd_stats)) {
|
||||
cp_stats_err("no congestion sta for pdev");
|
||||
return;
|
||||
}
|
||||
@@ -730,14 +732,26 @@ tgt_mc_cp_stats_extract_congestion_stats(struct wlan_objmgr_psoc *psoc,
|
||||
cp_stats_err("part1 pdev id error");
|
||||
continue;
|
||||
}
|
||||
data[index].part1_valid = 1;
|
||||
data[index].part1_valid = true;
|
||||
data[index].cycle_count = ev->pdev_stats[i].cycle_count;
|
||||
data[index].rx_clear_count = ev->pdev_stats[i].rx_clear_count;
|
||||
data[index].tx_frame_count = ev->pdev_stats[i].tx_frame_count;
|
||||
}
|
||||
|
||||
for (i = 0; (i < ev->num_pdev_extd_stats) && (i < WLAN_UMAC_MAX_RP_PID);
|
||||
i++){
|
||||
index = ev->pdev_extd_stats[i].pdev_id;
|
||||
if (index >= WLAN_UMAC_MAX_RP_PID) {
|
||||
cp_stats_err("part2 pdev id error");
|
||||
continue;
|
||||
}
|
||||
data[index].part2_valid = true;
|
||||
data[index].my_rx_count = ev->pdev_extd_stats[i].my_rx_count;
|
||||
}
|
||||
|
||||
if (last_req.u.congestion_notif_cb)
|
||||
last_req.u.congestion_notif_cb(last_req.vdev_id, data);
|
||||
last_req.u.congestion_notif_cb(last_req.vdev_id, data,
|
||||
is_last_event);
|
||||
|
||||
}
|
||||
#else
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -944,6 +945,7 @@ void ucfg_mc_cp_stats_free_stats_resources(struct stats_event *ev)
|
||||
return;
|
||||
|
||||
qdf_mem_free(ev->pdev_stats);
|
||||
qdf_mem_free(ev->pdev_extd_stats);
|
||||
qdf_mem_free(ev->peer_adv_stats);
|
||||
qdf_mem_free(ev->peer_stats);
|
||||
qdf_mem_free(ev->cca_stats);
|
||||
|
Reference in New Issue
Block a user