Commit graph

9,964 commits

Author SHA1 Message Date
Yeshwanth Sriram Guntuka
240d85eed3 qcacmn: Register API to flush frags in dp peer ops
Register dp_peer_flush_frags API in dp peer ops
for flushing fragments for a particular peer.

Change-Id: Ia179d3160bdc306ec965c465134042c66a0c40a6
CRs-Fixed: 2874366
2021-05-13 23:37:13 -07:00
Yeshwanth Sriram Guntuka
256ded39df qcacmn: Add CDP intf to flush fragments for a particular peer
Add CDP interface support for flushing fragments for a
particular peer.

Change-Id: Ic59843408037b9c858599be13727422c2e3031cd
CRs-Fixed: 2875946
2021-05-13 23:37:08 -07:00
Yeshwanth Sriram Guntuka
280df074ae qcacmn: Enable peer authorize by default
Drop non-EAPOL frames from unauthorized peer in security mode.
Enabling this feature by default with this change.

Change-Id: I9878b37088149e34f456a38a9c0f722e4c5ee49a
CRs-Fixed: 2943789
2021-05-13 21:43:29 -07:00
Yeshwanth Sriram Guntuka
2433c03b06 qcacmn: Do not intrabss forward EAPOL frames
Do not forward EAPOL frames that have DA different
from the SAP vdev mac addr.

Change-Id: I23959e38b5cbd845d369bebd6913150eca4551bf
CRs-Fixed: 2860248
2021-05-13 21:43:25 -07:00
Varsha Mishra
0549e6ec4f qcacmn: Drop fragmented multicast/broadcast frames
CVE-2020-26145
Broadcast and multicast frames should never be fragmented. Several devices
process broadcasted fragments as normal unfragmented frames. Moreover, some
devices accept plaintext fragmented broadcast or multicast frames in
protected Wi-Fi networks. An adversary can abuse this to inject packets
by encapsulating them in a fragmented plaintext broadcast frame. Even
unicast packets can be encapsulated in broadcast Wi-Fi frames and hence
be injected.

Change-Id: I3181a05e177cf9374a14edb748bc5001d058e0f3
CRs-Fixed: 2893212
2021-05-13 21:43:20 -07:00
Abhishek Singh
c71f4e6365 qcacmn: Do not drop the beacon in case of RSN len is less than 2
For security cert TC, RSNIE length can be 1 but if the beacon is
dropped, old entry will remain in scan cache and cause cert TC
failure as connection with old entry with valid RSN IE will pass.

So instead of dropping the frame, do not store the RSN pointer so
that old entry is overwritten.

Change-Id: I2fe4d2dd2352be6850f7a18a2ec829733ded7ee8
CRs-Fixed: 2944120
2021-05-13 08:34:20 -07:00
Karthik Kantamneni
472935c0ab qcacmn: Add delayed reg write support based on EP power state
Even though HP/TP updates are posted writes at CPU level, they
are getting blocked until soc comes out retention which is hogging
CPU

To avoid this if EP is in low power state update HP/TP writes from
delayed work context. In delayed work vote for EP awake wait till it
comes out low power state and then proceed to HP/TP update.

Change-Id: I61d5795f58f25f850b5a9ad4d30e3181dba23713
CRs-Fixed: 2913495
2021-05-13 06:37:18 -07:00
Karthik Kantamneni
cff44a2dc4 qcacmn: Make QDF NBUF history size configurable
Some of the targets require more QDF nbuf history
size, so making the size configurable keeping
default same.

Change-Id: Ic4ac43a1eacb1e58c0a05b794349525d614d7fc8
CRs-Fixed: 2929968
2021-05-12 21:41:55 -07:00
Lincoln Tran
fc2b7d2152 qcacmn: Catch potential OOB for 6G channel list
Ensure any access to the master channel list does not go out of bounds

Change-Id: I96487a752d1510136f1ecbf92da42eb7b991522b
CRs-fixed: 2900945
2021-05-12 17:34:36 -07:00
Amruta Kulkarni
7b48192e1f qcacmn: Add new assoc and nonassoc ini for 6g scan
Add new ini's for assoc active and passive dwell time
for 6g. These will be applied if STA is connected.

Change-Id: I680fbd3038968ecf6ff9920fff982456135bfd77
CRs-Fixed: 2941359
2021-05-12 13:37:33 -07:00
Aditya Kodukula
a0a611be00 qcacmn: Move Rx diag event processing to dedicated work queue
Firmware generates wmi Rx diag events every few milliseconds,
and processing the same in system shared work queue may lead to
work queue lock-up detection. Hence, move Rx diag event processing
to dedicated work queue.

