Commit Graph

12689 Commits

Author SHA1 Message Date
Shwetha G K
363cc4acca qcacmn: Change dev_sanity_check as non-inline function
Change dev_sanity_check API as non-inline function to
optimize the code size.

Change-Id: Ice0b589b7303317ed3a402605949050d2af4820a
2021-02-10 03:29:43 -08:00
Linux Build Service Account
b9c5acecbb Merge "qca-wifi: skip MEC ast entry creation in wlan fw" 2021-02-10 00:11:00 -08:00
Shashikala Prabhu
b69d3780be qcacmn: Add length check in beacon IE parsing function
Add length check in scan beacon IE processing function for the below IEs to
avoid any possible memory corruption.

1. WLAN_ELEMID_COUNTRY
2. WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH
3. WLAN_ELEMID_VHT_TX_PWR_ENVLP
4. WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME

Change-Id: I860bee8633849215d46c2dfe60a1a98d7c80f510
CRs-Fixed: 2873039
2021-02-09 23:07:24 -08:00
nobelj
fb74c3cff8 qca-wifi: update sequence number only on valid
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.
update the sequence number field only if it is valid.

Change-Id: I66681ebd2bda326a7c05e8af5635d02bc4ae818a
2021-02-09 20:10:24 -08:00
Vevek Venkatesan
07c4fc98d1 qcacmn: add lockless SRNG access support for Rx Rings
Add lockless SRNG access support for Rx rings.

Change-Id: Ia44f612cc5f6e50255aafaaf895044dea7a88aa7
CRs-Fixed: 2868991
2021-02-09 19:56:53 -08:00
Karthik Kantamneni
595bc84a39 qcacmn: Add RX prealloc pool for replenishing RX buffers
Add and initialize a preallocated pool of buffers which can
be used to replenish RX buffers. During replenish, the buffers
from the pool are used instead of allocating/mapping a new buffer
in the softirq context. This preallocated pool will be refilled
in thread context.

Change-Id: Idf3bd7d25c5d57ddba105ccd8fab672c26a184f1
CRs-Fixed: 2869345
2021-02-09 17:47:02 -08:00
Nitin Shetty
71e3244d46 qcacmn: skip MEC ast entry creation in wlan fw
MEC ast entry will be created only in software
and adding MEC entry to wlan fw is skipped.

Change-Id: I6991f9f12ceb22a7c599cdf3cc2a13c996d93671
2021-02-09 15:35:27 -08:00
Guisen Yang
b06c25ee09 qcacmn: Reduce the value of WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN
Change the value of WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN from 4096
to 1024, so that the rx descriptor number can be configured in
the config file of target.

Change-Id: Iedbbf3cbbfd92dc3d955e0e67aac362afbabed45
CRs-Fixed: 2862285
2021-02-09 13:02:31 -08:00
Shwetha G K
335982bd3d qcacmn: Change dp_pdev_init as non-inline function
Change the dp_pdev_init as non-inline function for
code size reduction.

Change-Id: I5720ba2e5bdf221de584b722768e23ae6a6f2b79
2021-02-09 13:02:27 -08:00
Karthik Kantamneni
278a9d30ba qcacmn: Redirect bar frames to REO exception ring in QCA6750
Redirect bar frames to REO exception ring and handle as normal
data packets.

Change-Id: Ibaa14af5bfe7bfcecc4560fec5bae218d6df7e7d
CRs-Fixed: 2869449
2021-02-09 10:44:31 -08:00
Abdul Muqtadeer Ahmed
f44435fb3c qcacmn: Change default value of ini is_bssid_hint_priority
The default value of ini is_bssid_hint_priority change 1 for AP
and 0 for non AP in documentation.

Change-Id: I4181ba5b72a5d6f013be74adaa579fb23370e25c
CRs-Fixed: 2869604
2021-02-08 15:01:19 -08:00
nobelj
b1774879cb qca-wifi: fix update bitmap for end of window
It is found that locally stored bitmap is not updated
when mpdu tried index reached end of ba bitmap. Fix is
added to update bitmap.

Change-Id: Ic754bdeaca679e63c9ebe31df624badb93b96326
2021-02-08 13:25:21 -08:00
Karthik Kantamneni
47b1fe6415 qcacmn: Add ini configuation for RXDMA replenish buffer pool
Add ini configuration support for RXDMA replenish buffer pool feature

Change-Id: Ib1edf04a61a52bf24dcbc3269df5067b090ad207
CRS-Fixed: 2869350
2021-02-08 10:51:52 -08:00
Ananya Gupta
6d07f2a272 qcacmn: Clear g_pktlog_pde after de-init pktlog
When switching from mission mode to FTM or Epping mode,
g_pktlog_pde is not cleared after de-init. When switching
back to mission mode, a warning is produced as the proc
directory is not found.
To fix this, g_pktlog_pde is cleared when pktlog is
de-initialized.

