Commit Graph

20195 Commits

Author SHA1 Message Date
Vaishnavi Chekuru
c3697eb2a0 qcacmn: Changing the integer suffix from 1L to 1ULL
In expression 1L << err_code if the err_code is more than 32,
it is left shifting by more than 32 bits which will result in
undefined behavior and will be overflowed. So changing the suffix
from 1L to 1ULL as max value of err_code can go up to 63.

Change-Id: I6218a1634e982e4f25e5d92d55325ed9bb2658e9
CRs-Fixed: 3627050
2023-10-04 19:03:05 -07:00
Alan Z. Chen
6505649e39 qcacmn: Change dp_get_peer_state() log to debug
Excessive logging when dp_get_peer_state() is called is causing
power performance issues. Change log level from info to debug
in order to reduce excessive logging.

Change-Id: I752b0bd443ad6bc4431c8f25a0c483729bebaa37
CRs-Fixed: 3631190
2023-10-04 19:02:55 -07:00
Deeksha Gupta
78868f0a7e qcacmn: Add new API to clear the MLO MGR context
Add new API to clear the particular AP link info
from the MLO MGR context.

CRs-Fixed: 3616166
Change-Id: Ia3b69a58dd3d3687199ee58462d59ba76c24cd6d
2023-10-04 11:17:10 -07:00
Deeksha Gupta
a8ed648342 qcacmn: Optimize ML connection related logs
Optimized and remove redundant ML connection logs.

CRs-Fixed: 3624931
Change-Id: Ieb8c27104a9c5e1247441cd347e91d118dcc45d1
2023-10-04 11:16:59 -07:00
Vinod Kumar Myadam
9bb0d120db qcacmn: Add support for INI twt_disable_info
Add support for INI twt_disable_info

Change-Id: Ib82f238b60e9b56636b9209edfc1e9773708553f
CRs-Fixed: 3629015
2023-10-04 08:13:45 -07:00
Nirav Shah
e613669ec8 qcacmn: Define a QCA vendor attribute to set traffic shaping policy
Define a new QCA vendor attribute to configure traffic
shaping policy applied during coex scenarios.
Subcmd is QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION

Change-Id: I42f6ffb20156fc7e7ecbceead825691a94c4fe9d
CRs-Fixed: 3625243
2023-10-04 08:13:34 -07:00
Sushant Butta
41e5a457c0 qcacmn: cdp support enable/disable dp debug logging
Added cdp support to get/set
dp debug logging in per packet path.
Enable debug logs only if dp debug logging
is enabled.
With this change there is benefit of all CPU
average around 1% to 1.5%

Change-Id: Ibe0ca4c75211cace4c5fca9ec0bce1c594ca8a6b
CRs-Fixed: 3623910
2023-10-04 08:13:23 -07:00
Aman Mehta
d6ee46a496 qcacmn: Add support for average tx/rx rate
Apstats use to return last tx/rx rate for avg. tx/rx rates.
This change updates the behavior to return average tx/rx rates.

Change-Id: Idfff2ae9df7c5af1ef86ceb5688b1e01fd6dae21
CRs-Fixed: 3628056
2023-10-03 12:01:45 -07:00
Manikanta Pubbisetty
d5578559ec qcacmn: Initialize RX refill buffer pool size for SOFTUMAC arch
In the current code, RX refill buffer pool size is not initialized for
SOFTUMAC architectures, this was leading to a kernel BRK panic.

Initialize RX refill buffer pool size for SOFTUMAC architectures to fix
this.

Change-Id: I0424ba69b0d5f33386e931d4e6723fc8265e216c
CRs-Fixed: 3621417
2023-10-03 12:01:32 -07:00
Srinivas Dasari
fa6e3838d9 qcacmn: Define an API to check if any MLO link is disconnecting
Add an MLO API to check connection manager state machine if
any MLO link is in disconnecting.

Change-Id: I411ed9c9ab7cc0378147b5a4cf930b43cd3f7814
CRs-Fixed: 3628519
2023-10-03 12:01:20 -07:00
Deeksha Gupta
379833c37a qcacmn: Enchance candidate scoring log prints
Enchance and Optimized candidate scoring log prints.

CRs-Fixed: 3625814
Change-Id: I9b6e148c5dc1b97ae179edee60d1b2d7ea792e84
2023-10-03 02:34:54 -07:00
Gururaj Pandurangi
852d0cee43 qcacmn: Add support to configure MLD ID in scan request
In the MLO-MBSSID test, STA can request information of
non-Tx BSS through Tx BSS by configuring non-Tx BSS MLD
ID within the ML probe request that is invoked as part
of scan request. Add support to configure MLD ID in
scan start params to FW.

