Commit Graph

9873 Commits

Author SHA1 Message Date
Vignesh U
1a80505918 qcacmn: Store and retrieve TPE IE in scan cache
Declare a TPE pointer to store the TPE IE in the scan cache ie list.
Write a function to obtain the TPE IE stored in the scan cache ie list.

Declare a minimum TPE IE length as 2 Bytes and use that to check the
sanity of the received TPE IE before storing it. Discard the TPE IE if the
length check fails.

Change-Id: If5b06604b03d07dd5fb26a62f90fb7202ce4eff0
CRs-Fixed: 2826300
2020-12-03 02:41:03 -08:00
Vignesh U
f443e288cc qcacmn: Get and set 6g client and ap parameters
Write disptacher and core functions to set and get the following
6g ap and client power type parameters in regulatory:

1) current 6G AP power type - LPI/SP/VLPI.
2) current 6G client mobility type - Default/Subordinate.
3) RNR Usable.
4) Unspecified AP usable.

Change-Id: I926642d1a3e7d9049772c5c4d2aad7cd472f8bd0
CRs-Fixed: 2825676
2020-12-03 02:40:59 -08:00
Vijay Krishnan
6be2aca5a4 qcacmn: Remove QCA_DFS_RCSA_SUPPORT from cmndev
The macro QCA_DFS_RCSA_SUPPORT is currently residing inside common
code. But this feature is not used by MCL, therefore in order to
reduce code approval process, this macro and associated code is moved
to WIN specific component-dev git repository.

CRs-Fixed: 2822626
Change-Id: I43a9e63ede5958f8641be1be45f7c5cd71820667
2020-12-02 20:49:33 -08:00
Vivek
3327a6a92b qcacmn: Add support for rate limiting QDF trace prints
The existing QDF implementation does the following
1. The QDF trace either prints to the console
2. The QDF trace message  is directed to the utils,
   which based on log level
	a. redirects to a user space daemon or
	b. redirects to console

There is excessive logging detection in the utils code
before redirecting the prints to  the console.
If the number of prints to console is more than
the configured threshold, we assert in development builds.

Moving the API for excessive logging detection from utils to
QDF trace.

The configuration for detection of excessive logging currently
is only for the number of prints per second.
Adding time configuration also to detection of excess logging
to the console.

CRs-Fixed: 2809752
Change-Id: Iecc408fc9b576fa900a6d7ee793639f1dde3110d
2020-12-02 10:45:34 -08:00
Nandha Kishore Easwaran
e04aeaeed8 qcacmn: Add cache invalidation for MIPS platforms
Add cache invalidation support for for MIPS platforms. The API
on mips platform takes start and size as input. Obtain size by
subtracting end and start.

Change-Id: Iaf2920b8fed2b2a2870682c6bf75c905cb8ca836
2020-12-02 06:33:58 -08:00
Manikanta Pubbisetty
9579bf675f qcacmn: reset monitor filters only in monitor mode
In mission mode, when PKTLOG is enabled, dp_mon_filter_update()
will reset the RXDMA2SW ring filters which will block the RX
completely leading to connection issues.

Reset monitor mode filter only when monitor VDEV is configured.

Change-Id: I0f55370af74a5f538ef926d8f8d61bffaa64a69e
CRs-Fixed: 2827739
2020-12-01 09:56:34 -08:00
Shashikala Prabhu
fd0132aa9f qcacmn: Add CSA event handler and extract APIs
Move CSA event handler and CSA extract APIs to common code

Change-Id: Iedfa3bbd8a2b6d9cbfdd9fecd57052b853ed5680
CRs-Fixed: 2826991
2020-12-01 06:50:28 -08:00
Himanshu Batra
f994a48ab9 qcacmn: Use bh spinlock for CM
Use bh spinlock for CM

Change-Id: I28a0de73f98e386d9db9e5d63a51e5aee2c12b0e
2020-12-01 04:44:27 -08:00
Aniruddha Paul
e9a6af6660 qcacmn: Drop invalid peer frames with RA as STA and TA != BSSID
In HKv1, if smart monitor mode is enabled on RE,
we are getting invalid peer frames with RA as STA
mac of RE and the TA not matching with any NAC list
or the the BSSID.Such frames need to dropped in order
to avoid HM_WDS false addition.