Change-Id: I1b9c9259c220a1981151dcb1e44a5621d7fd8204
CRs-Fixed: 2872045
2021-02-08 10:51:48 -08:00
Pragaspathi Thilagaraj
a71fd7e785 qcacmn: Add support for PMK validity time & reauth threshold
Add support for PMK validity time & reauth threshold

Change-Id: I31d8826ea79d6a7f8d60424130b352a98b445043
CRs-Fixed: 2869653
2021-02-08 10:51:45 -08:00
Karthik Kantamneni
8f493fd183 qcacmn: Make rx desc debug API's independent of RX_DESC_DEBUG_CHECK feature
Currently rx descriptor debug info API's are under RX_DESC_DEBUG_CHECK
feature, making those API's independent will be enabled with new feature
flag RX_DESC_LOGGING.

Change-Id: Iadb087f1b3104311b06e161bdeae975a8772e0ee
CRs-Fixed: 2869335
2021-02-08 04:18:52 -08:00
Ashish Kumar Dhanotiya
e6a652dcc7 qcacmn: Fix connect status and allow connect with null assoc IE
Currently driver rejects connect request if assoc ie length
is 0 or assoc ie is NULL which results in connect failure.

To avoid above issue do not reject connect request if
assoc ie is NULL. Also fix the connect status to send the
proper status code instead of WLAN_STATUS_UNSPECIFIED_FAILURE.

Change-Id: Icb775a88780350fa589ae8db65abdd79980558c6
CRs-Fixed: 2869967
2021-02-08 02:06:43 -08:00
Linux Build Service Account
ae5cf08572 Merge "qca-wifi: Allow agile bangradar when primary chan is non-DFS" 2021-02-07 06:37:39 -08:00
Manikanta Pubbisetty
174c6614a1 qcacmn: fix potential NULL pointer dereference issue
Fix potential NULL pointer dereference issue in
dp_rx_buffer_pool_refill().

Change-Id: I728077fac9f5062c68d92bb219b305b61fb1e9f0
CRs-Fixed: 2858208
2021-02-07 01:53:33 -08:00
Aditya Kodukula
c8963655ef qcacmn: Rename the flag QCA_QIFI_NAPIER_EMULATION
To make it generic, rename the flag QCA_WIFI_NAPIER_EMULATION
as QCA_WIFI_EMULATION.

Change-Id: I21b34475ce550b6875c5f19cf1fbba342862ecee
CRs-Fixed: 2871345
2021-02-06 14:51:18 -08:00
Padma Raghunathan
d693020df6 qca-wifi: TxCapture: Fix OOB access of tid array
In DP HTT completion, for certain frames user common TLV has tid >= 17.
Valid indices of tx_tid array are 0 <= tid < 17.
Skip tid=17 to avoid OOB access of tid array.

Change-Id: I8e3aaed56fcd5c89f75d1abceda6eba42ccaa79e
2021-02-06 19:32:03 +05:30
Rakshith Suresh Patkar
cb5da5d67e qcacmn: Update missing ie pointers in util_scan_copy_beacon_data
util_scan_copy_beacon_data copies beacon and updates ie
pointers for the cache entry. However, two of the ie pointers
listed below are not updated:
 1) hecap_6g - pointer to he 6ghz cap ie.
 2) srp - pointer to spatial reuse parameter sub extended ie.

These non updated pointers will cause use after free issues
if the parent scan entry is freed.

Update ie pointers for hecap_6g and srp.

Change-Id: I6d0a6129941e3dc1267404a4191ab368c013a102
CRs-Fixed: 2862607
2021-02-06 05:53:18 -08:00
Srinivas Girigowda
14bfc9057c qcacmn: Move ctrl_path_twt_stats functions to appropriate files
Move ctrl_path_twt_stats related functions to appropriate source
and header files.

CRs-Fixed:  2871393
Change-Id: I7043259c102e5aee6cbb13260ce2bb0c53c17853
2021-02-05 14:11:10 -08:00
gaurank kathpalia
7bcb5cd4b9 qcacmn: Add logic to set serialization timeout per tried candidate
Add logic to set serialization timeout per tried candidate

Change-Id: I08443b8d7e318f971b1905d8a457393be4ad2309
CRs-Fixed: 2852452
2021-02-05 12:06:00 -08:00
Linux Build Service Account
35918db489 Merge "qca-wifi: Enable automatic chan switch on NOL expired channel" 2021-02-05 10:10:34 -08:00
Priyadarshnee
86e7dac64c qcacmn: Add an API to restart RCAC on NOL expiry
Add function declaration for  dfs_restart_rcac_on_nol_expiry()
API. This API helps to restart RCAC on NOL expired channel
with interCAC and RCAC feature enabled.

