qcacld-3.0: Update ll_stats request pending flag properly
In the current driver implementation, host honors LL_STATS request even in disconnected state. But in disconnected state, the ll_stats request pending flag is not updated properly, which results in allowing multiple LL_STATS requests being sent to FW. So, to avoid this issue, update the flag properly. Change-Id: I318455492dc69bd540044b593a405eacdf185ff1 CRs-Fixed: 3339867
Esse commit está contido em:

commit de
Madan Koyyalamudi

pai
1d626b1c87
commit
ae8eee9988
@@ -611,10 +611,10 @@ struct hdd_stats {
|
||||
struct hdd_peer_stats peer_stats;
|
||||
struct hdd_pmf_stats hdd_pmf_stats;
|
||||
struct pmf_bcn_protect_stats bcn_protect_stats;
|
||||
qdf_atomic_t is_ll_stats_req_pending;
|
||||
|
||||
#ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
|
||||
uint32_t sta_stats_cached_timestamp;
|
||||
bool is_ll_stats_req_in_progress;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1468,7 +1468,6 @@ hdd_update_feature_cfg_club_get_sta_in_ll_stats_req(
|
||||
static void
|
||||
hdd_init_get_sta_in_ll_stats_config(struct hdd_adapter *adapter)
|
||||
{
|
||||
adapter->hdd_stats.is_ll_stats_req_in_progress = false;
|
||||
adapter->hdd_stats.sta_stats_cached_timestamp = 0;
|
||||
}
|
||||
#else
|
||||
@@ -6085,6 +6084,7 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
|
||||
adapter->start_time = qdf_system_ticks();
|
||||
adapter->last_time = adapter->start_time;
|
||||
|
||||
qdf_atomic_init(&adapter->hdd_stats.is_ll_stats_req_pending);
|
||||
hdd_init_get_sta_in_ll_stats_config(adapter);
|
||||
|
||||
return adapter;
|
||||
|
@@ -2042,6 +2042,18 @@ static void wlan_hdd_dealloc_ll_stats(void *priv)
|
||||
qdf_list_destroy(&ll_stats_priv->ll_stats_q);
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
wlan_hdd_set_ll_stats_request_pending(struct hdd_adapter *adapter)
|
||||
{
|
||||
if (qdf_atomic_read(&adapter->hdd_stats.is_ll_stats_req_pending)) {
|
||||
hdd_nofl_debug("Previous ll_stats request is in progress");
|
||||
return QDF_STATUS_E_ALREADY;
|
||||
}
|
||||
|
||||
qdf_atomic_set(&adapter->hdd_stats.is_ll_stats_req_pending, 1);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
|
||||
/**
|
||||
* cache_station_stats_cb() - cache_station_stats_cb callback function
|
||||
@@ -2132,12 +2144,6 @@ wlan_hdd_set_station_stats_request_pending(struct hdd_adapter *adapter,
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
if (adapter->hdd_stats.is_ll_stats_req_in_progress) {
|
||||
hdd_err("Previous ll_stats request is in progress");
|
||||
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_STATS_ID);
|
||||
return QDF_STATUS_E_ALREADY;
|
||||
}
|
||||
|
||||
info.cookie = adapter;
|
||||
info.u.get_station_stats_cb = cache_station_stats_cb;
|
||||
info.vdev_id = adapter->vdev_id;
|
||||
@@ -2151,6 +2157,7 @@ wlan_hdd_set_station_stats_request_pending(struct hdd_adapter *adapter,
|
||||
}
|
||||
|
||||
info.pdev_id = wlan_objmgr_pdev_get_pdev_id(wlan_vdev_get_pdev(vdev));
|
||||
|
||||
peer = wlan_objmgr_vdev_try_get_bsspeer(vdev, WLAN_OSIF_STATS_ID);
|
||||
if (!peer) {
|
||||
osif_err("peer is null");
|
||||
@@ -2158,14 +2165,13 @@ wlan_hdd_set_station_stats_request_pending(struct hdd_adapter *adapter,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
adapter->hdd_stats.is_ll_stats_req_in_progress = true;
|
||||
|
||||
qdf_mem_copy(info.peer_mac_addr, peer->macaddr, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
wlan_objmgr_peer_release_ref(peer, WLAN_OSIF_STATS_ID);
|
||||
|
||||
ucfg_mc_cp_stats_set_pending_req(wlan_vdev_get_psoc(vdev),
|
||||
TYPE_STATION_STATS, &info);
|
||||
|
||||
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_STATS_ID);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -2181,8 +2187,6 @@ wlan_hdd_reset_station_stats_request_pending(struct wlan_objmgr_psoc *psoc,
|
||||
if (!adapter->hdd_ctx->is_get_station_clubbed_in_ll_stats_req)
|
||||
return;
|
||||
|
||||
adapter->hdd_stats.is_ll_stats_req_in_progress = false;
|
||||
|
||||
status = ucfg_mc_cp_stats_get_pending_req(psoc, TYPE_STATION_STATS,
|
||||
&last_req);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
@@ -2255,10 +2259,14 @@ static int wlan_hdd_send_ll_stats_req(struct hdd_adapter *adapter,
|
||||
|
||||
hdd_enter_dev(adapter->dev);
|
||||
|
||||
status = wlan_hdd_set_station_stats_request_pending(adapter, req);
|
||||
if (status == QDF_STATUS_E_ALREADY)
|
||||
status = wlan_hdd_set_ll_stats_request_pending(adapter);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return qdf_status_to_os_return(status);
|
||||
|
||||
status = wlan_hdd_set_station_stats_request_pending(adapter, req);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_nofl_debug("Requesting LL_STATS only");
|
||||
|
||||
/*
|
||||
* FW can send radio stats with multiple events and for the first event
|
||||
* host allocates memory in wma and processes the events, there is a
|
||||
@@ -2333,6 +2341,7 @@ static int wlan_hdd_send_ll_stats_req(struct hdd_adapter *adapter,
|
||||
}
|
||||
qdf_list_destroy(&priv->ll_stats_q);
|
||||
exit:
|
||||
qdf_atomic_set(&adapter->hdd_stats.is_ll_stats_req_pending, 0);
|
||||
wlan_hdd_reset_station_stats_request_pending(hdd_ctx->psoc, adapter);
|
||||
hdd_exit();
|
||||
osif_request_put(request);
|
||||
|
Referência em uma nova issue
Block a user