Commit Graph

13254 Commits

Author SHA1 Message Date
Shashikala Prabhu
b2f8ff4e7f qcacmn: Add support for multiple vdev set param WMI API
Add support for multi vdev set param WMI API to send vdev param for
multiple vaps.

Change-Id: If7381f0b242cacff0817e6bdc16606d3d776b48d
CRs-Fixed: 2994278
2021-07-30 11:46:48 -07:00
Amit Mehta
58023bfff8 qcacmn: Compilation issue fix
Fix for compilation error unknown type name 'htt_tlv_hdr_t'

Change-Id: I8d01d6f2059599b34539b7d254fa90a98ef3a8d3
CRs-Fixed: 3003861
2021-07-30 07:12:24 -07:00
Sumedh Baikady
18ff74028c qcacmn: Add CE ring cleanup in hal
Cleanup hal srng for CE rings upon CE ring
cleanup.

Change-Id: I6d52ee1b83c23d74d88a1aca8a7eab2c5a0d186a
2021-07-30 07:12:19 -07:00
Jingxiang Ge
0f98450843 qcacmn: Replace RET_IP with rtpm_dbgid for runtime pm api
Current it use __RET_IP to get caller in rtpm resume
function, if it print info by %ps, it will do a
symbol lookup which takes time.

Change as replacing __RET_IP with rtpm_dbgid, so it is
still able to get caller information and avoid time
cost here.

Change-Id: Ifc70c118d621bb9e6d12de87582de09316ae9cad
CRs-Fixed: 3001690
2021-07-30 04:04:50 -07:00
Jinwei Chen
9008f98623 qcacmn: disable WBM2SW1 HW cookie conversion
Disable WBM2SW1 HW cookie conversion as this ring is for FW usage,
FW does not expect HW cookie conversion for ring descriptor.

Change-Id: Ic4e813a21c6bb0f89d56581941e3c7ab8e3cad54
CRs-Fixed: 2994029
2021-07-29 11:49:55 -07:00
Venkateswara Swamy Bandaru
ed74f5b410 qcacmn: EHT capability changes for D1.0
Add storage for EHT mac and phy capabilities as
per 11be D1.0 and update the EHT mac and phy capability
sizes.

Change-Id: I67224b35b701235374772e9975375e695f3ed959
CRs-Fixed: 3000166
2021-07-29 00:08:07 -07:00
Bapiraju Alla
e95a45c0f7 qcacmn: Update vdev mlme MAC address based on connection type
Management frames from STA should carry SA as link MAC address for ML
connection and net device address for non-ML connection.

To achieve this, update vdev mlme MAC address to link MAC address for
ML connection and to net dev MAC address for non-ML connection.

Change-Id: I2285a43882039dfc706fbf73a494cc09bcba19c7
CRs-Fixed: 2993031
2021-07-28 19:02:38 -07:00
Aditya Kodukula
6a5a2ec74a qcacmn: Remove %ps from wakeup_irq_handler
%ps does symbol table lookup in kernel and if used in irq context,
it can lead to irq_handler running for longer time, and jank issues
as a side effect. So, remove it from wakeup_irq_handler.

Change-Id: Ifa42d9a46c838c2458d3220c6d3cb008232e3839
CRs-Fixed: 2999176
2021-07-28 19:02:33 -07:00
Abdul Muqtadeer Ahmed
f284efa6f8 qcacmn: Refactor the hif_latency detection code based on the bitmap
Based on the bitmap whether the issue is because of the
HIF_DETECT_TASKLET or HIF_DETECT_CREDIT, the hif_latency detection
code needs to be refactor to different functions so that it will
help parsing tools to find the reason of crash.

Change-Id: I2d8a83493354dfbd1c484cb7727018ddeb14c158
CRs-Fixed: 2929736
2021-07-28 06:39:06 -07:00
Lincoln Tran
a4102c7377 qcacmn: Validate bonded chan ptr before dereferencing
In reg_get_5g_bonded_chan_array_for_freq, check if bonded channel
pointer is valid before dereferencing. This will help prevent potential
crash when the pointer is invalid. Also, add debug prints to allow
easier detection of issue.

