diff options
| author | Mahesh A Saptasagar <msapta@codeaurora.org> | 2016-09-03 12:59:09 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-09 22:35:32 -0800 |
| commit | d841d01ddfcae1e4917b2151c47181ca92482e52 (patch) | |
| tree | 66ff7ae2a4a4e21cdc91dd6f00c82e8f87d88a9d | |
| parent | f8d31833ea4434800c00dd9ae07537c27a3307b8 (diff) | |
qcacld-3.0: Clear WMM access category stats on disconnect
qcacld-2.0 to qcacld-3.0 propagation
WMM access category stats of old BSS getting added to stats of new BSS
on network switch.
To mitigate this issue, clear WMM access category stats on disconnect.
Change-Id: Icd1ce4ae0595098f95d5534b4b752c5692264fb8
CRs-Fixed: 999832
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 21 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.h | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 6cf2f45642b3..590a9bbb10df 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1674,6 +1674,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, (pAdapter), pAdapter->sessionId); } + wlan_hdd_clear_link_layer_stats(pAdapter); /* Unblock anyone waiting for disconnect to complete */ complete(&pAdapter->disconnect_comp_var); hdd_print_bss_info(pHddStaCtx); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a0874fd14656..b768d9c1013d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14993,6 +14993,27 @@ static int wlan_hdd_cfg80211_set_mon_ch(struct wiphy *wiphy, } /** + * wlan_hdd_clear_link_layer_stats() - clear link layer stats + * @adapter: pointer to adapter + * + * Wrapper function to clear link layer stats. + * return - void + */ +void wlan_hdd_clear_link_layer_stats(hdd_adapter_t *adapter) +{ + tSirLLStatsClearReq link_layer_stats_clear_req; + tHalHandle hal = WLAN_HDD_GET_HAL_CTX(adapter); + + link_layer_stats_clear_req.statsClearReqMask = WIFI_STATS_IFACE_AC; + link_layer_stats_clear_req.stopReq = 0; + link_layer_stats_clear_req.reqId = 1; + link_layer_stats_clear_req.staId = adapter->sessionId; + sme_ll_stats_clear_req(hal, &link_layer_stats_clear_req); + + return; +} + +/** * struct cfg80211_ops - cfg80211_ops * * @add_virtual_intf: Add virtual interface diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 17522489681a..1e88ed9ec57e 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -124,6 +124,12 @@ typedef struct { #if !defined (TDLS_MGMT_VERSION2) #define TDLS_MGMT_VERSION2 0 #endif +#ifdef WLAN_FEATURE_LINK_LAYER_STATS +void wlan_hdd_clear_link_layer_stats(hdd_adapter_t *adapter); +#else +static inline void wlan_hdd_clear_link_layer_stats(hdd_adapter_t *adapter) {} +#endif + #endif #define MAX_CHANNEL (NUM_24GHZ_CHANNELS + NUM_5GHZ_CHANNELS) |
