Commit Graph

21 Commits

Author SHA1 Message Date
abhinav kumar
6971eebe61 qcacld-3.0: Process CP stats response while roaming
Scenarios are:
1. Host receives ROAM_START from firmware
2. Host receives EAPOL M1 from AP, host forwarded
   it to supplicant and supplicant buffered it (with
   timer 100 msec) to process it after association
   completion.
3. Host starts processing CP stats request, which
   holds RTNL kernel lock
4. Host starts a CP_STATS_WAIT_TIME_STAT (800 msec)
   timer and sends WMI_REQUEST_STATS_CMDID to FW.
   So cp stats are holding the RTNL lock.
5. In waiting state host/FW completed roaming within
   a few milliseconds. Host Call roamed indication
   to the kernel. Kernel post it to the Work queue
   to indicate this to the supplicant. The Work
   queue requires the RTNL lock to send the
   indication to the supplicant.
6. Now Kernel is waiting on the RTNL lock taken by
   the CP stats request which is waiting for the CP
   stats response (WMI_UPDATE_STATS_EVENTID).
7. Host receives CP stats response but the host is
   unable to handle it with the below reason.
8. Timed out happens for WMI_UPDATE_STATS_EVENTID,
   then Kernel takes RTNL lock to indicate
   association/roam completion status to the
   supplicant.
9. As Kernel is sending association indication
   after CP_STATS_WAIT_TIME_STAT (800 msec), by
   this time supplicant deleted buffered EAPOL
   first frame, this results in DUT failing to
   initiate the 4-WAY handshake.
10. Finally AP sends the Deauthentication frame
    to DUT.

Reason for unable to process CP stats response :
As per the current design, While processing Roaming,
the host deletes the old peer and creates a new peer
for roamed AP. If the Host receives cp stats response
after peer delete due to roaming, the host is unable
to stop waiting for timer CP_STATS_WAIT_TIME_STAT
and fails to release RTNL kernel lock till timeout.
After time out only, Kernel can take RTNL lock to
indicate association/roam completion status to the
supplicant.

Fix is to stop the wait timer CP_STATS_WAIT_TIME_STAT
and release RTNL kernel lock even in case peer has
deleted by HOST for which CP stats request sent.

Change-Id: Ie5b5275da10a06da50b2fbb8ab206b78f2c64d6a
CRs-Fixed: 3234063
2022-07-12 17:18:23 -07:00
Paul Zhang
adc7c05154 qcacld-3.0: Add sanity check when get STA stats
If macro WLAN_FEATURE_11BE_MLO is enable, get_station_stats_cb for
TYPE_STATION_STATS is called only if last_req->ml_vdev_info.ml_vdev_count
none zero when WMI_UPDATE_STATS_EVENTID event comes back.

This causes timeout and fail to get station stats for legacy device or for
MLO device which does not set last_req->ml_vdev_info.ml_vdev_count.

To resolve this issue, add sanity check legacy device before invoking the
callback and set last_req->ml_vdev_info.ml_vdev_count if it is MLO device.

Change-Id: I8ca325482fc32de87cbedcba7d4af17d3876cbbc
CRs-Fixed: 3202588
2022-05-27 18:06:14 -07:00
Zhaoyang Liu
46d2c60297 qcacld-3.0: free allocated memory for failure case
When obtaining twt session traffic statistics,
some allocated memory not freed for failure case.
Fix it to avoid memory leak.

Change-Id: I18ce45467c3600c3f62b23ab50582ecb40ced88d
CRs-Fixed: 3169747
2022-04-11 21:07:53 -07:00
Divyajyothi Goparaju
c2ce55350a qcacld-3.0: Remove peer check from bmiss stats
Currently in station disconnect state, host doesn't request
bmiss stats from firmware.
Remove peer check to get bmiss stats in station disconnect
state also.