Change-Id: I2891204101cd3b256ecc90d44f76c6fbb6d450b7
CRs-fixed: 2992744
2021-07-28 04:30:38 -07:00
Wu Gao
f591372ab1 qcacmn: Get secondary 80 channel freq for 6G spectral scan
When start spectral scan on 160Mhz, MCC platform failed to get center
freq2 by target_if_vdev_get_chan_freq_seg2. Since it doesn't register
related callback. Solution is using default API to get secondary 80
channel freq if vdev_get_chan_freq_seg2 is NULL.

Change-Id: I81f98700bab2f1c4bba12bd65b72092d69014a1c
CRs-Fixed: 2996322
2021-07-27 17:27:21 -07:00
Santosh Anbu
1c91398f51 qcacmn: Fix event dispatch for MLO_SYNC_WAIT
Add count to hold number of vdevs in a MLD link and fix sending
WLAN_VDEV_SM_EV_MLO_SYNC_COMPLETE in sync context to vdev SM.

Change-Id: Ie07c3e541ed5926ac08ae5a9d50e4365fefb1d52
CRs-Fixed: 2982475
2021-07-27 14:34:24 -07:00
Karthik Kantamneni
e2c4542bac qcacmn: Optimize EP request/release vote wait logic
Currently sleep based wait is used for checking EP request/release
vote is taken effect or not. But once worker thread goes to sleep
it is taking in order of milli seconds to schedule back worker thread
this scheduling delay is causing srng HP/TP writes to be updated in
delayed manner.

To avoid this first try checking EP vote is taken affect by busy wait
then go for sleep based method.

Change-Id: I72e81941a23752a41c9b5307e82c2e971aee1ec8
CRs-Fixed: 2999541
2021-07-27 09:24:29 -07:00
Vivek
f4b29f3ad5 qcacmn: Use file for include path instead of environment variable
The include path passed to the CFLAGS may get very long in few cases
and passing them to the compiler results in the error
"arguments too long" from the shell.

We can pass the same argument by writing the include paths
to a file and avoid these errors when there are many include
paths added.

Change-Id: I2788d6e97a854ae6272d665943d56d581dc002bf
CRs-Fixed: 2999763
2021-07-27 07:07:11 -07:00
Ananya Gupta
f2851b458b qcacmn: Affine rx_err srng to all CPUs except 0
IPA and rx_err ring are processed in same CPU resulting
in low Tput.
To fix this, not allow processing of rx_err ring in
CPU 0

Change-Id: Id53a03c9290607beb1a595c84bfb0fd8d9f5d105
CRs-Fixed: 2949569
2021-07-27 01:00:14 -07:00
Balaganapathy Palanisamy
96fec42073 qcacmn: Add SON ops structure definitions
Move SON Tx operations structure definition to lmac interface.
Add SON Rx operations structure.

CRs-Fixed: 2987042
Change-Id: Ice7c0dc81a60627f3d26897646b754780e498d6e
2021-07-26 16:47:47 -07:00
Vivek
bc5590deaf qcacmn: Use meta table information to print INI values
The current CFG/INI code prints the cfg values by expanding
all the current INI items in the same function causing the
function size to increase substantially.

Use the CFG/INI meta table to iterate over the INI items
and print the INI values.

Change-Id: I79ff6023263bfe98bfd614c74b1fff0f6ee78fe0
CRs-Fixed: 2994756
2021-07-26 13:54:19 -07:00
Vivek
f8167f4dbc qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which is
used by the supplicant to allocate memory.

In those situations, we should pass the allocation flags based on
the context in which the response is sent.

Send the response with the right allocation flags to the supplicant.

Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1
CRs-Fixed: 2987552
2021-07-26 13:54:14 -07:00
Abhijit Pradhan
5ee593e754 qcacmn: Create AFC partial request information in Regulatory
The AFC server sends an AFC response after processing the AFC request.
The AFC Request has a set of request objects: Location,Request ID,
Frequency ranges, Global operating classes, Minimum desired power etc.

The Request ID is generated by FW/target and is sent to HOST
regulatory via the AFC START/RENEW WMI event. On receiving the event,
the HOST creates a partial AFC request by filling frequency ranges,
Global operating classes and minimum desired power. The partial
request is then sent to MLME and finally to AFC application.
The request is called partial because the Device Description and
Location Information are not known to regulatory and not filled in by
the regulatory. They are filled in to create the final AFC request by
the AFC application.

