Commit Graph

50 Commits

Author SHA1 Message Date
Aditya Kodukula
3336cc1673 qcacld-3.0: Cache and tx power as part of cp station stats
In the driver, if CLUB_LL_STATS_AND_GET_STATION feature is
enabled, host requests Link Layer stats and station stats
from firmware periodically using a single WMI command.

Host then sends LL_STATS to userspace and caches station stats
in the adapter. Whenever userspace queries station stats, based
on the sta_stats_cached_timestamp, host returns cached stats
from adapter instead of sending a new WMI request.

The current issue, as part of station stats firmware also sends
connection_tx_power stats, which aren't cached into the adapter.
So, whenever userspace queries get_tx_power via nl commands,
host sends a WMI request to firmware for tx_power leading to
platform wakeups and power impacts.

To resolve this issue, cache the tx_power sent by firmware into
the adapter during station stats and return the cached value to
the user space.

Change-Id: Iaefc5629872431cbc6c24090b1edb6cebdad995a
CRs-Fixed: 3439323
2023-03-29 18:32:42 -07:00
Aditya Kodukula
84325c35fd qcacld-3.0: Refactor mc_cp_station_stats function
Refactor tgt_mc_cp_stats_send_raw_station_stats into
vdev_mc_cp_stats and peer_mc_cp_stats functions to
improve code readability.

Change-Id: I5b313a84f4dd758d0b166940f055153bfae345a6
CRs-Fixed: 3442881
2023-03-25 13:35:48 -07:00
Jeff Johnson
38e0ca8278 qcacld-3.0: Remove tgt_send_cp_big_data_stats_req() prototype
The tgt_send_cp_big_data_stats_req() prototype was added by:
  qcacld-3.0: Add support for big data stats
  Change-Id I3642035d9f25237c80b529da78c51bb1ccf0035a

However a function with that name is not actually present. Instead,
the struct wlan_lmac_if_cp_stats_tx_ops::send_req_big_data_stats()
function pointer is used to send the request.

Since the prototype is unused, remove it.

Change-Id: I1a05c40d2ae639e4b6333362661e9012786a467c
CRs-Fixed: 3430267
2023-03-16 03:10:51 -07:00
Aditya Kodukula
37ad7204d2 qcacld-3.0: Update link peer mac address for mlo stats
Currently in the driver as part of ML unified_ll_get_sta stats,
the peer mac address for partner link is not being updated in
the callback function, causing driver to report incorrect
stats to upper layers.

To fix this issue, update peer mac address before invoking
vdev station stats callback function.

Change-Id: I39c460467a3572aad05e4c5fab136a844b753941
CRs-Fixed: 3421153
2023-03-07 19:46:39 -08:00
Sachin Ahuja
6b6b2f4fde qcacld-3.0: Initialize sap max number of peers
Currently callers are calling the wlan_mlme_get_sap_max_peers() API
to get the max number of peers without initializing the output
parameter.
In case of failure in wlan_mlme_get_sap_max_peers() API,
sap_max_num_peers can have uninitialized value which can lead to
undefined behavior.

To fix this issue, initialize the output parameter before calling
wlan_mlme_get_sap_max_peers()

CRs-Fixed: 3337315
Change-Id: I83ecaf80ccee7d92a66fe561c0a1a7bd409fd64c
2022-11-23 10:52:26 -08:00
Jeff Johnson
08bc9bb30a qcacld-3.0: Fix cp_stats documentation
The kernel-doc script identified several documentation issues in
the cp_stats component, so fix them.

Change-Id: I33e42894365048b75a23f1a2070de72a975d456f
CRs-Fixed: 3340094
2022-11-19 01:03:05 -08:00
Jeff Johnson
eed27391fb qcacld-3.0: components: cp_stats: Fix misspellings
Fix misspellings in components/cp_stats/...

Change-Id: I5b1357e9ed32ad2d2bd0bfd5ad1983ed26c5d536
CRs-Fixed: 3303647
2022-10-03 02:01:04 -07:00
Ashish Kumar Dhanotiya
c8d57a7023 qcacld-3.0: Parse tx and rx packet per MCS from peer extd stats
Based on the new requirement, fw fills the tx packet counts per mcs
and rx packet count per mcs index in the peer extd stats event.
Add logic to parse tx packet count per mcs and rx packet count per mcs
from peer extd stats event.