Change-Id: I10cdde317794e35bc6d10677ab76ea24a66e1880
CRs-Fixed: 2941409
2021-05-12 07:47:24 -07:00
Karthik Kantamneni
6760058034 qcacmn: Add support configure EP vote feature based on pm states
Add support to configure EP vote feature based on pm states

Change-Id: Ia424d364248283da8e978f924fd421c1b5f4b888
CRs-Fixed: 2939884
2021-05-11 19:09:00 -07:00
Karthik Kantamneni
8a1d36cd5e qcacmn: Fix compilation error for modulo operator
In some of the targets modulo operator assembly API's
are not defined causing compilation error.
To avoid this use qdf based API's for modulo operations.

Change-Id: Ibc69b69aa38cadff5daa8dee8b65ceaacfe997b7
CRs-Fixed: 2940281
2021-05-10 23:23:31 -07:00
Ananya Gupta
eb13f6023a qcacmn: Change log level of error prints
Logs are printed inside a spinlock which was held for
losing more than 2 seconds.
To fix this, reducing log level so it is not printed
in the console and instead in driver logs.

Change-Id: Ib510ddc1b5bff63db012b45ffa0280eedc356cc6
CRs-Fixed: 2938590
2021-05-10 00:09:02 -07:00
Vevek Venkatesan
4dc399fb8b qcacmn: add Tx descriptor history in Tx and comp rings
Add the history support to log Tx descriptors programmed
in Tx and completion HW rings.

Change-Id: I60954c93e2595e7dad1251c459eed8afc761e917
CRs-Fixed: 2924614
2021-05-08 00:04:07 +05:30
Karthik Kantamneni
0885ca51f4 qcacmn: Add TX descriptor history support
Add history to log HW TX descriptors programmed in TX ring.

Change-Id: Ia17e5557115f20508ed22c045941c0645c46ef1d
CRs-Fixed: 2928996
2021-05-06 22:03:40 +05:30
Wu Gao
91dd6fec2c qcacmn: Add more debug information when get invalid paddr
When host failed to find out vaddr by paddr from FW, output more
information for debug further.

Change-Id: I65c4965c12c2ffa3fe2a26a82df01d1b91501c73
CRs-Fixed: 2925194
2021-05-06 03:04:08 -07:00
Vulupala Shashank Reddy
29ff999fde qcacmn: Extract TSF time stamp for mgmt rx packets
Extract TSF time stamp for mgmt rx packets.

Change-Id: Id76048d79ea1937c002479314e83b40da807771b
CRs-Fixed: 2916738
2021-05-06 01:12:13 -07:00
Wu Gao
f99659428c qcacmn: Get vdev based on vdev id
Driver gets vdev by wlan_objmgr_pdev_get_first_vdev and returns wrong
vdev in some platforms, and then gets wrong channel/phy_mode. This
change gets vdev by id and fix this issue.

Change-Id: I814d516361238afbd0345bc362c286d1cb55a7d4
CRs-Fixed: 2933525
2021-05-05 08:36:49 -07:00
Jingxiang Ge
b2e16c18e7 qcacmn: Reject vdev destroy if not LOGICALLY_DELETED state
issue happen when wpa_supplicant is creating vdev
and schedule_thread is destroy the same vdev.

if state is not WLAN_OBJ_STATE_LOGICALLY_DELETED,
return back here, otherwise it will cause the creating
vdev_id to be invalid.

Change-Id: I574838bca574add497f1167c75ede44938b7bf17
CRs-Fixed: 2935068
2021-05-04 23:23:47 -07:00
Yeshwanth Sriram Guntuka
75e691425f qcacmn: Allocate memory for fisa pkt history separately
Fisa packet history is around 6KB for each sw fisa
flow entry and this is part of the dp_fisa_rx_sw_ft
structure. The total size of the SW FT as a result is
around 830KB and the higher order memory allocation via
kzalloc for this could fail in low/fragmented memory
scenarios.

Fix is to allocate memory for FISA pkt history separately
and attach it to the SW FT entry.

Change-Id: I7296d7269c1b86ec38ea1668e8a0893335bbdb6f
CRs-Fixed: 2936353
2021-05-04 10:53:47 -07:00
Karthik Kantamneni
a7441f61f3 qcacmn: Add support for Rx refill ring history
Add support for Rx refill ring history, maintain records of refill info
during RXDMA ring replenish.