Change-Id: Ia0676c03cef9c7b010762326e535477beefe36ac
CRs-Fixed: 2997956
2021-07-26 11:35:35 -07:00
Kiran Kumar Lokere
900bd16b58 qcacmn: QCA vendor attribute to configure BSS max idle support
Add new QCA vendor attribute to configure the driver to enable/disable
the BSS max idle period support. This attribute is used for testing
purposes.

Change-Id: Ib63c81e34344e637b638638b1da323102c66d906
CRs-Fixed: 2994951
2021-07-26 09:14:27 -07:00
Kiran Kumar Lokere
8917a00d40 qcacmn: QCA vendor attribute to use BSSID in Probe Request frame RA
Add a QCA vendor attribute to configure the driver to use scan
request BSSID value in Probe Request frame RA(A1) for scan.
This attribute is used for testing purpose.

The driver saves this configuration and applies this setting to all
user space scan requests until the setting is cleared. If this
configuration is set, the driver uses the BSSID value from the scan
request to set the RA(A1) in the Probe Request frames during the scan,
else the broadcast address is set in the Probe Request frames RA(A1).

Change-Id: I0b26fde5f631e99f3e6d0ecf52918cd49d0153c7
CRs-Fixed: 2994935
2021-07-26 09:14:22 -07:00
Balaganapathy Palanisamy
71d4ce6cb0 qcacmn: Add support to get free descriptor pool size
Add a function in cdp to get free descriptor pool size.

CRs-Fixed: 2984773
Change-Id: Iac5aca801255e5ba5460ea09c88fc4573c1a7055
2021-07-26 06:55:34 -07:00
Kani M
7438cab313 qcacmn: Fix for the order of ol_getpn
Ideally, the validation of keys have to be done before
ol_getpn() is called to make sure the correct keys are
fetched and to avoid default key values being set.
Earlier, the key validation was done after ol_getpn()
function was called. This change reorders the ol_getpn()
to be called after the key validation.

Change-Id: I5be95b66b19228e2e9d1bca808b294a6b9b01935
2021-07-26 03:46:48 -07:00
Vevek Venkatesan
9f5cc5aae8 qcacmn: refer system time for pld_is_pci_ep_awake timeout
Currently timeout for checking pld_is_pci_ep_awake in
hif_prevent_link_low_power_states might be higher than
the defined timeout depends on how long qdf_sleep takes
to get scheduled again, so avoid this uncertain timeout
adding reference to the system time.

Change-Id: I67a28d46c996ccc56680cf8e20c09a70729a33c5
CRs-Fixed: 2994746
2021-07-26 01:39:38 -07:00
Huashan Qu
3c98d7456d qcacmn: Use seperate event for HO/roaming disconnect for old AP
Use seperate event for HO/roaming disconnect for old AP, as
if a disconnect is received during roaming, the state is moved
to disconnect and thus WLAN_CM_SM_EV_DISCONNECT_DONE is handled
as a normal disconnect and does not clean up the roaming
contexts in VDEV and peer.

Change-Id: I10e616be435b16e1cff6666940171fef6b2b4065
CRs-Fixed: 2994558
2021-07-24 05:19:02 -07:00
wadesong
abdd65099c qcacmn: Limit log verboseness of some chan change code
The log output will be too verbose when the following scenario
is hit:

 1) hostapd is started on chan 149 with cc=US
 2) ref-sta connects to sap
 3) ping -i 0.01 to ref-sta from dut
 4) set cc=JP on dut

and the verbose log output will result in a wlan scheduler
watchdog bite on some platforms.

Use rate limited versions of log outputting api to avoid the
instabilities brought by this.

Change-Id: Id87d81070334aab145bae6909857fd5d2851008a
CRs-Fixed: 2868738
2021-07-23 22:36:29 -07:00
Nandha Kishore Easwaran
b82dd5554f qcacmn: Add 4.9 ghz frequency for scan command
Add 4.9 ghz frequency check also in scan command. This change
is needed so that scan entry is formed and association happens in 4.9ghz.

Change-Id: I2fbf719ea6a5e747e07a5973a2da3d2ca2d11b7b
2021-07-23 20:17:29 -07:00
Linux Build Service Account
45988d32cc Merge "qcacmn: Provide free_buff to SON using WDI event" 2021-07-23 05:10:23 -07:00
Linux Build Service Account
cec19bb17c Merge "qcacmn: Add API to set mlo context at umac global object" 2021-07-23 05:10:22 -07:00
Linux Build Service Account
c8b371848e Merge "qcacmn: Fix assert for flush rx ptk when vdev deleted" 2021-07-23 05:10:22 -07:00
Neha Bisht
5e326b7934 qcacmn: Provide free_buff to SON using WDI event
Provide free_buff to SON using WDI event. It is applicable only for
pre-lithium case.