Change-Id: I4cd8c1ed5dd6942022d9f930f8de0bcbcb679eb5
CRs-Fixed: 3289683
2022-09-16 19:38:41 -07:00
Surabhi Vishnoi
1981726d18 qcacld-3.0: Refactor code to store chan info status in cp_stats
Currently channel info stats are stored in LIM. Refactor
code to store channel info stats in cp stats component.

Change-Id: I2e7219c112e96916d3b73f974dd9803b9c2821c3
CRs-Fixed: 3265722
2022-08-19 01:53:43 -07:00
Paul Zhang
25e3dfc1ee qcacld-3.0: Enhance congestion report
Enhance congestion report by pdev extend stats.

Change-Id: Ica61112f95e6264db5b46db807e1f5df04b26c98
CRs-Fixed: 3234080
2022-08-03 01:34:02 -07:00
Sai Pavan Akhil Remella
46a85a4bfc qcacld-3.0: Fix invalid tx power in iw dev
Host driver rate limits successive get_txpower
calls within 3 seconds, and sends cached stats
from the hdd_stats. However, max_tx_power is
not updated in the hdd_stats. Therefore,
the cached tx power is always 0 dBm.

Also, the hdd_stats would be only updated when
CP stats are received from the firmware for
get_station/dump_station calls. get_station is not
periodically queried for SAP interface from the
framework. Therefore, tx power for SAP interface will
always be 0 even if hdd_stats gets updated.

To fix this, instead of hdd_stats, return the
max tx power from the pdev stats cached on the pdev.

Change-Id: I0c8d8baab790c7344bd8913158f8eda63736474e
CRs-Fixed: 3230649
2022-07-15 02:55:36 -07:00
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
c51cf56c15 qcacld-3.0: Get chain rssi stats per request vdev_id
Currently, the driver gets the last vdev's chain rssi stats
if fw reports more than one vdev's chain rssi stats, it causes
the last one stats overwrites the former one and the last stats
may not be expected for the request vdev.

To resolve this issue, compare the vdev id before getting the
stats.

Change-Id: Ib789d148a010460108ed73b92ef603cf78c1493a
CRs-Fixed: 3212917
2022-06-10 21:50:26 -07:00
Arun Kumar Khandavalli
5e29697d88 qcacld-3.0: Add EHT bitrate support
Add EHT MCS to rate mapping for NSS 1 and NSS 2.

Update TX/RX bitrate for EHT connection depending on current MCS/NSS
configuration.

Change-Id: I0c55beab2c6b9a9609d5a2e454a0c0e8c1312d09
CRs-Fixed: 3181127
2022-06-09 11:42:24 -07:00
Aditya Kodukula
d0abe1c529 qcacld-3.0: Add sanity check for MLO get STA stats
In the current driver implementation, check for ml_vdev_count
before invoking get_station_cb for MLO station stats is missing.

This causes timeout and failure to get station stats.

To resolve this issue, add sanity check for ml_vdev_count
before invoking get_station_cb for MLO station stats.

Change-Id: I2e8fca1b732b1e8638cec6536ea70d2174c287f7
CRs-Fixed: 3209608
2022-05-31 13:17:53 -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
Aditya Kodukula
4fa9c424ee qcacld-3.0: Add support for MLO get_station stats
As part of MLO stats feature, add support to process get_station
stats for all MLO vdevs and store them in the corresponding adapters.

Change-Id: I21034f7769290603f1540c84aed55cc0a39defcf
CRs-Fixed: 3181022
2022-05-14 03:34:55 -07:00
Aditya Kodukula
5e19348a66 qcacld-3.0: Add support for MLO LL_STATS
As part of MLO stats feature, add support to process link layer
stats for all MLO vdevs and store them in the corresponding adapters.

Change-Id: Ia6d731c94eaa3a355a9deae61d07dd06c5d412bd
CRs-Fixed: 3181021
2022-05-14 03:34:50 -07:00
Jianmin Zhu
54740f84b5 qcacld-3.0: Fix assert when handle wakeup event during SSR
In special case, tasklet(ksoftirqd/0) that handle WMI event was stuck
for 4 sec, SSR was triggered for timeout waiting for resume
event from FW during RTPM resume.