Change-Id: I034014eacfc510ec6f416fca601fa864326de9c2
CRs-Fixed: 2930005
2021-05-04 05:31:37 -07:00
Lincoln Tran
8118b073a1 qcacmn: Add helper API to set AP power type
Add an API to set the AP power type and then recompute the current
channel list.

Change-Id: Iacd4d3244f601836f3ed0eae725eaa6375a3584c
CRs-fixed: 2934625
2021-05-03 19:52:16 -07:00
Gururaj Pandurangi
5a2d88df87 qcacmn: Add country code check for ETSI dmn
Add country code check for ETSI domain, in other words
UK, since only UK supports 6G in EU as of today. The
TPC power calculation API calls this function to check
if programmed ctry is GB to allow STA to use VLP mode.
As and when more EU countries support 6G, the checks
will be appended to this API.

Change-Id: If985f3f64fc806cf1875f798ff3a86667a0861b8
CRs-Fixed: 2933678
2021-05-03 15:04:44 -07:00
Pragaspathi Thilagaraj
e6820ab1eb qcacmn: Add new reason code to TWT setup response
Add new reason code WMI_HOST_ADD_TWT_STATUS_SCAN_IN_PROGRESS
to handle add dialog rejection due to scan is in progress
at firmware.

Change-Id: I30c3d1096690bd0cb7a669206f087e006c23ea44
CRs-Fixed: 2923289
2021-05-03 15:04:40 -07:00
Karthik Kantamneni
ae5629f35e qcacmn: Set IRQ affinity for CE interrupts to gold cores
When CE tasklets and NET_RX gets scheduled on same CPU,
NET_RX is throttling CE tasklet resulting  WMI timeouts.

To avoid this affine CE irqs to gold cores, so that CE
tasklets will get enough CPU time.

Change-Id: Ided81a0565958aca6611eba911824c3485eca472
CRs-Fixed: 2933335
2021-05-03 18:27:54 +05:30
Pragaspathi Thilagaraj
1eeae2213e qcacmn: Add vendor reason code for TWT setup reject due to scan in progress
The firmware rejects the TWT setup request when scan is in
progress. Extend enum qca_wlan_vendor_twt_status to represent new
reason code for it.

Change-Id: I8576d8cce2fac62d9e3cf020a3dadee06ec14d5c
CRs-Fixed: 2923272
2021-05-01 14:35:58 -07:00
Yeshwanth Sriram Guntuka
685afa3f7e qcacmn: Do not add nbuf to emerg_nbuf_q on free when not initialized
When nbuf is freed via dp_rx_buffer_pool_nbuf_free, the
nbuf is enqueued to emerg_nbuf_q always even in the case
where the emerg_nbuf_q is not initialized. This will result
in NULL pointer dereference when any nbuf is enqueued to
emerg_nbuf_q.

Fix is to add initialization check before adding the nbuf
to emerg_nbuf_q and free the nbuf if emerg_nbuf_q is not
initialized.

Change-Id: I075b3b93203eec21d44ea3967b5f46d59c291a14
CRs-Fixed: 2934593
2021-04-30 12:53:47 -07:00
sandhu
3cb203576e qcacmn: Add start sequence update count to rx stats
add ssn_updates_count to dp_soc_stats rx err stats.
Also add bar fail count on rx tid update during
bar handling.

Change-Id: Ic9a963c8d29ace2087e63cba56bc0d7e40907e1a
CRs-Fixed: 2918806
2021-04-30 12:53:43 -07:00
Amit Mehta
fb46e91f02 qcacmn: Rate limit excessive logging in case of HW enqueue failure
Currently, excess logging is causing a crash when enqueuing
of Tx MSDU descriptor to HW failed.

Rate limiting the log messages to avoid the crash.

Change-Id: Ibb230ce03c23518b6f7feda61a49bf155c7ddc69
CRs-Fixed: 2933002
2021-04-30 12:00:24 +05:30
Karthik Kantamneni
03b55db059 qcacmn: Fix duplicate additon of same WDI events to list
Same WDI subscribe event can be added multiple times to event list
since this is triggered by user control this will result to undefined
behaviour during events handling.

To avoid this add check to detect duplicate entry before adding
to list and reset list elements once removed from list.

Change-Id: Iaf23927f8439d4ac503776b915a8fe8cb6abfec5
CRs-Fixed: 2931068
2021-04-29 16:23:51 -07:00
Utkarsh Bhatnagar
3fb6ac72f3 qcacmn: Configure Default DBS scan for DBS HW
Previously, for high accuracy scan,
configured scan policy SCAN_DBS_POLICY_FORCE_NONDBS
takes  more time to scan.
For DBS HW, to improve scan time, this should be
changed to SCAN_DBS_POLICY_DEFAULT.

