Commit Graph

20274 Commits

Author SHA1 Message Date
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
aloksing
712dc13309 qcacmn: Fix duplicate mon desc issue
We are caching status desc till truncated end reason.
Now if quota gets over before non truncated end reason
will exit from srng processing.
And before next napi if wifi down happens then during
pdev deinit we are not flushing cached status and packet desc.
which leads to duplicate desc because after
init we are resetting freelist to start of desc pool and
we still process previously cached descs.

Flushing all status and packet descs during mon pdev deinit.

Change-Id: Iaea1115f1660d0b35bf284d9b485ac86bfccf5c6
CRs-Fixed: 3587299
2023-09-26 14:41:32 -07:00
Jianmin Zhu
01c751d3fd qcacmn: Avoid NULL pointer deference
Validate sta_ctx->copied_conn_req before use to avoid NULL pointer
deference.

Change-Id: I0d46901f7709b1b6bcf63a7ca5178fb7ad90b33d
CRs-Fixed: 3621066
2023-09-26 14:41:22 -07:00
Amruta Kulkarni
02a38d9b75 qcacmn: Add wmi service bit support for t2lm
Add support for wmi service tid to link support.
Fw will indicate t2lm support using this bit.

CRs-Fixed: 3605468
Change-Id: I4d5f4e587da1cf362dcfaf2d89e7af176a115dcf
2023-09-26 14:41:11 -07:00
Guru Pratap Sharma
d383bdce33 qcacmn: Adding memory not allocate debug print
Adding memory not allocate debug print when fail to allocate
memory for scan node

Change-Id: I77c9a3deeb9fff9fd265188060ff3aa3aa17b866
CRs-Fixed: 3611905
2023-09-26 14:41:00 -07:00
Aasir Rasheed
7b3fb7fb8b qcacmn: Add wmi interface to send CSA status indication
This change is to add wmi interface for sending channel
switch Announcement event status indication from host driver.

Change-Id: I4b22280e4e4c85ebf54394c80d4fefa62eef4b2d
CRs-Fixed: 3616927
2023-09-26 05:26:18 -07:00
Rahul Gusain
f9643b92ee qcacmn: Add debug id for COEX
Add new debug id "WLAN_COEX_ID". This will help to count debug
reference for COEX.

Change-Id: Id2b0500c98fcdb08f23a54c9bd20a401e0280938
CRs-Fixed: 3622040
2023-09-26 05:26:05 -07:00
Uraj Sasan
3ed0c49f5e qcacmn: Clear the bridge context properly
Bridge context was not getting cleared properly which
was causing issue in connection of WDS STA. Make sure
to clear the bridge_sta_ctx and reset central vdev.

Change-Id: I397e5ffc1223bb0e60e67d8bc3e8c4d8bbbf7808
CRs-Fixed: 3618063
2023-09-25 20:17:21 -07:00
Jia Ding
7379485714 qcacmn: Set ipa bandwidth mbps max to UINT_MAX
Currently max values of below mentioned INIs are no longer
applicable to WiFi 6 and WiFi 7.

Hence enlarge the max value to UINT_MAX for them.
CFG_DP_IPA_HIGH_BANDWIDTH_MBPS
CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS
CFG_DP_IPA_LOW_BANDWIDTH_MBPS

Change-Id: Id5ff4d5524f0185f7c3fde5e6c53aa45c1f4f045
CRs-Fixed: 3555022
2023-09-25 14:14:57 -07:00
Jia Ding
5bae17edf3 qcacmn: Set IPA perf level based on bandwidth
Currently on sdxpinn platform, dynamic IPA perf voting is not
supported. Hence static voting from WLAN is needed to boost
IPA perf level.

In this change, static bandwidth-based IPA perf level voting
is added. Three bandwidth 320 MHz, 160 MHz and below are
defined to stand for three bw levels namely High, Medium
and Low. These three levels in turn are translated into
3 perf levels to vote IPA perf levels, which are NOMINAL,
SVS and Low-SVS.

Change-Id: I5d53a76a51603f176491ee28ebb4e5f0c3b4592e
CRs-Fixed: 3555022
2023-09-25 14:14:47 -07:00
Surya Prakash Raajen
6bd218f3be qcacmn: Send standby pdev info to FW
Send standby pdev/radio which is expected to be up while
in powersave mode to FW, to switch master control for
timers.

Change-Id: I4b48d93859359d1b6aee0b9993fd1bd3bff863f2
CRs-Fixed: 3621705
2023-09-25 05:17:23 -07:00
Srinivas Dasari
3251d2d0ad qcacmn: Add new member CM_ROAMING_USER to wlan_cm_source
Define a new member CM_ROAMING_USER in wlan_cm_source and use
it for user invoked ROAM requests.
Currently, host driver uses CM_ROAMING_HOST for ROAM_INVOKE for
both host initiated(e.g. connect on connect, qos,..) and user
initiated requests(e.g. REASSOC ioctl).
The expectations are different for these cases upon ROAM_INVOKE
failure as explained below,
1. connect-on-connect/FASTREASSOC case: Expectation upon
   ROAM_INVOKE failure is to disconnect from current AP as this
   status needs to be sent to kernel.
2. REASSOC ioctl: Expectation upon ROAM_INVOKE failure is to stay
   connected to the current AP.

So, define a new source CM_ROAMING_USER and use it to
differentiate from CM_ROAMING_HOST to avoid disconnection.

Change-Id: I36d1631a19038bc523bee096836124e3149f9941
CRs-Fixed: 3621461
2023-09-25 05:17:10 -07:00
Paul Zhang
a64af3b447 qcacmn: Get profile index and count for non-tx AP
In the scenario about MLO 5 GHz + 6 GHz and 6 GHz is non-tx AP in
MBSSID, if DUT tries to connect 5 GHz link as assoc link and uses
the scan entry generated from 5 GHz beacon. Then there is no info
about profile index and count in the scan entry and these info is
necessary for firmware when vdev up.

To resolve this issue, get the info from 6 GHz scan entry if it
exists.

CRs-Fixed: 3616899
Change-Id: Ic9bf9bc107c3486be1e87ea2c19c5d388ca41883
2023-09-25 01:30:04 -07:00
Santosh Anbu
ae01803cfd qcacmn: Clear up bmap for vdev moving to UP_ACTIVE state
During MLO AP vdev partner bringup, SYNC_COMPL can be posted for a
vdev twice since the bitmap is not cleared after posting the event.
But is cleared only when the vdev exits the sync_wait state.

Hence add change to clear the bitmap before posting the event so
so that no other partner vdev will post the same event once again.

Change-Id: I15226b650e4dc51a379d97556f2f2ab62319adf7
CRs-Fixed: 3605598
2023-09-23 17:23:59 +05:30
Ruben Columbus
953b07cf94 qcacmn: add rx_buffer_size to softumac case
add wlan_cfg_ctx in wlan_cfg_soc_attach for WLAN_SOFTUMAC_SUPPORT case
for compatibility with specific chipsets.

Change-Id: Icd1bbe85182d6baf1e25dceed0b45994aa9f55fc
CRs-Fixed: 3619315
2023-09-23 17:22:48 +05:30
Linux Build Service Account
38ceb24812 Merge "qcacmn: Parse Extended MLD CAP & OP of ML IE" 2023-09-22 11:09:35 -07:00
Vijay Krishnan
419023d09e qcacmn: Introduce function to check max phy REP
If the rpt_max_phy featurte is enabled, the AP VAP of a
repeater may come up in chan 36 HT160 mode while the STA
of the repeater may come up in chan 36 HT80 mode. The
ic_curchan has the max BW value(i.e. 160 MHz). In this
case, ic_curchan is HT160. But dfs_curchan is updated
to HT80 by the API vdev_mgr_start_param_update. The
updated BW is send via VDEV START command.

This creates a mismatch between FW and HOST. FW has the BW
as HT160 and HOST has the BW as HT80. At this time, if
radar is found on chan 36, Host rejects the radar because
dfs_curchan is 36HT80 and it is a non-dfs channel. FW stops
beaconing because of no respone from host.

Fix: Dont send the VDEV START command, if the repeater max
phy mode is enabled.

This patch introduce a new API wlan_rptr_check_rpt_max_phy
that is used to invoke WIN API wlan_check_rpt_max_phy if
repeater max phy mode is enabled or not.

Before sending VDEV START command, check if the opmode is STA,
and repeater max phymode is not enabled. If the two conditions
satisfy, then send VDEV START command.

CRs-Fixed: 3613048
Change-Id: I072f62fe038c5f4dfae0318fff54189dca9e5a46
2023-09-22 07:29:13 -07:00
Yu Wang
28804f0f03 qcacmn: Include 'qdf_list.h' explicitly to avoid compilation failure
Since qdf list related structures are referenced in
'cdp_txrx_cmn_struct.h' when WLAN_FEATURE_TX_LATENCY_STATS
is enabled, include 'qdf_list.h' explicitly for such case
to avoid possible compilation failure (we've got failure
in Lanai perf build without this change).

Change-Id: Ib84c0ea0501475b9548033e5e74177ab95f3260b
CRs-Fixed: 3621305
2023-09-22 07:29:02 -07:00
Aravind Kishore Sukla
bce140bd10 qcacmn: Add check to validate ml cap offset
Before passing ml cap offset, there is no proper
check for its validation, which may lead to OOB.

Add a check for its offset, before passing.

Change-Id: I5e5a10e8740b3cd3fcef2c6aef1f0a43c74818cd
CRs-Fixed: 3581103
2023-09-22 07:28:51 -07:00
Linux Build Service Account
288f8c09ea Merge "qcacmn: Add DP rings to SSR dump" 2023-09-22 01:14:07 -07:00
Linux Build Service Account
bd7db3b28b Merge "qcacmn: Add Extended MLD Capabilities And Operations in Basic ML IE" 2023-09-22 01:14:01 -07:00
Linux Build Service Account
771b5ac7a1 Merge "qcacmn: Get new scan capability" 2023-09-22 01:13:58 -07:00