Change-Id: I6268f8af7daf7a90f9ae8a5d24ae17256ff3e76c
CRs-Fixed: 3127834
2022-03-07 23:46:02 -08:00
chunquan
6e475e2bff qcacld-3.0: Release serialization cmd when get peer null
In P2P connect process, GO and GC send deauth/disassoc at the
end of WPS. GO send disassoc and free station info. GO receive
deauth from GC, and send cmd WLAN_SER_CMD_GET_DISCONNECT_STATS
to get disconnect stats.

If GO send deauth and free peer info before receive deauth
from GC. Wlan_objmgr_get_peer return null, and peer is null.
Cmd of WLAN_SER_CMD_GET_DISCONNECT_STATS will never be
released since get_peer_rssi_cb will never be called.
And cmd will timeout, which is not expected.

If we call get_peer_rssi_cb without check, cmd will release.
Also csr_get_peer_rssi_cb will check peer is null or not.

Change-Id: I10b496526e259711a4dd7a91b7388ac79bb54fef
CRs-Fixed: 3119513
2022-03-01 10:52:56 -08:00
Divyajyothi Goparaju
df1aa31d4b qcacld-3.0: move wlan_cfg80211_mc_cp_stats.h file from cmn to qcacld
Currently wlan_cfg80211_mc_cp_stats.h file is present at
qca-wifi-host-cmn/cmn/os_if/linux/cp_stats/inc.
With this change, move file to 	qcacld-3.0/os_if/cp_stats/inc
as this file contain MCC specific code.

Change-Id: Ia531094fb15ae86f5afab2b9c3bdde197feaac6c
CRs-Fixed: 3108266
2022-02-01 23:35:31 -08:00
Divyajyothi Goparaju
2b18be53ba qcacld-3.0: Remove repeated memfree
Currently inside wlan_cfg80211_mc_infra_cp_free_bmiss_stats
memfree of cp_stats along with bmiss_cp_stats is present,
again after the wlan_cfg80211_mc_infra_cp_free_bmiss_stats
function repeated memfree of cp_stats is present

Remove cp_stats free from wlan_cfg80211_mc_infra_cp_free_bmiss_stats
function.

Change-Id: I306e06455ef1ac92043ee8412cf1cecd01e9dfbb
CRs-Fixed: 3115379
2022-01-30 11:04:15 -08:00
Divyajyothi Goparaju
df5e68bdef qcacld-3.0: Add support to query BMISS stats from fw
Currently there is no support to read bmiss stats from fw.
With this change, add support to read bmiss stats from fw.

Change-Id: I77594d05fbcd295aff4c625ba5f4f33cbc491063
CRs-Fixed: 3097304
2022-01-03 02:19:36 -08:00
sheenam monga
72c7917fa9 qcacld-3.0: Add support for big data stats
Add support of big data stats in the cpstats
component.

Change-Id: I3642035d9f25237c80b529da78c51bb1ccf0035a
CRs-Fixed: 2868949
2021-03-11 09:48:12 -08:00
Deeksha Gupta
cb6debaf81 qcacld-3.0: Allow only one twt statistics and clear statistics command
Don't allow twt statistics or clear statistics command
if twt statistics or clear statistics is in_progress.

As a Fix, reject the new twt statistic or clear statistic
command till existing twt statistic or clear statistic
command completion.

Change-Id: I710a81ae3409f181689b2e4c9e9d4e583d4aadab
CRs-Fixed: 2870592
2021-03-04 13:04:50 -08:00
Pragaspathi Thilagaraj
f7ee883a96 qcacld-3.0: get wake duration from stored session params
Retrieve the stored TWT wake duration for a session for
to send it as part of get twt statistics response.

Change-Id: If3c23d05331d5dfb43f74f5380e81eaf2799d2e7
CRs-Fixed: 2859812
2021-02-12 16:51:31 -08:00
Rajasekaran Kalidoss
09157aa43a qcacld-3.0: Add support for TWT clear statistics
Add support to send TWT clear statistics request
to firmware.