CRs-Fixed: 2860727
Change-Id: Ifc06ed938ebc7cc6ccbe68989158939d6f399c46
2021-02-05 09:49:34 -08:00
Linux Build Service Account
eba54e4f2f Merge "qca-wifi: Filter to add AP channel report based on SSID" 2021-02-05 07:11:58 -08:00
Varsha Mishra
d5984dded1 qcacmn: Handle EAPOL frames in wbm error ring
CVE-2020-26139
With the CCE changes, EAPOL frames will now come in
wbm error ring as push reason route. These frames need to
be indicated to stack. Any other frame coming with this
reason code needs to dropped.

Change-Id: I66df0b53a36d99b3e9d9000e0bd93bf7677c221d
2021-02-05 05:03:38 -08:00
Rajeev Kumar
5f5eda6e0e qcacmn: Set SAP and P2P GO D3 wow host WMI resource config
Set SAP and P2P GO D3 wow host WMI resource config such that
FW is aware of host capability and can allocate memory for
sufficient remote peers.

Change-Id: I05499f98bd6bc080a9aefb302be12873bf19ac35
CRs-Fixed: 2869055
2021-02-05 02:50:36 -08:00
Linux Build Service Account
d2725981ba Merge "qca-wifi: Add ast entry lookup for repeater client" 2021-02-05 01:41:04 -08:00
Rajeev Kumar
afdf38701e qcacmn: Add WMI service handling for SAP and GO D3 wow
Add WMI service bit handlign for SAP and GO D3 wow mode
feature support.

Change-Id: I88efbf51d4cb0005f81ad86068f3278457f4eb05
CRs-Fixed: 2869065
2021-02-05 00:30:59 -08:00
Nitin Shetty
4e70dd8403 qca-wifi: skip MEC ast entry creation in wlan fw
the MEC ast entry will be created only in software
and adding mec entry to wlan fw is skipped.

Change-Id: If98e7cb747093b88466c809948c17a65eb81cc54
2021-02-05 03:02:03 +05:30
Adwait Nayak
eb4f57ac02 qcacmn: Add boundary checks to restrict memory corruption
With the reception of MBSSIE beacon frame, host tries to
construct beacon frames for the non tx VAPs as well.
For which, it has to copy all the IEs from the
received beacon's IE except the MBSSID relevant element
IDs, by comparing the subelement data.

The memcpy that is being used in this case, does not check
the space availability in the target buffer which may lead
to random memory corruption. Hence, using safe memcpy to
avoid buffer overflow.

Change-Id: Ib0861d606dba7725077dd530dd15ebff59058cfd
CRs-Fixed: 2857436
2021-02-04 11:00:20 -08:00
Jeevan Kukkalli
943f91c499 qcacmn: Prerequisite to include ALD headers to SON public header
Prerequisite change to include ALD headers into SON public header
as ALD is now part of SON.

Change-Id: Ic98e9ae7b5d2f0e6a2be7915b026ae169247b76f
CRs-Fixed: 2868824
2021-02-04 11:00:16 -08:00
Debasis Das
eba308d926 qcacmn: Include relevant header-file
Include relevant header-file to use QDF_BUG macro.

Change-Id: I9ad43a05410cf6641f76a94e0e9f40e323997c50
2021-02-04 08:50:31 -08:00
Lihua Liu
74efc61848 qcacmn: Avoid using small buffer address
The memory below 0x2000 is reserved for the target use,
so any memory in this region should not used by host.
But on some third-party platforms, we observe such
memory is allocated for RX buffer, which cause HW/FW
NOC error, then RX is stuck. To address this,
re-allocate RX buffers when small buffer appear.

Change-Id: Iad118e82f3fe10f92cbf5f7388dc0960542fc03c
CRs-Fixed: 2707190
2021-02-04 06:43:41 -08:00
Priyadarshnee
450926b849 qca-wifi: Enable automatic chan switch on NOL expired channel
If we bring up an AP vap enabling both rcac and interCAC feature
and configure interCAC channel as 36 HT80 and desired channel as 100 HT80,
AP comes up on channel 36HT80 and RCAC is initiated on 100 HT80.
Now, Inject radar on the agile channel 100, channel 100 HT80 gets added to
the NOL. After NOL expiry on channel 100, RCAC does not begin on
channel 100. Also, a manual channel switch to channel 100 HT80 fails.

As channel 100 is the user configured desired channel, a channel
switch to channel 100 must happen automatically after succcessful
RCAC on it. Enable the logic to do a auto channel switch to "user
desired channel" after NOL expiry.

CRs-Fixed: 2860727
Change-Id: If760e7d812adb9f059266c74064e1a480c27f89a
2021-02-04 17:32:10 +05:30
Mainak Sen
f31221effa qca-wifi: Add ast entry lookup for repeater client
For mesh latency update of clients connected behind RE,
ast entry lookup to find peer