Change-Id: I692e2a8b4fd9c97b526197edc57b830fa091a456
CRs-Fixed: 2927022
2021-04-29 13:43:05 -07:00
Kiran Kumar Lokere
2cfc1dab45 qcacmn: Update the security check mask for 6GHz AP
Update the security check mask value for 6GHz AP.

Change-Id: I8d9637a95c6191124372a7bdba119837e6553ed4
CRs-Fixed: 2930941
2021-04-28 22:31:44 -07:00
Manikanta Pubbisetty
aef0eadb39 qcacmn: assert on IPA SMMU map/unmap failures
The status of the IPA SMMU MAP/UNMAP operation is stored in the
result field of the mem info structure that is passed to the
IPA driver. Currently, this field is not checked for MAP/UNMAP
failures; when IPA HW accesses such a buffer for which
mapping is not correctly setup, it will lead to SMMU faults.
Check the result and assert(on failures) to avoid such issues.

Also, check if the physical address passed to the IPA driver is
non zero value.

Change-Id: Iec0702bdf4a07ea37e1213a33dc970028da654df
CRs-Fixed: 2928744
2021-04-28 11:30:07 -07:00
Yeshwanth Sriram Guntuka
0abcbd537a qcacmn: Set IPA WBM2SW ring HP to DDR addr on disable pipes
WLAN HW can still access the IPA tx doorbell address post
disable pipes if there are any pending tx completions which
could result in a NOC error.

Fix is to reset the WBM2SW ring HP addr to shadow addr in
DDR before pipes are disabled.

Change-Id: I52900eb34530388487923a887354ef8839d8c728
CRs-Fixed: 2846421
2021-04-28 11:30:03 -07:00
Karthik Kantamneni
f8a355b0f6 qcacmn: Add history for REO queue descriptor events
Add history to log REO queue desc update and free events.

Change-Id: If2992ff1256fad49ea4ea6bd90b6dfe4a63d2bc4
CRs-Fixed: 2926919
2021-04-28 11:29:59 -07:00
Jingxiang Ge
570e8e9dcb qcacmn: trigger recovery in hif_check_detection_latency
Replace as qdf_trigger_self_recovery here, so it can trigger
fw dump firstly.

Change-Id: I39e3bc11829a1969ac60bd3bbd71f3e2d1fa4f43
CRs-Fixed: 2928096
2021-04-26 19:01:07 -07:00
Jingxiang Ge
1226299545 qcacmn: Add vendor hang reason code for tasklet/credit latency
Define a new reason code in enum qca_wlan_vendor_hang_reason,
QCA_WLAN_TASKLET_CREDIT_LATENCY_DETECT, for tasklet/credit latency
detection.

Change-Id: I4852fc22f57d14d6eac30ddfd8361f2a63326981
CRs-Fixed: 2929164
2021-04-26 14:04:19 -07:00
Lincoln Tran
fb2e1367d9 qcacmn: Update interface mangager event data
Add fields to the validate bss data struct to pass more information
to the interface manager when validating a candidate.

Change-Id: I82536585517da87ec0883c6010461d7ee929bd18
CRs-fixed: 2836749
2021-04-26 10:55:00 -07:00
Deeksha Gupta
6b92b4b6fd qcacmn: Avoid excessive kmsg log in target_spectral
Sometimes firmware sends spectral events repeatedly with
wrong vdev. This causes continuous error logs are
written to kmsg.

Replace info prints in target_if_consume_spectral_report_gen3()
with debug level prints.

Change-Id: I2ca4be7d0d13e841a6dbd4efbc02ecd2b12893f8
CRs-Fixed: 2926759
2021-04-26 00:50:41 -07:00
Ananya Gupta
913b621b96 qcacmn: Add enum for FISA flow table
Moving FISA flow table to prealloc.
Create a context type for FISA Flow table.

Change-Id: Iaf3f4bd66c2c73a5ba38ae6baf914ff2a1b900ac
CRs-Fixed: 2928697
2021-04-23 16:58:06 -07:00
Deeksha Gupta
66b8d9336d qcacmn: Convert WMI status code for TWT get_stats
Convert firmware enum WMI_GET_STATS_TWT_STATUS_T status code
into host enum WMI_HOST_GET_STATS_TWT_STATUS.