Change-Id: I4a6debf6c3ec830fbe3aee1d3aa60ad7218cbcd6
CRs-Fixed: 3591596
2023-10-02 20:30:12 -07:00
Srinivas Pitla
3d43b6ab94 qcacmn: Fix egress and ingress count in WSI stats
This change modifies the egress count as secondary link counter
and ingress counters as bypass link counters

Change-Id: I5ad49eec15ca8a0b9858f5c85a76dc69644bdf72
CRs-Fixed: 3629542
2023-10-02 17:52:01 -07:00
Aasir Rasheed
e627ca11b5 qcacmn: Parse Extended MLD Capabilities & Operations of ML-IE
Add support to parse Extended MLD Capabilities and Operations
Subfield of the ML-IE.

CRs-Fixed: 3571330
Change-Id: I7dc34c1fb9ef1eee351bc4d964a002b687289799
2023-10-01 18:12:34 -07:00
Aasir Rasheed
8c6365939b qcacmn: Send max num of active links to fw
This change is to send max num of active links recommended
by AP to the fw.

CRs-Fixed: 3599429
Change-Id: Id84b7d1aa8d6eb29d3acef2f3e8c552bc6c636f0
2023-10-01 18:12:23 -07:00
Jinwei Chen
e0d7d004e0 qcacmn: Set skb's ip_summed to CHECKSUM_NONE if checksum failure
Only if both IP and TCP/UDP checksum passed for TCP/UDP
packets, then set ip_summed to CHECKSUM_UNNECESSARY,
otherwise set it to CHECKSUM_NONE.

Change-Id: Ic4973e32d622f66830dbd7a5bc03012cf6dd87bf
CRs-Fixed: 3626292
2023-10-01 12:36:36 -07:00
Deeksha Gupta
5ebeb8ac41 qcacmn: In MLMR case don't set is_valid_link to false
When the vendor roam score algorithm is enabled in a
3 link connection scenario, driver currently sets
'is_valid_link" to 'false' in case of MLMR. Consequently,
this causes if AP advertise itself as 3 links,
but driver can only establish 2 link connection.

To fix this issue, When the vendor roam score algorithm
is enabled in MLMR case, instead of setting 'is_valid_link'
to 'false' for a particular partner link, the driver
should assign a 'total_score' of 0 to that link.
This helps us to make that link as a standby and inactive
link.

CRs-Fixed: 3623270
Change-Id: I80d6b052134c2c8c428745af4aa3a740499ee6e1
2023-10-01 12:36:25 -07:00
David Oladunjoye
d444efd422 qcacmn: Set new scan policy based on scan request type
For user-initiated scan request we need to set scan policy based on
scan type. (eg. Low Power Scan, High Accuracy Scan).  Based on type
we set the policy for driver to use. Set the scan policy based on
scan type.

Change-Id: I8cd555eee8d7332a88fc7f2b6093b0a1dc3127b1
CRs-Fixed: 3509137
2023-10-01 09:35:42 -07:00
Abhishek Singh
342cc8dfb8 qcacmn: Optimize logging in scan filter
Optimize logging is scan filter by removing the logs from
success case.

Change-Id: I1687c9e4ad1394b25baf37a3fa3594571998fd7e
CRs-Fixed: 3626736
2023-10-01 03:50:25 -07:00
Jeevan Kukkalli
dc9d363e5b qcacmn: Add check for invalid frame ctrl version
Add check for invalid frame control version while handling
raw frames with FCS errors in monitor version 2 path

Change-Id: Ia46de15a235ec5ab2f0b67ff9769cb0b5c38aeee
CRs-Fixed: 3620872
2023-09-30 22:10:38 -07:00
Ajithkumar Jayamoorthy
f9b6804db1 qcacmn: Resolve coverity issues for operational rate config implementation
Resolve the 'modulo by 0' coverity issue for the implementation for
manual configuration of mcs via "tr069_set_oprate" command.

Change-Id: Iccb29ed0aede59929267dd22e580609c7c853577
CRs-Fixed: 3625355
2023-09-30 19:07:28 -07:00
Shashikala Prabhu
8ccae22749 qcacmn: Set AUTH_AND_DEAUTH_RANDOM_TA flag for 11az RTT
Set NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA in wiphy ext feature
flag to allow random TA to be used with authentication and
deauthentication frames when MAC secured or MAC_PHY secured ranging is
supported.