Change-Id: If641052c3f0ac5ce49afcc52062462d8b7eaa0e6
2020-12-01 02:50:50 -08:00
Ajit Vaishya
25622b4ed5 qcacmn: Vendor specific feature capability for Adaptive 11r
Add feature capability indication for Adaptive 11r for the
drivers to advertize support for this.

Change-Id: I28da5c3d7d4d841de980c841b1d4c39be12ed295
CRs-Fixed: 2817358
2020-11-30 12:49:27 -08:00
Chaithanya Garrepalli
3888d0824e qcacmn: WAR to avoid SG process with wrong continuation bit
If a continuation bit is set in msdu desc info and reported
length can fit in single buffer avoid SG processing

Change-Id: I6e8c3e1e657c372d5d915450dda20ba26bac495f
2020-11-30 05:25:07 -08:00
Wu Gao
2f09a8e245 qcacmn: Fix memory access out of bounds when sort 6g channel list
In arch 32 platform, the size of rnr_chan_info is 8 bytes, and it only
allocates 4 bytes for each of them. Which cause memory access out of
bounds.

Change-Id: I4f1798c5354c6a76e32bdfed13ade9667465b789
CRs-Fixed: 2827289
2020-11-30 01:24:06 -08:00
Padma Raghunathan
b82e526a72 qcacmn: Handle FP BARs without errors in wbm release ring
Only BAR frames with REO/RXDMA push reason as error are handled
in host. FP BAR frames without errors, are routed to host
via REO/RXDMA with push reason as route.

Instead of leaking the buffer, handle the routed BAR frames
gracefully. Free the buffer and log stats to detect such
cases.

Change-Id: I6e09e8b948d9b2d9d3de3b6558e54f0c70901c62
CRs-Fixed: 2814303
2020-11-29 23:28:16 -08:00
Arun Kumar Khandavalli
66ec120912 qcacmn: Add bus failure reason code to vendor indication
Add bus failure hang reason code in enum qca_wlan_vendor_hang_reason.

Change-Id: I0ea7fff779459a1cccd44c6336a0c49d73f8b37d
CRs-Fixed: 2825302
2020-11-29 23:28:12 -08:00
Tallapragada Kalyan
e6b821c40b qcacmn: get length of nbuf after pushing the meta data in mesh mode
get length of nbuf and set it in tx_desc after pushing the
meta header in mesh mode

Change-Id: Ide563a339eae392c7b3f512526d02f7ec2d6c1df
2020-11-27 08:51:34 -08:00
Mainak Sen
e66ef5081e qcacmn: WMI support for Tx Mode Select
When MSCS feature is enabled, Host needs to send WMI command to
FW to enable tx mode selection

Change-Id: I84372f2e83f2faa6c90436d927410d1af636246e
2020-11-27 06:48:46 -08:00
Hariharan Basuthkar
ad5cb17aa7 qcacmn: Expand regdomain to include 6Ghz superdomain
The regulatory structure which contains country and regulatory domain,
needs to be expanded to include 6Ghz superdomain.
Make changes in the regulatory component to send the 6G super domain
set by the user, to the target.

Change-Id: I84b96cd74012e33d464d98675158c9cd5eabff4e
CRs-Fixed: 2802131
2020-11-27 04:54:31 -08:00
Aditya Kodukula
e6cf256348 qcacmn: Add a check to ensure validity of ini file
The function qdf_ini_parse returns QDF_STATUS as SUCCESS even if no
fields are read from the ini file. Because of this even if the
ini file is corrupted and no values are read from it the function
still returns SUCCESS.

So, to avoid that and ensure that the ini file is not corrupted,
add a variable ini_read_count to count the number of fields read
from the ini file and return SUCCESS only if its value is not zero.

Change-Id: I5ec9a9cdc9780b6c9487f6ac64b411b81328d75c
CRs-Fixed: 2804937
2020-11-26 22:45:45 -08:00
Varsha Mishra
d4463d47d9 qcacmn: Use vdev based ast_idx and hash for all tx frames
FW uses CCE rule to exception all mcast/bcast frames. Ast_idx
override does not help in sending them to TQM directly.