During SSR, cp_stats_tx_ops->inc_wake_lock_stats callback was cleared,
later WOW_WAKEUP_HOST_EVENTID was received, callback was executed, assert
happened.

Change-Id: Ib9ae7d61d1b415e9857657725ffd2ae1efd4795c
CRs-Fixed: 3165730
2022-04-05 15:24:16 -07:00
Vulupala Shashank Reddy
5acf8c3e2a qcacld-3.0: Reduce the log level to optimize roam time
Reduce the log level for the frequent acceptable errors
to reduce the roam latencies.

Change-Id: I9f5405025948d160e6fcd65ecca05dce7670ea84
CRs-Fixed: 3150439
2022-03-22 17:00:32 -07: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
Srinivas Girigowda
0737e8caec qcacld-3.0: TWT cfg params initialization
Initialize TWT psoc cfg params with the cfg.ini values.

Change-Id: I326239d4f3f146113871fb3700fa82260988d697
CRs-Fixed: 3085507
2022-02-11 00:21:22 -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
Li Feng
f50a9f03fe qcacld-3.0: Support to deliver mlme event to SON
Support to deliver below mlme event to SON:
MLME_EVENT_VDEV_STATE,
MLME_EVENT_INST_RSSI,
MLME_EVENT_TX_PWR_CHANGE.

Change-Id: I0535d80cea155f5b94abecfa609d34940e57cdd7
CRs-Fixed: 3054810
2021-11-12 08:52:49 -08:00
Srinivas Girigowda
a58817a89b qcacld-3.0: Replace WLAN_ALL_SESSIONS_DIALOG_ID with TWT_ALL_SESSIONS_DIALOG_ID
There are duplicate macros for the same purpose, hence
replace WLAN_ALL_SESSIONS_DIALOG_ID with TWT_ALL_SESSIONS_DIALOG_ID.

Change-Id: I63130869eed8dffcce85fe6a04586592ab3eaca2
CRs-Fixed: 3047686
2021-09-30 15:14:58 -07:00
Deeksha Gupta
3ecfc16c77 qcacld-3.0: Release the peer reference in twt_get_status
In ucfg_twt_get_all_peer_session_params peer reference is
acquired and its not released leading to the reference leak,
leading to vdev destroy timeout.

Release the peer reference to resolve the issue.

Change-Id: I9992376473c30365f15fcdb8e374c856bc169d6b
CRs-Fixed: 3027189
2021-09-02 21:43:52 -07:00
Deeksha Gupta
0bb0c0e680 qcacld-3.0: Print all peer info for SAP TWT get_status
Currently, host prints only one peer info instead of
all peer info as part of oem_ss initiated broadcast
SAP TWT get_status command.

Add a support to print all peer info if oem_ss sends
broadcast SAP TWT get_status command.

Change-Id: I0a617f655b7a5486582cb47a4602b30514ffae88
CRs-Fixed: 2970487
2021-06-30 02:06:57 -07:00
sheenam monga
989e398008 qcacld-3.0: Send BIG DATA stats req to fw based on service cap
Validate fw capability to handle big data command before sending
big data stats request to fw.

Change-Id: Id7df4c3ac36e25761938758472ea9281c174a8c9
CRs-Fixed: 2937523
2021-06-14 06:28:07 -07:00
Rakesh Pillai
b3e1a44d0b qcacld-3.0: Init-Deinit changes for WCN7850
Changes to initialize/deinitalize WCN7850 from HDD layer.

CRs-Fixed: 2888534
Change-Id: Ia9e44f9fe0b4b6977c55c380756af0656203e4f5
2021-06-04 10:43:31 -07:00
Deeksha Gupta
565e6a7d76 qcacld-3.0: Support for TWT SAP get_status query command
Add support for TWT get_status command in SAP

As part of this change, TWT get_status command is supported
if
1. If particular dialog_id and particular mac_addr are
   present
2. If dialog_id = 0 and particular mac_addr are present
3. If no parameter present

Change-Id: I5ce1719da7f9a3988ba6e1f04455a06faf9687c6
CRs-Fixed: 2937999
2021-05-18 08:29:11 -07:00
Paul Zhang
84c234f62f qcacld-3.0: Support congestion report on multiple interfaces
Support congestion report on multiple interfaces