Change-Id: I8fbb497bff11a3629689d6d8e2be5b8c9835b2de
CRs-Fixed: 2923085
2021-04-23 00:04:21 -07:00
Manikanta Pubbisetty
96ebf151b4 qcacmn: add runtime PM stats for HTC layer
Runtime PM for HTC layer has multiple cases of GET/PUT operations.
Adding runtime PM stats for HTC layer, this helps in debugging
RTPM GET/PUT out of sync issues.

Change-Id: Ib27efd73dce0bb5bd3ff030bd7ae1bc833f29610
CRs-Fixed: 2923250
2021-04-21 22:12:05 -07:00
Manikanta Pubbisetty
2b8d9d9b94 qcacmn: do a dummy read to flush pending writes
Currently before suspending the device, we are draining
out the TX/RX SRNGs. The HP/TP updates which are done as
part of this will be posted writes(there won't be any link
levelccompletions for write transactions), there are chances
that we might end up updating HP/TP after the device enters
low power mode leading to system crashes.

In order to avoid this scenario, do a dummy read before
device is suspended; this will ensure all pendings writes are
flushed before read returns.

CRs-Fixed: 2919459

Change-Id: I5ab77f91fe14c506444bdea1587acfb34224fc69
2021-04-21 05:13:36 -07:00
Srinivas Girigowda
cc14ff656c qcacmn: Add debug logs in cp_stats event path
In the issue reported, the clear stats request from the
user space is timing out because event id from firmware is not received.
From the logs it is not clear whether host driver received it or dropped
it in the error path.

Add debug logs, to make sure cp_stats event id is received in the host
driver and also in error cases.

Change-Id: I634714281db4a82826791725ec38fd589334cde8
CRs-Fixed: 2926978
2021-04-20 20:48:36 -07:00
Kiran Kumar Lokere
88691d0f34 qcacmn: Fix the issue with OWE AP scan in 6GHz
Check the RSNXE IE presence only for SAP key mgmt type.

Change-Id: I3c9df627589e351a30dc9899ccaa7f24e9516965
CRs-Fixed: 2924842
2021-04-20 20:48:31 -07:00
Nisha Menon
63a1982b3a qcacmn: Dump the rx reo queue descs in ddr
Add iwpriv option 34 to dump the reo rx h/w descs
in DDR for debugging. This cmd will first send cache
flush cmd to REO for all rx tids and invalidate the h/w
cache. Henceforth ensuring that the reo status tlvs and
the DDR values are in sync.
iwpriv wlan0 txrx_stats 34 0
Add fix to ensure bar frame with 2k jump err code is
processed correctly using the REO error code instead of the
REO push reason.

Change-Id: Ia05be668343f3a5d4b3262b8d6a367a50875add5
CRs-Fixed: 2895965
2021-04-20 00:36:40 -07:00
Srikanth Marepalli
201ae1378b qcacmn: Do not delete/update old PMK entries if new PMK is same
Currently the PMKSA entries are deleted only if the BSSID matches
and will delete all the matching PMK cache entries even though
the new PMK is same as the existing PMK for the matched BSSID.
This results in unnecessary deletion/updation of PMKSA entries.

This change allows to check PMK as well along with BSSID. And if
the PMK doesn't match with existing matched BSSID entry then only
we delete the PMKSA entries.
This change fixes the below OKC scenario and avoids Full EAP:
Connect to AP1 -> Roam to AP2 -> Disconnect and Reconnect AP2 ->
Disconnect and Reconnect AP1.

Change-Id: Ic41c2044e70f8d375130ef9e0af9fe4b83027c26
CRs-Fixed: 2913686
2021-04-19 15:46:40 -07:00
Himanshu Batra
ca2afe2898 qcacmn: Update queue size from pending queue after command activation
As part of activaiton of serialization command from pending to
active queue, the lock is released. In the activation API, the
same API to move non scan cmds from pending to active queue can
be called if activation fails. This reentrant API may modify the
pending queue even before the control is given back to the caller
API leading to random behavior when accesing the next cmd from pending
queue via local variables.

Add fix to update queue size from pending queue after command activation

Change-Id: I8082e2a9dd3410369967ab20196853ddfa0639a7
CRs-Fixed: 2801956
2021-04-19 05:02:18 -07:00
Deeksha Gupta
1c0e26420a qcacmn: Add vendor reason codes for TWT setup reject on roaming/channel switch
The firmware rejects the TWT setup request when roaming and channel
switch is in progress. Extend enum qca_wlan_vendor_twt_status to
represent new reason codes for these cases.

Change-Id: I4446ebf2e096873ab641029447f8fba9153216aa
CRs-Fixed: 2908446
2021-04-19 00:33:32 -07:00