Change-Id: Iad6c1e8073f5c5d0513adb7097d5024177b7b7f5
2020-11-26 14:44:39 -08:00
Liangwei Dong
55af82b26c qcacmn: replace macro WLAN_OBJMGR_TRACE by WLAN_OBJMGR_REF_ID_TRACE
WLAN_OBJMGR_TRACE is not needed. Ref id trace func is under
control of WLAN_OBJMGR_REF_ID_TRACE. Replace it by
WLAN_OBJMGR_REF_ID_TRACE.

Change-Id: I8877dad0a4f7c13258b2c9bf63dcafb46e5b8b94
CRs-Fixed: 2826259
2020-11-26 08:10:16 -08:00
sheenam monga
3dd0c45165 qcacmn: Add support for CSA offload
Add support for CSA offload to fw in case
of SAP/P2P GO.

Change-Id: I4ffa7c377e8fe50120f5cd20080419bd1b1e4248
CRs-Fixed: 2819499
2020-11-26 04:15:39 -08:00
Sumedh Baikady
7a8d9d5da0 qcacmn: Change log level for packing radiotap in monitor mode
In monitor mode and other monitor mode features such as
smart monitor, in certain cases, Ex LM profiles there is not
enough headroom to fill radiotap. In this case frame is dropped.
The prints if error type floods and causes backpressure.
Hence change the print to debug only.

Change-Id: I7c0f786848237aaebba6f3282b9d82f0ef5d3f7b
2020-11-26 02:15:51 -08:00
Hariharan Basuthkar
a6e500d22e qcacmn: Add 5.9GHz channels to global_op_class table
As per table E-4 in Annex E, in the 11ax Draft 8.0, add the 5.9GHz
channels to the global_op_class table in the regulatory component.

Change-Id: I69225e5cae813d470ebaf2768e58672276f6bd2f
CRs-Fixed: 2823487
2020-11-26 00:16:55 -08:00
Himanshu Batra
71fd0da4d7 qcacmn: Resolve compilation issue for CM
Resolve compilation issue for CM

Change-Id: Id9ab5cf96d3865b13d5ea020e6e92016c3493f22
2020-11-26 00:16:50 -08:00
Himanshu Batra
1557043c49 qcacmn: Make connect/disconnect ser cmd as blocking
Make connect/disconnect ser cmd as blocking across all platforms

Change-Id: I8cc6988fcb53f257fc4aab00c1b3abaca07174bf
2020-11-26 00:16:46 -08:00
nobelj
da9b69116b qcacmn: remove ppdu_info from list before free
during pdev deinit, while freeing ppdu_info it need to be
removed from the list before freeing.

Change-Id: I2829daf3ed58c7a143fba09d68eb6f0278accdf0
2020-11-25 22:25:14 -08:00
Bapiraju Alla
e8dfd0b73a qcacmn: Add INI parameter to configure NAN in 6GHz
Currently, there is no INI parameter to control NAN feature in 6GHz
frequency band. Because of this, there is no provision to disable the
NAN in 6GHz when there is no requirement.

To address this, add INI parameter to configure NAN feature in 6GHz.

Change-Id: Ibc653d6241d176f7fb75f18d2886175231ad71cc
CRs-Fixed: 2817925
2020-11-25 14:45:58 -08:00
Santosh Anbu
abbeda0b03 qcacmn: Support stop-start cmd enqueue mlme ops
Add change to support mlme ops to enable enqueuing stop-start
cmd to serialization queue when CSA is triggered for a DFS channel.

Change-Id: I9f2dca3bc4ccfe40bd40c7e04b3ce035df56d19d
CRs-Fixed: 2825760
2020-11-25 10:50:40 -08:00
Gerrit - the friendly Code Review server
34e43d37b1 Merge changes into wlan-cmn.driver.lnx.2.0 2020-11-25 07:51:39 -08:00
gaolez
1d0d4cbe6b qcacmn: Optimize congestion score calculation
In current code logic, in case of channel utilization value less
than 3, the congestion value treated as “not present” and give
it a medium score. This will cause a very clean channel get a medium
score.

To fix the issue, need calculated congestion score from 1-100 and
not 0-100.