please enter the commit message for your changes. Lines starting

Change-Id: I3380384cb246f6e1f9e6f305206decab7a5afbf5
2021-02-04 12:37:12 +05:30
Yeshwanth Sriram Guntuka
f16765d8bd qcacmn: Set authorize flag when peer state is updated to auth
Set authorize flag when peer state is update to
authenticated state.

Change-Id: I303bb9e32f72176e73bbdc2861468cf0fd1a43c6
CRs-Fixed: 2869537
2021-02-03 22:40:14 -08:00
Priyadarshnee
3ee8647572 qca-wifi: Allow agile bangradar when primary chan is non-DFS
Currently, when the home channel is Non-DFS, agile bangradar on
DFS channel is rejected. It is possible that home/operating
channel is nonDFS and the Agile channel is DFS.
However, whether the home/operating channel
is a DFS or not should not affect the agile bangradar.

CRs-Fixed: 2869794
Change-Id: I44479f8a5df439b053648d9c1401e027d813443c
2021-02-04 11:23:41 +05:30
Aditya Sathish
32515d5e22 qcacmn: Avoid checking extcaps byte if equal to IE len
Reading extcaps from the scan entry currently checks if the byte
to be accessed is less than the length of the IE. Following this,
it will attempt to access the extcap IE using the requested byte
as the index.

Avoid accessing the extcap IE if the byte is greater than one less
than the ie_len (since indexing starts from zero).

CRs-Fixed: 2856212
Change-Id: Ie357edcd6095570c05871af657381c287e92504e
2021-02-03 12:50:39 -08:00
Ankit Kumar
862ba17412 qca-wifi: Free monitor buffers in full monitor detach path
Free monitor buffers in full monitor detach path

CRs-Fixed: 2862628
Change-Id: I4d03a9e366cfc9563cf9eb5e9d75e8465e3f7690
2021-02-03 18:49:12 +05:30
Amir Patel
50133e4345 qcacmn: Fix Smart monitor init issue
For smart monitor initialize monitor buffer ring,
Monitor direct mode onto monitor status ring expects monitor buffer
ring to initilized with at least 64 buffers.

CRs-Fixed: 2863316
Change-Id: Ie67ff465522184ad776a9ba76a68c00f02f92221
2021-02-03 01:50:24 -08:00
Anirban Sirkhell
eb9acd92fe qcacmn: Fix loop index for freeing desc memory
Fix the index used for looping over descriptors
to free the memory that was already allocated, in the
event of an allocation failure.

Change-Id: I791cdf0b040664a5d39bb52f416d7aab7f3b6bf4
2021-02-03 01:50:20 -08:00
aloksing
4d9f291aac qca-wifi: Filter to add AP channel report based on SSID
add enum IEEE80211_PARAM_AP_CHAN_RPT_SSID_FILTER to set ssid based filter
for ap chan report

Change-Id: I36e882639610b2f4da84d64496561078ae5d8dfc
2021-02-03 11:30:00 +05:30
Li Feng
8c267f9645 qcacmn: Fix the leak in ce tasklet counting on one-msi platform
On one-msi platform, when some ce tasklet execute, other srng such
as reo generate the interrupt, the ce interrupt handler can also be
called and then schedule the ce tasklet, if the running ce tasklet
intend to re-schedule itself due to the rx pending, obviously will
fail, then ce active tasklet count leaked.

Decrease the ce active tasklet count if failed to re-schedule when ce
rx pending.

Change-Id: I36c1c6c007735e192bee5af12aab674ee8324ca9
CRs-Fixed: 2830443
2021-02-02 21:05:23 -08:00
Linux Build Service Account
af781f7871 Merge "qca-wifi: Fix AUTH frame issue with peer filter" 2021-02-02 17:15:46 -08:00
Lincoln Tran
2bff9b3709 qcacmn: Append 6g reg rules to main list
Currently, there are separate list for 2g/5g and 6g reg rules. Only one
list is sent north from pdev, so append the corresponding rules to the
existing list in the pdev only.

Change-Id: I28e68f345ae6faad3ac2d929dac3922e9389d53e
CRs-fixed: 2860702
2021-02-02 13:08:26 -08:00
Linux Build Service Account
2fa7f4d52a Merge "qca-wifi: Add command for "Pktlog dump on SSR" enable/disable" 2021-02-02 11:39:04 -08:00
Santosh Anbu
2f71a62bab qcacmn: Add change to support logging request to conn_mgr
Support logging history of the requests being sent to connection
manager.

Change-Id: Ifcc3a460e7694f6b6feb1b35121e6fc8e3333935
CRs-Fixed: 2860578
2021-02-02 11:04:01 -08:00