mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: For pdev stats return last event as true for older firmware
In case of latest firmware, there can be multiple pdev stats events received and last_bit is set in the pdev stats to indicate this is a last pdev stats event to be sent from the firmware to host. In case of older firmware the last bit will not be set and host waits for the peer stats event to be the last event, generally for pdev specific stats request the peer stats will not be sent resulting in the timeout for the pdev specific stats. So, if the last_bit in the stats is not present return true when queried for last event. Change-Id: I264428edba01285fdab4c109a9051b350063d74f CRs-Fixed: 2509093
This commit is contained in:
parent
07df14c270
commit
9447e47cbb
1 changed files with 12 additions and 6 deletions
|
|
@ -31,7 +31,8 @@
|
|||
#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)
|
||||
static bool tgt_mc_cp_stats_is_last_event(struct stats_event *ev,
|
||||
enum stats_req_type stats_type)
|
||||
{
|
||||
bool is_last_event;
|
||||
|
||||
|
|
@ -39,8 +40,13 @@ static bool tgt_mc_cp_stats_is_last_event(struct stats_event *ev)
|
|||
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;
|
||||
if (stats_type == TYPE_CONNECTION_TX_POWER) {
|
||||
cp_stats_debug("FW does not support last event bit");
|
||||
is_last_event = true;
|
||||
} else {
|
||||
cp_stats_debug("FW does not support last event bit");
|
||||
is_last_event = !!ev->peer_stats;
|
||||
}
|
||||
}
|
||||
return is_last_event;
|
||||
}
|
||||
|
|
@ -113,7 +119,7 @@ static void tgt_mc_cp_stats_extract_tx_power(struct wlan_objmgr_psoc *psoc,
|
|||
if (is_station_stats)
|
||||
goto end;
|
||||
|
||||
if (tgt_mc_cp_stats_is_last_event(ev)) {
|
||||
if (tgt_mc_cp_stats_is_last_event(ev, TYPE_CONNECTION_TX_POWER)) {
|
||||
ucfg_mc_cp_stats_reset_pending_req(psoc,
|
||||
TYPE_CONNECTION_TX_POWER);
|
||||
if (last_req.u.get_tx_power_cb)
|
||||
|
|
@ -537,7 +543,7 @@ complete:
|
|||
return;
|
||||
|
||||
tgt_mc_cp_stats_extract_peer_extd_stats(psoc, ev);
|
||||
if (tgt_mc_cp_stats_is_last_event(ev)) {
|
||||
if (tgt_mc_cp_stats_is_last_event(ev, TYPE_PEER_STATS)) {
|
||||
tgt_mc_cp_stats_prepare_raw_peer_rssi(psoc, &last_req);
|
||||
ucfg_mc_cp_stats_reset_pending_req(psoc, TYPE_PEER_STATS);
|
||||
}
|
||||
|
|
@ -842,7 +848,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 (tgt_mc_cp_stats_is_last_event(ev)) {
|
||||
if (tgt_mc_cp_stats_is_last_event(ev, TYPE_STATION_STATS)) {
|
||||
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