Change-Id: I6abb257e8298e4db3104fdc20351bbadaa7c2ec5
CRs-Fixed: 2812978
2020-11-25 04:51:35 -08:00
Himanshu Batra
569cc296ed qcacmn: Add basic infra for connection manager UTF
Add basic infra for connection manager UTF

Change-Id: Id111a4bcda970e927b73441be55de4d33a694796
2020-11-25 00:52:13 -08:00
Yu Wang
ca591b0db7 qcacmn: move component 'coex' to qcacld project
'coex' component is MCC specific, move to qcacld project.

CRs-Fixed: 2721763
Change-Id: I271301c28748f6b14afb59e105cc9f418e43a9c4
2020-11-24 22:51:16 -08:00
Jyoti Kumari
bd99f03445 qcacmn: Drop remaining IEs if any corrupted IEs are present
Scan entry fails if any coruppted IEs are present

Introduced new ini parameters to enable scan based on ie
corruption. If ini parameter is enable then scan module skips
all IEs following coruppted IEs and adds scan entry without
completely dropping the frame. Otherwise if ini parameter is
disable then scan entry fails on corrupted ie.

Change-Id: If17b68448dd3e6ac3e98ed854ed67d7f16d9dff7
CRs-Fixed: 2806932
2020-11-24 10:55:46 -08:00
Rakesh Pillai
e9899b2a2f qcacmn: Add support to send packet marked by upper layer to FW
Upper layer (OS_IF) can mark certain packets to be sent
to FW. Mark such packets as exception, so that it is sent
to the FW.

Change-Id: I44af2b06793712be7236f831b6b2604123d72bb1
CRs-Fixed: 2813172
2020-11-24 10:55:42 -08:00
sandhu
4e87b183a7 qcacmn: Reduce memory used by rx error ring history
reduce the memory used by rx error ring history.

Change-Id: I5f4113af799bb57c5545893130acd4cf8e4db024
CRs-Fixed: 2807711
2020-11-24 08:49:07 -08:00
Yeshwanth Sriram Guntuka
acbca27d9d qcacmn: Reset RXDMA_BUF ring filters when mon mode is disabled
Rxdma err destination could still grow even after monitor
status ring filters are reset as part of monitor mode
disablement which will result in RXDMA2SW ring back-pressure.

Fix is to reset RXDMA_BUF ring filters when monitor mode is
disabled.

Change-Id: Ifd56f6bdbf6a5e4c5d39fc5c71dd85925e3d5f33
CRs-Fixed: 2818011
2020-11-24 08:49:04 -08:00
Bapiraju Alla
197fc297c3 qcacmn: Add log while dropping FW diag events
FW diag events will be dropped when number FW diag events pending for
processing is reached to configured RX_DIAG_WQ_MAX_SIZE value. Add a
log when these diag events a getting dropped for debugging purpose.

Change-Id: Ifc303991bdf274fa7426794eaf71517722e9f386
CRs-Fixed: 2824458
2020-11-24 08:48:59 -08:00
Ananya Gupta
a550225eb1 qcacmn: Rate limit logs when wake request fails
Excessive logging is detected when force wake request
command fails.
Rate limit the logs in hif_force_wake_request and
hal_write32_mb.

Change-Id: I9b1166074dfdb2d58d811571c802a75a6dbc03c5
CRs-Fixed: 2823961
2020-11-23 21:57:39 -08:00
Ananya Gupta
28998adf14 qcacmn: Changing log level in dp_tx_msdu_multiple
Excessive logging was detected in dp_tx_msdu_multiple.
To fix this, Reduce log level when tx_hw_enqueue fails.

Change-Id: I66d58d12aff037896c7623c6755a443092673a88
CRs-Fixed: 2823453
2020-11-23 15:22:33 -08:00
Rakesh Pillai
8f4a2eeaa5 Revert "qcacmn: Add INI support to enabling sending ICMP to FW"
This reverts commit Change-Id: I98f8f751dc75a3d6f2296f0844529e9c72c4090b.
This INI is moved to HDD_DP.

Change-Id: I451fa50621fdc8b6cbe027bdf1495788914481c9
CRs-Fixed: 2824623
2020-11-23 13:19:31 -08:00
Nandha Kishore Easwaran
a90712e15d qcacmn: Add extra parameters to gpio command
Add extra parameters to gpio wmi command since they
are required for smart antenna config.