Change-Id: I96d1026daad4ffca271aed8c9aa09ff422573209
CRs-Fixed: 3617665
2023-09-30 02:34:51 -07:00
Pragaspathi Thilagaraj
95caa8459f qcacmn: Update OSIF link info for assoc vdev after roaming
Once roaming is complete, the osif link info for Assoc vdev
is not updated, resulting in link switch on assoc vdev failure
after roaming.

Update OSIF link info for assoc vdev after roaming. Also clear
the OSIF link info upon roaming from multi link AP to single
link AP

Change-Id: I7a05d61011f6ac39e7107c4d2270aa3025d79142
CRs-Fixed: 3618994
2023-09-29 16:31:02 -07:00
Amir Patel
f03c62102b qcacmn: Update per-MPDU fcs err in radiotap hdr
Update per-MPDU fcs err in radiotap hdr

Change-Id: I3570ec94435746538cccc07ec052e26a19ab6452
CRs-Fixed: 3619376
2023-09-29 16:30:51 -07:00
aloksing
1f0e7d3b82 qcacmn: preventing potential Side effect of ++ operation
preventing potential Side effect of ++ operation in assertion

Change-Id: Ibdad7e856143fbcde45d4c8db637b608ef3983cd
CRs-Fixed: 3617044
2023-09-29 16:30:41 -07:00
Jyoti Kumari
81a448455b qcacmn: Fix ETSI reg_domain for SRD channels
Currently, only ETSI13 check is present for SRD channels but
ETSI18 and ETSI20 are also added for SRD channels.

Add a check of ETSI18 and ETSI20 to remove SRD channels

Change-Id: I3bd7c9d9d2ff26f6f625fc70f1ca89cb39634dfb
CRs-Fixed: 3614070
2023-09-29 16:30:30 -07:00
Sheenam Monga
13e4f87d48 qcacmn: Trigger Self Recovery on link_switch timeout
Currently, on link switch timeout recovery is not triggered
due to which issues may come later and impact FW also.

Fix is to trigger self recovery on timeout.

Change-Id: I6c81c2da9df39ae96a6d8b0e2ce1c22507cf777a
CRs-Fixed: 3625653
2023-09-29 16:30:19 -07:00
Paul Zhang
e3b8dfb503 qcacmn: Add enum TDLS_MAX_ACTION_CODE
Add enum TDLS_MAX_ACTION_CODE for tdls_actioncode

CRs-Fixed: 3625727
Change-Id: I613cec05794c082c86f609cbbba9143d2bd3f940
2023-09-29 11:23:55 -07:00
Himanshu Batra
3efaabd704 qcacmn: Update UIO info for DP data rings
Update UIO info for DP data rings.

Change-Id: I0c6e8c8e59aefb373dc024d91eb1379ed7564f31
CRs-Fixed: 3623839
2023-09-29 11:23:33 -07:00
Aasir Rasheed
63788401a2 qcacmn: Enhance STA key management
Currently, Host driver is not resetting the STA key management
for each connection, causing unpredictable behavior during
subsequent connections.

This change is to enhance STA key management to reset with each
connection and ensuring the deferred key flag is set only
once per link.

Change-Id: I5a28e6c8b3919929bafa1a25da4b5fa4b9adde98
CRs-Fixed: 3621227
2023-09-29 02:24:28 -07:00
Srinivas Dasari
aafe99c365 qcacmn: Parse 11AX RNR TBTT info field even if 11BE is disabled
Currently, below 11BE RNR TBTT field doesn't get processed when
11BE is not defined,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
So, station is not able to parse the RNR IEs from the 11BE APs.
Parse TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
always but extract 11be info only when 11BE define is enabled.
Also, cleanup the duplicate code.

Change-Id: I49e38875f3f0a3ab238636f7a8e0f93c7aa4d04b
CRs-Fixed: 3624227
2023-09-29 02:24:16 -07:00
Jyoti Kumari
d14e4dcaa0 qcacmn: Modify default value of last_scan_ageout_time
Currently, default value of last_scan_ageout_time ini is 0 sec.
Modify it to 30 sec to avoid dependency on userspace
configuration.

Change-Id: If0d00c98950a0c20f22ee73d01e4442bd0d677c0
CRs-Fixed: 3625696
2023-09-29 02:24:03 -07:00
Srinivas Dasari
6278e3dbbc qcacmn: Make an API for simultaneous scan check
Currently, the decision to allow/reject simultaneous scans is in
wlan_cfg80211_scan() API. The same check is needed for
remain_on_channel scan request also. Create an API and make it
public to facilitate the same.