Change-Id: I14fa956b06cf2d27982964865bc235f8d796d55c
2021-07-23 01:55:35 -07:00
Santosh Anbu
34be27c9fb qcacmn: Add API to set mlo context at umac global object
Replace global mlo manager context variable with the mlo_mgr context
already defined at global umac object.
Add API to set mlo context at umac global object.

Change-Id: Iad8d534b761aa93e124a721d3d6e01a81ef69b15
2021-07-22 23:38:34 -07:00
Jianmin Zhu
8008ac5bac qcacmn: Fix assert for flush rx ptk when vdev deleted
When vdev deleted and interface down, there are pending pkts in nbuf
queue of dp rx thread in cornel cases, when flush cmd comes, even vdev
is not found by vdev id, rx stack callback isn't set to NULL, pkts are
still delivered to kernel stack, but rx queue is invalid now, assert
will happen when GRO flush happens.
Fix by setting rx stack callback as NULL when vdev isn't found by vdev
id.

Change-Id: Iad3b71dbc86563a4f8b5369474b2a901cdf8b325
CRs-Fixed: 2995694
2021-07-22 23:38:30 -07:00
Karthik Kantamneni
7bf43ce817 qcacmn: Wait till EP vote is released after reg work completion
After reg work is complete there is possiblity EP vote reset
request still not processed by F.W. So wait till EP vote reset
is done after reg work completion.

Change-Id: I1f4e318ac96ba3a15c613c5faf5095d4be7c8e99
CRs-Fixed: 2994233
2021-07-22 12:53:20 -07:00
Karthik Kantamneni
b7e633e910 qcacmn: Add api to set intermediate EP vote access
Add api to set intermediate EP vote access state.
Make sure reg work handler is complete before setting
intermediate vote access.

Change-Id: Ib229d9af8b1e58505a9ae5fbf39aa912ca21a3c3
CRs-Fixed: 2994040
2021-07-22 12:53:16 -07:00
Linux Build Service Account
a2402e5cc9 Merge "qcacmn: Add an api to check if frame has SON repeater IE" 2021-07-22 11:42:00 -07:00
Linux Build Service Account
06312dc0bf Merge "qcacmn: Fix potential NULL pointer access in qdf_ini_parse()" 2021-07-22 11:41:59 -07:00
Neha Bisht
7aa5b3ebb7 qcacmn: Add an api to check if frame has SON repeater IE
Add an api to check if received frame has SON repeater IE or not.

Change-Id: Id89bfbc5dd555d58673e390e3e093e0da75b6d63
2021-07-22 09:50:10 -07:00
Jianmin Zhu
9975a180cf qcacmn: Mark vdev as delete in process before rx flush
Mark vdev as delete in process after flush out the packets in rx thread
queue currently.
If rx packet received after flush and before mark vdev as delete in
process, the packet is enqueued into rx thread queue and not flushed after
vdev deleted physically and net interface down. After that, if flush
pkts after interface down, assert will happen.

Fix:
Mark vdev as delete in process before flush out the packets in the rx
thread queues.
If the vdev is marked as delete in progress, then the
packets received on that particular vdev should not be
enqueued to dp rx thread any more.

Change-Id: If651a9e97b8501efc26400079194570ba6407f13
CRs-Fixed: 2996534
2021-07-21 21:09:00 -07:00
Shashikala Prabhu
3925ddf85b qcacmn: Add WMI MLO params for CSA beacon template
A new TLV is added to send partner link CSA/ECSA count offset to FW as
part of beacon template. Add WMI changes to populate these TLVs in the
beacon template send function.

To fix the compilation issue, added forward declaration of 'struct
vdev_mlme_obj' and removed 'include/wlan_vdev_mlme.h' include file from
wlan_mlo_mgr_public_structs.h.

Change-Id: I6e421b29bb887bec711a23db1458aca4d112ade4
CRs-Fixed: 2983249
2021-07-21 21:08:55 -07:00
Jia Ding
9304c2d00e qcacmn: Add support to calculate uplink delay
Add support to calculate uplink delay on a per vdev basis.
The delay calculated excludes bus delays, where packet
enqueueing time and complete time are fetched from HW release
ring.