Change-Id: I3b363c7b508862ded8aacffb9e0a39328e8b2b94
2020-11-23 06:38:30 -08:00
Nandha Kishore Easwaran
de94037c5f qcacmn: Add extra parameters to gpio attr
Add extra parameters mux_config, drive and init_enable
to gpio config command.

Change-Id: I439aec6cbd6769a36c7f5629f9249bdd25466138
2020-11-23 06:38:25 -08:00
Venkateswara Swamy Bandaru
59234d61cb qcacmn: Fix memalloc failure issue in MBSSID IE parsing
Fix MBSSID IE pasring by properly incrementing offsets while
pasing the IE.
Copy ext IEs also in final iteration.
Minor code readability changes done along with the above fixes.

Change-Id: I3aaf5dd440b48c4229ddefc37f75703fc58ba994
CRs-Fixed: 2814732
2020-11-22 23:09:23 -08:00
Jinwei Chen
18762e5b16 qcacmn: Use rxdma error frame as rx_mpdu_error count
RX error stats from REO2TCL ring is just for RX 2K jump/
OOR frame, host should not count them as rx_mpdu_error
stats for user space which will think wifi connection is bad
easily in noise environment.

Align this part logic with Helium that count TKIP/MIC error
frame, for HST/HSP, use error counted from RXDMA instead.

Change-Id: I2e488bedaed166ce410c53eb7e9710d7933c2717
CRs-Fixed: 2821147
2020-11-21 18:07:31 -08:00
wadesong
e2d233c757 qcacmn: Fix a KW issue in crypto set function
In function target_if_crypto_set_key(), array pn's size is 16,
while params.key_rsc_ctr's length is 8, so the length of src
buffer(params.key_rsc_ctr in this case) should be used when
copying data to dest buffer(pn).

Change-Id: Ifa9156963c3da0234dbf8755a4d1f7bf3b96d0ff
CRs-Fixed: 2822715
2020-11-21 02:20:23 -08:00
phadiman
95b9a6e63a qcacmn: HOST Memory Optimizations (in NSS offload mode)
Number of DP rings used in HOST mode and NSS offload mode differ
and in current scenario the rings are allocated unconditionally.

Allocate only required number of rings based on the HOST mode and
NSS Wi-Fi offload mode and based on the number of radios supported
per SOC.

CRs-Fixed: 2790504
Change-Id: I20ce1908da47c197ea3b406f8704b964f3d8f7d1
2020-11-21 02:20:19 -08:00
Bapiraju Alla
b130521bd3 qcacmn: Process FW diag events in a separate worker thread
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.

To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.

Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
2020-11-21 00:20:27 -08:00
Lincoln Tran
8652562a87 qcacmn: Add API to check for passive frequency
Add new API to check if frequency is passive or not. The API checks
the channel flag against REGULATORY_CHAN_NO_IR.

Change-Id: I166a7a79517f81c23ff933d2657ef3f4c551c082
CRs-fixed: 2822205
2020-11-20 16:24:50 -08:00
Himanshu Batra
c8fc486dd6 qcacmn: Activate connect/disconnect from serialization via schedular
On completion of connect/disconnect request, the command is removed from
serialization queue. If there if any connect or disconnect request in
serialization pending queue for the same vdev, the command is moved from
pending to active queue in the same context.
All this operation happens under CM SM lock. As part of activation of
next command, the CM tries to acquire same lock to dispatch even to
connection SM. As a result, deadlock is observed.
Add fix to Activate connect/disconnect from serialization pending queue
via deferred context using scheduler

Change-Id: I7f2873ab6d2a639b55ccc54e37463a892d9aae94
CRs-fixed: 2820539
2020-11-20 10:43:47 -08:00
Tiger Yu
9fc47f763e qcacmn: Add cfg_dp_sg_enable to get ini key dp_sg_support
Add cfg_dp_sg_enable to get ini key dp_sg_support by cdp_cfg_get.
And add some comments for CFG_DP_SG to clarify more.

Change-Id: I34de242eacbdcf55398afe64b91f5534f205fa22
CRs-Fixed: 2822536
2020-11-20 10:43:43 -08:00