Change-Id: I435b743955d44a02235b92f98beb302a6a21f036
CRs-Fixed: 2855624
2021-01-23 04:48:36 -08:00
Rajasekaran Kalidoss
744ae542a0 qcacld-3.0: Add support for ctrl path stats infrastructure
Implement support for sending new control path stats
infrastructure via WMI_REQUEST_CTRL_PATH_STATS_CMDID and
WMI_CTRL_PATH_STATS_EVENTID in cp stats component. Also add
support for TWT Get statistics through this new method.

Change-Id: I62b3a525cde797cd5b809ca9e8e6c91d5651c6b4
CRs-Fixed: 2851016
2021-01-21 23:23:43 -08:00
Pragaspapthi Thilagaraj
dd019ef5ed qcacld-3.0: Reduce excessive kmsg logging in roaming path
Reduce excessive logging for roaming path to reduce latency.
Also remove function and line prints in roam debug related
logging.

Change-Id: Ida6fc55886c944126720f8bdd4b944765426ccc6
CRs-Fixed: 2847773
2021-01-08 04:08:45 -08:00
Will Huang
bb1e3c8933 qcacld-3.0: Fix get sap connected sta info fcs counter always 0
Stats event from target might have several sub events, and some event
has no peer stats but have adv/ext2 peer stats.

Check ext/ext2 peer stats even no peer stats in
target_if_cp_stats_extract_peer_stats(). Fix copy adv stats size error
in tgt_mc_cp_stats_prepare_n_send_raw_station_stats(). Although
get_station_stats_cb and get_peer_stats_cb is union callbacks,
better to assign to get_station_stats_cb because it is for
TYPE_STATION_STATS.

Change-Id: I0bead0cbb8b549cc538ef4a7327f0a8303c90bd1
CRs-Fixed: 2801842
2020-10-29 04:53:52 -07:00
Deeksha Gupta
0eebd68a1e qcacld-3.0: Change the vendor attributes name in wake lock stats
Wake lock stats vendor command attribute names
in the driver are different from the attribute
names in upstream qca-vendor.h.

Change the wake lock stats attributes name in driver.

Change-Id: If9dbd46482f2f65758ea90aebdd078c1a30d5bef
CRs-Fixed: 2789539
2020-10-15 23:51:54 -07:00
Min Liu
8f903508a1 qcacld-3.0: Fix get peer statistics failure
Fix the following regression issues which will cause get peer
statistics failure:

- Number of peer statistics is not updated in the callback
- Sta info reference count is not released
- Incorrect nla len

Change-Id: Ia7cdf28324402fd647a6d4e80b27612ccabb32f2
CRs-Fixed: 2785764
2020-10-12 02:32:04 -07:00
Abhishek Ambure
8c579f5a5b qcacld-3.0: Add support to get pmf bcn protect stats
Host sets WMI_REQUEST_PMF_BCN_PROTECT_STAT bit in stats_id param of
WMI_REQUEST_STATS_CMDID command. Firmware supporting pmf beacon
protection stats responds host with stats in wmi_update_stats_id
event. Host extracts PMF beacon protection stats from wmi_update_stats_id
event. Host adds PMF beacon protection stats in the response of vendor
command QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO for STA mode.

Change-Id: Ib3cb06e03dbccdb9fa1782d414ed734bd97aa309
CRs-Fixed: 2705236
2020-09-12 01:59:34 -07:00
Srinivas Girigowda
40c4c9bff8 qcacld-3.0: os_if: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: Ib186841ca387ccc84584864286681c23e3b34756
2020-08-22 16:00:12 -07:00
Min Liu
f7d6bc2675 qcacld-3.0: Move get_peer_info into cp_stats component
Move WMI_REQUEST_PEER_STATS_INFO_CMDID related statistics into
cp_stats component.

Change-Id: I636221b0bc0e28180c97cd269440a7c733716a1d
CRs-Fixed: 2680618
2020-08-14 04:12:10 -07:00
gaurank kathpalia
70b68f8075 qcacld-3.0: MCL specific movement from cmn to cld of stats
Move the MCL specific files related to cp stats from the
cmn to cld folder.

Change-Id: I00ce5d650780f9b74c64923c8392f06222e651a5
CRs-fixed: 2552458
2020-04-17 07:36:07 -07:00