Change-Id: I4bbcbf28b197f7a87cb822a841f1f957ebcf063b
CRs-Fixed: 2958833
2021-07-21 21:08:48 -07:00
Abhijit Pradhan
0e0afa5c4c qcacmn: Convert psd to EIRP for a given bandwidth
Convert PSD+BW to EIRP using the following formula
EIRP = PSD + 10 * log10(BW)

Since all the variables are integers, there are some
roundoff/truncation errors.

Change-Id: Ia98b97f4cfe47dcd94bfa54f3dd7be13c8696532
CRs-Fixed: 2995322
2021-07-21 17:15:05 -07:00
Abhijit Pradhan
987106e191 qcacmn: Get ap master and afc chan list
For various channel power calculations and comparisons,
the AP masters channels and afc channellists are needed.
Add APIs to get them.

Change-Id: Iff89c8aa402e786f5a1502c0e5b0b948e9a5d33c
CRs-Fixed: 2995322
2021-07-21 17:15:01 -07:00
Vivek
3853650e2e qcacmn: Add new MBSS framework component
Add a new component for MBSS framework in object manager.

Add a new trace module for the new MBSS component framework.

Change-Id: I7ef3559d90a6bc7f558e3994a1a91f09985d90e9
CRs-Fixed: 2958764
2021-07-21 17:14:56 -07:00
Venkateswara Swamy Bandaru
e52a974af4 qcacmn: Remove util_scan_scm_chan_to_band API
Remove util_scan_scm_chan_to_band API is this wont work for
6G band.

Change-Id: I52fe841653aa9c139f97772adfced1f4e280ab2f
CRs-Fixed: 2990486
2021-07-21 14:58:21 -07:00
Debasis Das
1ae342f91a qcacmn: Fix potential NULL pointer access in qdf_ini_parse()
In qdf_ini_parse(), verify that section_cb pointer is valid
to prevent invalid memory access.

Change-Id: Ie3d2e513e2aabf0bd5f9702578074cb1191991c1
2021-07-21 03:05:41 -07:00
Vivek
c893f06069 qcacmn: Add new events to the interface manager
Add new events to the interfaces manager for the
following which requires inter vdev co-ordination
	1. ACS
	2. HT40 scan
These event are sent to the MBSS frameworkfor inter VDEV
co-ordination.

Add a string array ro represent interface manage events.
Add API to retrieve string from interface manager events.

Change-Id: I397621a432da70156e34f46f75fd6c0e8d0a7b53
CRs-Fixed: 2963147
2021-07-21 01:18:12 -07:00
Jyoti Kumari
e831cf3415 qcacmn: Handle TWT ack event support in wmi init
In WMI INIT, check whether firmware supports the ack event or
not. If it supports then enable driver support and send it to
firmware during WMI INIT.

Change-Id: Icfdee6bc06e6a393de880b87fdab70665ea7c8b4
CRs-Fixed: 2987898
2021-07-20 16:35:51 -07:00
Jyoti Kumari
fc3c62d771 qcacmn: Add support for TWT ack event
In case if TWT command (i.e setup, terminate, pause, resume,
nudge) comes from userspace and if the firmware is in below mode
1. scan in progress
2. roam in progress
3. CSA is in progress or
4. Any other error
then the command needs to be rejected in userspace context.

Synchronize the TWT command so that whenever command goes from
driver to firmware, then driver will receive ack event first
followed by respective event (i.e add dialog, delete dialog,
pause, resume, nudge) with below condition
1. If driver receives the ack event as successful then driver
   waits for this ack event, respective event with status of the
   TWT action frame over the air is expected.
2. If driver receives the ack event as failure then it will
   rejects the TWT command in userspace context.

Change-Id: Ie885d98ecf2dad98d34676d889fd70e4c84f0a05
CRs-Fixed: 2987904
2021-07-20 11:09:21 -07:00
Yeshwanth Sriram Guntuka
04f9725d81 qcacmn: Skip MSI cfg for monitor sts ring in MISSION mode
In MISSION mode, MSI address and data are still
configured for monitor status rings even though MCC
uses only polling mode for this ring.

Fix is to skip MSI configuration for monitor sts
ring in MISSION mode for MCC.

Change-Id: If295a5afc6731bbec1ad7182590e0015f3a911ba
CRs-Fixed: 2992167
2021-07-20 11:09:16 -07:00