Change-Id: Iff650519c5b0e48ad63bb0a05d1c736ec40b385d
CRs-Fixed: 2832477
2021-04-14 05:34:12 -07:00
Abdul Muqtadeer Ahmed
70ee3f70fd qcacld-3.0: Add new WMI wakeup reason
Add the new WMI wakeup reason “WOW_REASON_FATAL_EVENT_WAKE".

Change-Id: I93b530f78f568fa88cb310c5d78cd950451fc441
CRs-Fixed: 2868523
2021-03-17 18:33:16 -07: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
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
Saket Jha
6599516554 qcacld-3.0: Request fw stats for monitor mode
Periodically request pdev stats from FW to receive channel noise floor
information after monitor vdev has been brought up, based on the band
currently being sniffed. Use the band information as a secondary parameter
when sending periodic request to fw so a single noise floor value is sent
to host. Pass this noise floor information to dp_pdev to be populated in
radiotap header.

Change-Id: I488e4985392cb646ffdee914359fa995dbeb025e
CRs-Fixed: 2833458
2020-12-17 19:38:27 -08:00
Abdul Muqtadeer Ahmed
1eb57fce21 qcacld-3.0: Add new WMI wakeup reason
Add the new WMI wakeup reason “WOW_REASON_LOCAL_DATA_UC_DROP".

Change-Id: Ibae5d98de8e63b03930837de8ce3062fef319718
CRs-Fixed: 2798184
2020-11-09 03:03:09 -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
Min Liu
bdba1fa76d qcacld-3.0: Report congestion to the correct interface
Only report congestion vendor event to the interface that request it.

Change-Id: I3c6d4fca116f65a9ae930d428e45716d544f9806
CRs-Fixed: 2803920
2020-10-26 07:19:23 -07:00
Min Liu
47d4029c67 qcacld-3.0: API to report congestion
API to report congestion to userspace.

Change-Id: I324ae6701dace590daaa2c3f80412d6633cbf8f0
CRs-Fixed: 2766432
2020-10-13 23:18:32 -07:00
Gururaj Pandurangi
fa5234a602 qcacld-3.0: Rate limit cp stats logs
Rate limit cp stats logs to avoid excessive logging

Change-Id: I3506da05a41579f727ce36cffb475f39a9afec68
CRs-Fixed: 2787218
2020-10-01 14:40:43 -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
f375188704 qcacld-3.0: components: 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: I2d776be789df3e83e0c13211844b66d595498829
2020-08-22 16:00:40 -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
Visweswara Tanuku
78df7f106e qcacld-3.0: Extract Peer TWT session parameters
WMI handler is registered for twt_session_stats event.
Upon wmi event twt session parameters are extracted and
cached in peer mc_cp_stats. UMAC APIs are provided to
retrieve TWT session parameters from north bound
interface(hdd) using twt peer's mac_addr/session dialog_id

CRs-Fixed: 2730732
Change-Id: I8ce38ac6be97e844e26e03751c6d6cca981b82b4
2020-08-13 02:09:56 -07:00
Utkarsh Bhatnagar
d7a34e4ce9 qcacld-3.0: Release lock in error condition
Release lock when psoc_mc_stats is NULL in
ucfg_mc_cp_stats_inc_wake_lock_stats API.

Change-Id: Ibf316d848b2e1d0a4189eb4cebac27922ce30dcd
CRs-Fixed: 2702093
2020-06-18 17:21:49 -07:00
Yeshwanth Sriram Guntuka
0bfa34876f qcacld-3.0: Update mc_bc rx pkt count in peer stats
Update multicast and broadcast rx packet count on
receiving wmi update stats event from firmware by
fetching the peer stats from DP layer.

Change-Id: I0befdbe952aa4e773bbe072affaf698819b3a80f
CRs-Fixed: 2709871
2020-06-17 12:14:44 -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
hqu
ff302a9f4a qcacld-3.0: Define void * data members of cp_stats with specific type
Define void * data members of cp_stats with specific type, remove void
pointer usage for part of cp stats code.

Change-Id: Iace37c0a546909b865d5185830a2e02b5b39b7d8
CRs-Fixed: 2492544
2019-07-26 18:21:46 -07:00