Change-Id: I0f563e4ab7b27eefb3fdee7aef61bf8bedb76802
CRs-Fixed: 3625840
2023-09-28 23:09:22 -07:00
Adwait Nayak
ccbe42985c qcacmn: CFR buffer length calculation for QCN6432
For QCN6432, below factors are taken into account to
calculate the maximum CFR buffer length:

max number of MU users supported = 8
uCode header = (14 + (max number of MU users supported *2) )*4
             = 120 Bytes
Max CVMEM Banks available = 4
Each bank is capable of storing 8KB
Total CVMEM bank size = 4 * 8 = 32KB
Max allowed mode is 320M
Max number of actual tones supported = 1001

Max CFR data len = 1001 * Max NSS * Max Chains * Size of tone
                 = 1001 * 4 * 2 * 4
		 = 32032 Bytes

Max CFR buffer length = Max CFR data len + ucode header
                      = 32032 + 120
		      = 32152 Bytes
CRs-Fixed: 3623934
Change-Id: If859c3a861a5b5698b69ee6afe4d3b8d0b048812
2023-09-28 23:09:11 -07:00
Vijay Raj
337f81f1d0 qcacmn: Add frequency check in reg_freq_to_band
In API reg_freq_to_band(), for frequency of value '0',
5 GHz band is returned.

Add check to return INVALID_BAND when frequency
passed as argument is '0'

Change-Id: Ie40ae73ae71769538bd04be4434dafa42b9d21d0
CRs-Fixed: 3620699
2023-09-28 23:09:00 -07:00
Chunquan Luo
74e0e8399a qcacmn: Update roam stats of AP BSSID to user space in a QCA vendor attribute
Fetch AP BSSID from each roam connection frame and cache the info in the
WLAN driver. When user space gets roam stats by
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_INFO, user space can now collect the AP
BSSID info for roam issue.

Change-Id: I4d78fa30096a30dd2987d4c7fa9698ff62777b3b
CRs-Fixed: 3615554
2023-09-28 06:58:11 -07:00
Liangwei Dong
cab8f71b14 qcacmn: unregister link switch cb before mlo global ctx deinit
Unregister mlo mgr link switch cb before mlo global ctx deinit
because the cb is maintained by global ctx.

Change-Id: I2bd95e74e9067e19db7448510bc6255c3bd7a1f3
CRs-Fixed: 3604403
2023-09-28 06:58:00 -07:00
SACHIN AHUJA
e4db5e6c73 qcacmn: Modify qca_wlan_vendor_attr_config attribute
QCA_WLAN_VENDOR_ATTR_CONFIG_MODULATED_DTIM attribute is defined
incorrectly.

Modify this attribute to QCA_WLAN_VENDOR_ATTR_CONFIG_DYNAMIC_DTIM
as per the upstream qca-vendor.h file.

CRs-Fixed: 3617541
Change-Id: I0f5ea3fb419af3e6850270a500edf2fa72401e93
2023-09-28 06:57:49 -07:00
Huashan Qu
ad7c045aca qcacmn: Add NULL check for scan_info pointer
Add NULL check for scan_info pointer to avoid NULL pointer deference
in function extract_roam_trigger_stats_tlv().

Change-Id: I42f957d00b1ad27845782f099865210eb4ba24a0
CRs-Fixed: 3624591
2023-09-27 22:14:06 -07:00
Aman Mehta
6e3897bd78 qcacmn: Update stats API interface with xmit type
Update stats API interface with xmit type. Also, updates
unmap peer update mechanism.

Change-Id: Ib39dee1c74e59d5c2ff523b3eca983e54b54676b
CRs-Fixed: 3561679
2023-09-27 22:13:56 -07:00
Aman Mehta
f49654adcd qcacmn: Add stats API for legacy unmapped peer
Add stats API for legacy unmapped peer for disabled enhanced stats

Change-Id: I4d1a52d1acc07661eb05d3fbecd1176fc4d186c5
CRs-Fixed: 3561679
2023-09-27 22:13:45 -07:00
Aman Mehta
3694cff9dc qcacmn: Update mlo ctx stats API with xmit type
Update mlo ctx stats API with xmit type. MLO ctx ingress stats will
be stored as per the legacy/mlo xmit type.

Update stats incrementing mechanism on peer unmap.

Change-Id: I2f16b95e64e6a7697d18d9453e9f7c60631f80bb
CRs-Fixed: 3561679
2023-09-27 22:13:35 -07:00
Aman Mehta
15edfd0a13 qcacmn: Update stats API with xmit type
Update stats API with xmit type. Ingress stats will
be stored as per the legacy/mlo xmit type.

Change-Id: Ic7612a4cf6a4099d6a51dc1cce94c4c3d713672c
CRs-Fixed: 3561679
2023-09-27 22:13:24 -07:00
Aman Mehta
3768768424 qcacmn: Update tx ingress stats with xmit field
Update tx ingress stats with xmit field

Change-Id: I86ad9c59f49213e2968751bfc488eb2bdd95baa5
CRs-Fixed: 3561679
2023-09-27 22:13:14 -07:00
Aman Mehta
cfbdba9b7e qcacmn: Update function params with xmit for stats
Stats updating functions will take an extra argument to specify,
under which xmit type respective stats should be updated.

Change-Id: I5a66f796079d177c87ac5bde7483c6431ed9bce6
CRs-Fixed: 3561679
2023-09-27 22:13:02 -07:00
Amit Mehta
73fb81505d qcacmn: Print peer info in dp_get_peer_state
Currently host is not printing peer info in
dp_get_peer_state, due to which its difficult
to check for what peer state is returned for
which peer.

To fix the issue print peer info in dp_get_peer_state
and print additional peer info in dp_peer_mlo_setup
and dp_peer_state_update

Change-Id: Iccaf46f1eb778c42e5039da14499b82502508727
CRs-Fixed: 3620093
2023-09-27 13:09:53 -07:00
Vinod Kumar Pirla
b1f923bc46 qcacmn: New substate for VDEV in INIT due to link switch
If connection fails, CM state will be moved to INIT state and
kernel will not be made aware of this connection failure in case
of link switch and treats the interface as if it is connected.
In such case kernel and host will be out of sync and because of
this if any disconnect request is received host will drop them
immediately as VDEV is in INIT state.

Introduce new substate of VDEV for INIT state. If VDEV moves to
INIT state either due to link switch disconnect or link switch
connect failure, instead of being in INIT-IDLE state move VDEV
to INIT-IDLE_DUE_TO_LINK_SWITCH. If any disconnect request is
received in INIT-IDLE_DUE_TO_LINK_SWITCH state then instead of
dropping the request forcefully queue the disconnect and proceed
for disconnect to notify kernel.

Drop link switch connect will be dropped if VDEV is not in
INIT-IDLE_DUE_TO_LINK_SWITCH state.

Change-Id: Ifb6b72f0720b95cf862e9a4ff756b6577a3e45fd
CRs-Fixed: 3617919
2023-09-27 13:09:42 -07:00
Devender Kumar
932f2d2bb2 qcacmn: Add support for RXDMA buf ring for VLAN with IPA
when IPA and WDI3_VLAN is enable we require 4 RXDMA buf ring.
1 RXDMA_BUF SW for HOST
1 RXDMA_BUF SW for IPA
1 RXDMA_BUF SW for IPA_VLAN
1 RXDMA_BUF HW ring

Change-Id: I71b75541c87aaf3a89be023241b6dcd163fc21bb
CRs-Fixed: 3614234
2023-09-27 03:31:28 -07:00
Chunquan Luo
c650a56238 qcacmn: Refine roam stats frame subtypes in a QCA vendor attribute
Enumeration qca_wlan_roam_stats_frame_subtype defines the various frame
subtypes which may be collected by the driver and reported via the
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_FRAME_SUBTYPE attribute.

Two of the enumerators are:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_PREAUTH
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC

These were initially defined and used to respectively report
Authentication Response and Reassociation Response frames.

Now there is a requirement to also report Authentication Request and
Reassociation Request frames. In order to satisfy this requirement,
add two new enumerators:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_AUTH_REQ
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC_REQ

Note that the first of these uses the standard term "AUTH" instead of
the confusing term "PREAUTH" used previously.

And to align with that naming, and in order to clearly show the usage
of the original enumerators, rename them to:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_AUTH_RESP
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC_RESP

Furthermore, Authentication Request/Response frame refers to the
Authentication frames sent by the non-AP STA and AP, respectively.

And finally, to support backward compatibility with applications using
the original enumerators, redefine those in terms of the new names.

Change-Id: Ibbe62eefd695542cbd19d1b697446a60e5c4e747
CRs-Fixed: 3623174
2023-09-27 03:31:15 -07:00
Ruben Columbus
4a7db7f38e qcacmn: revert 2 gerrits from 4k ini change
This reverts commit Icd1bbe85182d6baf1e25dceed0b45994aa9f55fc.
This reverts commit Id00c6351bf6bc1b9df5e19064b2057dadd315e9b.

- revert add rx_buffer_size to softumac case
- revert 4k skb buffer change.

Change-Id: I623b200c0c5f08f0e372629cb1c972b521c25eaa
CRs-Fixed: 3623665
2023-09-26 14:41:43 -07:00