mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacmn: Complete stats request on receiving last event
When driver requests for stats to FW, FW sends response with all the requested stats, in this case if the FW buffer gets filled it sends the remaining stats in next event and FW keeps sending the stats event until it sends all the requested stats. FW sets is_last_event field in the response event if the event is the last event for the requested stats. Currently driver is parsing only first event and completing the request from all these events and not checking the last event bit when it requests for peer stats because of which some of the stats are getting dropped. To avoid above issue, add a logic to check the last event bit set by FW and complete the request only if FW sets the last event bit in the response event. Change-Id: Ia3a2f2b4960579ac67bbf1354755af9c2098975a CRs-Fixed: 2470910
This commit is contained in:
parent
1a39da4d04
commit
5255c99b43
1 changed files with 19 additions and 9 deletions
|
|
@ -31,6 +31,20 @@
|
|||
#include <wlan_cp_stats_utils_api.h>
|
||||
#include "../../core/src/wlan_cp_stats_defs.h"
|
||||
|
||||
static bool tgt_mc_cp_stats_is_last_event(struct stats_event *ev)
|
||||
{
|
||||
bool is_last_event;
|
||||
|
||||
if (IS_MSB_SET(ev->last_event)) {
|
||||
is_last_event = IS_LSB_SET(ev->last_event);
|
||||
cp_stats_debug("is_last_event %d", is_last_event);
|
||||
} else {
|
||||
cp_stats_debug("FW does not support last event bit");
|
||||
is_last_event = !!ev->peer_stats;
|
||||
}
|
||||
return is_last_event;
|
||||
}
|
||||
|
||||
void tgt_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
{
|
||||
rx_ops->cp_stats_rx_ops.process_stats_event =
|
||||
|
|
@ -520,8 +534,10 @@ complete:
|
|||
return;
|
||||
|
||||
tgt_mc_cp_stats_extract_peer_extd_stats(psoc, ev);
|
||||
tgt_mc_cp_stats_prepare_raw_peer_rssi(psoc, &last_req);
|
||||
ucfg_mc_cp_stats_reset_pending_req(psoc, TYPE_PEER_STATS);
|
||||
if (tgt_mc_cp_stats_is_last_event(ev)) {
|
||||
tgt_mc_cp_stats_prepare_raw_peer_rssi(psoc, &last_req);
|
||||
ucfg_mc_cp_stats_reset_pending_req(psoc, TYPE_PEER_STATS);
|
||||
}
|
||||
}
|
||||
|
||||
static void tgt_mc_cp_stats_extract_cca_stats(struct wlan_objmgr_psoc *psoc,
|
||||
|
|
@ -804,14 +820,8 @@ static void tgt_mc_cp_stats_extract_station_stats(
|
|||
struct stats_event *ev)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
bool is_last_event;
|
||||
struct request_info last_req = {0};
|
||||
|
||||
if (IS_MSB_SET(ev->last_event))
|
||||
is_last_event = IS_LSB_SET(ev->last_event);
|
||||
else
|
||||
is_last_event = !!ev->peer_stats;
|
||||
|
||||
status = ucfg_mc_cp_stats_get_pending_req(psoc,
|
||||
TYPE_STATION_STATS,
|
||||
&last_req);
|
||||
|
|
@ -829,7 +839,7 @@ static void tgt_mc_cp_stats_extract_station_stats(
|
|||
* PEER stats are the last stats sent for get_station statistics.
|
||||
* reset type_map bit for station stats .
|
||||
*/
|
||||
if (is_last_event) {
|
||||
if (tgt_mc_cp_stats_is_last_event(ev)) {
|
||||
tgt_mc_cp_stats_prepare_n_send_raw_station_stats(psoc,
|
||||
&last_req);
|
||||
ucfg_mc_cp_stats_reset_pending_req(psoc, TYPE_STATION_STATS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue