Commit Graph

4203 Commits

Author SHA1 Message Date
Guru Pratap Sharma
6646c062ff qcacmn: qdf export mlme_11be_target_capab get/set api
qdf export wlan_psoc_mlme_get_11be_capab and wlan_psoc_mlme_set
_11be_capab api

Change-Id: I4cd10dd40861abf06514e46c7d554a28f7991020
CRs-Fixed: 3540341
2023-06-27 04:04:02 -07:00
Himanshu Batra
bc4f921706 qcacmn: Add support to reject ptqm migration for 4-link RDP
Add support to reject ptqm migration for 4-link RDP

Change-Id: Ib81e053880b74b3c925eb0c69ace3e80f9d08a66
CRs-Fixed: 3529926
2023-06-27 04:03:52 -07:00
Himanshu Batra
be34bbe6fc qcacmn: Add support for ptqm migration
Add support for ptqm migration

Change-Id: I3f3d6e410bee554477e8e058b1da51f2af5abb23
CRs-Fixed: 3529926
2023-06-27 04:03:41 -07:00
Himanshu Batra
6f407b1a93 qcacmn: Modify return type of primary umac selection API
Modify return type of primary umac selection API so that multiple
callers can use the same algo for selecting new primary umac

Change-Id: I6e38839ae3489b6643ef0337c8e20d7c738c3763
CRs-Fixed: 3529926
2023-06-27 04:03:29 -07:00
Vishal Miskin
210aad0930 qcacmn: User country set based on INI config params
Do not allow userspace to configure regulatory country
when below INIs are set as:
gCountryCodePriority=0
g11dSupportEnabled=1

Change-Id: Iaae8e209fb99802f67d906fcd70d2c7c0a2f8f06
CRs-Fixed: 3499558
2023-06-26 17:22:34 -07:00
Krupali Dhanvijay
e60150599d qcacmn: Add support to reset CPU freq in HO failure
CPU min frequency is boosted to maximum once roam start is received

Add support to reset CPU frequency in case of HO failure.

Change-Id: I137f78e3a307be136bcc27760be3d91cb6c1868b
CRs-Fixed: 3522954
2023-06-26 03:21:53 -07:00
Aasir Rasheed
aa7c47fe95 qcacmn: Add crypto changes for code convergence
At present, the crypto module utilizes the wlan_crypto_comp_priv
structure to store crypto keys. However, there is a need to store
keys for individual links in n-link MLO. To address this requirement
it is proposed to store the key from the vdev level to the psoc level.
This change will allow the reuse of a common structure.

Change-Id: Idc0d8bb11a80b66c7ded5c930ec0560566398890
CRs-Fixed: 3527400
2023-06-23 15:47:23 -07:00
Vijay Raj
c9ffbec347 qcacmn: Remove redundant check in wlan_scan_start
In api wlan_scan_start(), redundant check for
scan_start_req is observed in some static analysis
tool.

Remove the redundant check in the ap
wlan_scan_start() as the check is present in the
api scm_scan_free_scan_request_mem

Change-Id: Ic320bb95253668310c5d738216daba62ba2f4b3f
CRs-Fixed: 3528505
2023-06-22 09:10:44 -07:00
Aniruddha Mishra
df9658cc1d qcacmn: Add nstrinfo in ml_partner_info and parse
Add nstrinfo in ml_partner_info and parse sta info.
Add nstr_info in ml_peer_ctx and peer_assoc_params
and send to FW

CRs-Fixed: 3483776
Change-Id: I255fc671b84a2048c6057a61a6de8d81db36c681
2023-06-22 06:06:49 -07:00
Abhinav Kumar
c29e8614e0 qcacmn: Process MIXED_MODE_ACTIVE_NUM_LINKS vendor command
1. Host receives QCA_NL80211_VENDOR_SUBCMD_MLO_LINK_STATE
vendor command.
2. parse the new attribute
QCA_WLAN_VENDOR_ATTR_LINK_STATE_MIXED_MODE_ACTIVE_NUM_LINKS
and get the number of MLO links to operate in the active state.
3. If any of the links is in an inactive state due to concurrency,
we need to reject the request.
4. Host sends to FW via WMI command WMI_MLO_LINK_SET_ACTIVE_CMDID via
the below WMI attributes with mode WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM
and set the wmi flag control_flags to indicate if FW need to use
force link number instead of force link bitmap.

Change-Id: I91759e6a1273d393f4bef1264478950416752355
CRs-Fixed: 3529489
2023-06-21 16:54:09 -07:00
Thirusenthil Kumaran J
9c6e306ffd qcacmn: Do not drop beacons for channels present in NOL
Currently, during scanning, while parsing the received beacons,
the beacon IEs are checked to verify whether the channel
present in the beacon is invalid. If the channel is found to be
invalid, the corresponding beacons are dropped. This check treats
the channels in the NOL list as invalid channels.

Consider a case of a repeater with RCSA enabled; when the RE
detects a radar, the RE adds the radar detected channels to
NOL and sends an RCSA action frame to the Root AP to intimate
the Root about the radar detection. The RE will also wait for the
Root to send CSA to RE. But in this case, the RE will not parse
the CSA IE received from the Root, as the beacons from the Root
AP are dropped, as the channel present in the beacon is
considered invalid.

The purpose of the channel validity check in the beacon parsing is
to avoid receiving beacons from an invalid channel, that is, the
channels that are not supported by the device. Since NOL channels
are valid, we can parse the beacons received from an NOL channel.
Therefore, to fix this issue, use the regulatory API
'wlan_reg_is_freq_enabled' instead of the API
'wlan_reg_is_disable_for_pwrmode' to check if the channel is
invalid.

The API 'wlan_reg_is_freq_enabled' treats NOL channels as valid
channels.

Change-Id: Iad502363c0ad15be2a009480c49bffcf8e004943
CRs-Fixed: 3513560
2023-06-21 13:30:48 -07:00
Amith A
d4415c7efe qcacmn: Modify EIRP and PSD data types to int from uint
ACS fetches EIRP powers of channels from the regulatory module using API
wlan_reg_get_eirp_pwr. The type returned by this API is unsigned and
hence any negative value is received as very high positive value. This
results in incorrect calculation of puncture bitmap and any other APIs
that use these power values.

To resolve this issue, modify the data type of EIRP and PSD variables
from uint to int in APIs used for calculating the best power mode.

Change-Id: I3af8e8bcda7cb872f8e295a78c579243a5469ab5
CRs-Fixed: 3515926
2023-06-20 06:39:28 -07:00
Vijay Patil
01da59899e qcacmn: Add fix to free roaming info from copied reassoc response
In current scenario during OWE roaming when HB failure occurs,
it should clean copied reassoc response and roaming info. But it
is not getting freed which leads to memory leak and host driver
crash while on idle shutdown.

Free copied reassoc response at mlo_dev_ctx_deinit().

Change-Id: I1a25e4ad1ba62d3d6b90da38cb5b7ab7c3f8e91a
CRs-Fixed: 3530058
2023-06-20 06:39:18 -07:00
Sai Rupesh Chevuru
d261c841e3 qcacmn: API to get the number of links for a peer from CP
API to get the number of links for a peer from CP

Change-Id: I63b118a339f591f0a86ddcc29c392dc5f9803e01
CRs-Fixed: 3521689
2023-06-19 11:01:40 -07:00
Thirusenthil Kumaran J
1301454202 qcacmn: Enumerate OCAC completion status
Currently, OCAC status in DFS SOC object is defined as a boolean type,
whereas, individual OCAC status types are defined as macros. Hence, it
becomes difficult to differentiate between various status values.

To solve this issue, enumerate OCAC status types together and change
the OCAC status in the DFS SOC object from boolean to the enumerated
type.

Also, create a new object 'adfs_completion_params' to store the Off
channel CAC completion parameters within the wlan_dfs structure.

Create a new api 'dfs_agile_cleanup_rcac' to clear the agile RCAC
parameters.

Change-Id: Id95014f4f81b4a2137092a5dd107c570d70058b6
CRs-Fixed: 3501679
2023-06-17 17:02:38 -07:00
Jianmin Zhu
da25bf14e9 qcacmn: Select best link as assoc link
For mlo 5+6, 6 GHz band score is higher than 5 GHz, so 6+5 total score is
higher than 5+6, 6+5 is always selected before 5+6 even 6 GHz link score is
much worse than 5 GHz.

To fix it, calculate each link score for each MLO AP, if assoc link is
best link, add a boost score, then it can be selected first.

Update band weight and score for both SLO and MLO, select average of link
band score as MLO band score.

Change-Id: If0714fa94031d5746d89388917540f0e34086d86
CRs-Fixed: 3483850
2023-06-17 17:02:27 -07:00
Pragaspathi Thilagaraj
2eb6a33153 qcacmn: Avoid unlink bss in vdev INIT state
When some faulty AP changes the SSID from hidden to non-hidden
or vice versa, then unlink bss and update bss to kernel happens
multiple times. Then when disconnection happens, it causes
abnormal behavior since the bss entry looks corrupted.

So avoid unlink bss in INIT state to avoid corruption
since cfg80211_disconnected() calls
cfg80211_wdev_release_bsses(wdev) already.

Change-Id: If07d1b8fa92057c9320c9ab243b9cbef30ac21ba
CRs-Fixed: 3516816
2023-06-16 18:24:35 -07:00
Priyadarshnee Srinivasan
1768e99caf qcacmn: Add puncturing support for PDEV_GET_OPERABLE_CHAN
When we bring up AP on channel 52 HT80 and inject radar on 56 with
dfs puncturing feature enabled, the channel 56 is put to NOL
and is punctured. However, channel 52 HT80 is still operable
with the puncture pattern 0x2.
But to the SON application, we do not report 52 HT80 as
an operable channel via PDEV_GET_OPERABLE_CHAN.
This is because reg_is_chan_supported() considers NOL channels as
disabled and does not support DFS puncturing feature.

Add puncturing support for reg_is_chan_supported() API. For every
channel/bw combination present in the opclass table, find out if there
are NOL infected subchannels and if so, calculate the DFS puncturing
pattern and feed that as an input to
reg_fill_channel_list_for_pwrmode(). This ensures
reg_fill_channel_list_for_pwrmode() does not validate the punctured
NOL channels and allows AP to come up on punctured NOL channel.

CRs-Fixed: 3518893
Change-Id: I4f23aa391598a4185933030cc6882ff9ae28f1d9
2023-06-16 15:03:13 -07:00
Will Huang
2ee77a06a5 qcacmn: Fix compile error if enable AFC for station solution
reg_is_range_overlap_6g() is not implemented for station solution,
if enable CONFIG_AFC_SUPPORT for mobile router, reg_set_ap_pwr_type()
will encounter compile issue.
reg_get_5g_bonded_channel_for_freq() updated to add more parameters
by Change Id I4c978c7f938b14d79d0eadf4251a86a9165f496e.

Fix it by adding CONFIG_REG_CLIENT check so reg_is_range_overlap_6g()
only valid for AP solution, because for mobile device there is no
deployment type (indoor/outdoor) set, so reg_set_ap_pwr_type() under
CONFIG_AFC_SUPPORT is for AP solution only, and only one pdev exist
for station solution so API reg_is_range_overlap_6g() is not needed,
query wmi_service_6ghz_support can get 6 GHz capability.

Update AFC/DCS function where call
wlan_reg_decide_6ghz_power_within_bw_for_freq().

Change-Id: Ie04262718504767bd252222e01258eab1d929aea
CRs-Fixed: 3529783
2023-06-16 11:33:46 -07:00
Venkateswara Naralasetty
2b0b767e60 qcacmn: Add a new enum for SW2RXDMA_LINK_RING
Add a new enum for SW2RXDMA_LINK_RING which is used to
handover the links to HW in monitor mode for wcn6450.

Change-Id: I0a3cd19f9891ae323742fd8bebfca5ff20b14b20
CRs-Fixed: 3525001
2023-06-16 11:33:32 -07:00
Jyoti Kumari
df02aa9ab6 qcacmn: Add api to check 6 GHz channels till UNII-5 band
Add api to check 6 GHz channels till UNII-5 band for LL_LT_SAP

Change-Id: If31da65b8a592f66de31bb3b161f11dc8425d8a8
CRs-Fixed: 3523012
2023-06-15 21:24:28 -07:00
Paul Zhang
1460d656c7 qcacmn: Add epcs_enable flag in mlme_vdev structure
Add epcs_enable flag in mlme_vdev structure and APIs to
set/get the config from user.

Change-Id: I490ebf1b41c095478160109339355df421ebe42c
CRs-Fixed: 3522731
2023-06-15 16:32:32 -07:00
Krunalsinh Padhar
7ad8b35c78 qcacmn: Set non assoc link as primary netdev
Make provisions to explicitly set non assoc link as primary netdev for an
MLO association.

CRs-Fixed: 3508341
Change-Id: Iaef4eff6ac309f278a18f8ceee2ffb6c4ad604b6
2023-06-15 16:31:48 -07:00
Aditya Kodukula
58e80d75bd qcacmn: Fix typographical errors
Fix typographical errors spanned over various files in cmn.

Change-Id: I9fcf3b7f9bb7d7dd406e6576a60aa4eb783c9ceb
CRs-Fixed: 3529628
2023-06-14 22:02:33 -07:00
Divya R
ebb1a3faea qcacmn: change eirp datatype from uint8_t to int8_t
This change is to update eirp datatype from uint8_t to int8_t
to handle negative values of eirp.

Change-Id: I840d7911d0ac85181a09ea98658a661644f43b9c
CRs-Fixed: 3521850
2023-06-14 03:12:38 -07:00
Abhishek Singh
b22f325247 qcacmn: Fix connection manager logs by adding CM_PREFIX_FMT
Fix connection manager logs by adding missing CM_PREFIX_FMT.

Change-Id: I043bf571006279dfcbec70e1d4fac564d6a20b6b
CRs-Fixed: 3527590
2023-06-13 15:36:46 -07:00
Sheenam Monga
806cbc9936 qcacmn: Handle negative MLO prefer percentage
Currently type of score is unit32_t due to which
negative value calculated is tried to change
to uint32_t and MLO score is getting boost instead
of deteriorate.

Fix is to calculate score in int32_t type and then move
to unsigned value.

Change-Id: Id28f58b44e1a1246f491b28a86de1c78c5e97215
CRs-Fixed: 3525654
2023-06-13 09:42:33 -07:00
Priyadarshnee Srinivasan
f4e571702f qcacmn: Check if nol bitmap is a subset of user bitmap
When we bring up AP on channel 100 HT320 with dfs puncturing
feature enabled and inject radar using bangradar at an offset of 70,
channel 144 gets added to the NOL. AP comes up on 100 HT320 with a
puncture pattern of 0xC0. AP's channel is changed to 149 HT80 and then
channel is changed again to 100 HT320 with 0xC0 puncture bitmap using
doth_ch_chwidth command.
Since 100 HT320 0xC0 is a DFS channel, AP does CAC and at the end of the
CAC expiry dfs_is_radar_on_punc_chan() API is invoked. This API checks
if radar infected channels are punctured by the user puncture bitmap
(dfs_ch_punc_pattern) and if so does not mark the CAC done chan as radar.
However, since 100 HT320 has a user puncture pattern of 0xFC00 and the
NOL infected bitmap is 0xC0, it considers radar is found on CAC
completed channel and tries to mark the channel as a radar as
dfs_ch_punc_pattern is equated to radar_bitmap in
dfs_is_radar_on_punc_chan(). This results in a cpu stall.

In dfs_is_radar_on_punc_chan(), if the radar bitmap is a subset of user
puncture bitmap, it implies that radar channels are punctured by the
user and hence there is no need of another radar detection at the CAC
expiry.

CRs-Fixed: 3519985
Change-Id: Ia8383500e89e2ac734d124e047bdbb94822bff3d
2023-06-12 08:24:17 -07:00
Srinivas Pitla
a238a3e04b qcacmn: Choose second highest bw link as primary link
This change selects psoc with second highest bw link as primary link
for first ML STA.

Change-Id: I1b60f83f695b04d533e4851b3751b8e1dfd9790c
CRs-Fixed: 3521765
2023-06-11 00:14:25 -07:00
Gururaj Pandurangi
2d67497cfb qcacmn: Add support to force power save the active MLO links
Add MLO manager and target interface support to force power
save on all the active MLO links for a defined number of
beacon periods. Force power save allows the firmware to
suspend STA links for X beacon periods and remain asleep
even if the AP advertises TIM as opposed to regular power
save mode where STA links wake up if the AP indicates that
it has buffered data to send.

Change-Id: Idb3ea42cfc2333a4b177780d09ddec6904ea0c16
CRs-Fixed: 3514468
2023-06-09 13:49:57 -07:00
Jianmin Zhu
a013c998bd qcacmn: Fix roam abort for 2nd sta connect
During wlan0 vdev0 roaming, before roam sync received,  2nd sta wlan1
vdev2 connect req came, disabled RSO of vdev0, so vdev0 roam aborted, and
disconnected.

To fix it, serialize roaming disable during connect too, don’t disable
roaming of other connected sta until serialization allowed in
wlan_serialization_activate_cmd ->cm_connect_active

Change-Id: Ic2e626154b570a1691b8f3d684d21d8a107d09dc
CRs-Fixed: 3510787
2023-06-08 20:46:59 -07:00
Pragaspathi Thilagaraj
fe4e1c1ae3 qcacmn: Retry MLO connection with SLO on connection failure
Currently if MLO connection fails then connection is tried
with same link until it reaches to maximum no of trials but
connection is not tried with same assoc link by changing partner
link or with SLO.

So, when vendor roam score algorithm is enabled, add logic to try
MLO connection again by reducing number of partner links with
each retry till SLO connection is tried.

Change-Id: Ic0e3acd2198cfa0ed0ff893da6ae32d669d32a41
CRs-Fixed: 3521159
2023-06-08 05:09:28 -07:00
Aditya Kodukula
4cbabdad1c qcacmn: Fix typos in cmn
Fix typos spanned over multiple files in cmn.

Change-Id: I9886114cd9cde934e084d0977e6272f8dd04df76
CRs-Fixed: 3521888
2023-06-07 13:58:38 -07:00
Hariharan Basuthkar
8943c4d969 qcacmn: Add array out of bound access checks
Add current AP power type check in reg_get_num_reg_rules and
reg_append_6g_reg_rules_in_pdev to avoid the array out of bound access
of pdev_priv_obj->num_of_6g_ap_reg_rules.

Change-Id: I769615788add14bd5892edf966981ba729073f17
CRs-Fixed: 3513759
2023-06-07 09:04:06 -07:00
Paul Zhang
cf19f91320 qcacmn: Fix compile issue on file wlan_mlo_epcs.c
Replacing ether_sprintf() with QDF_MAC_ADDR_REF() for
common usage.

Change-Id: I86a7169411af18f017fc3c0e27ce8a35f6ebd4a0
CRs-Fixed: 3519162
2023-06-07 04:31:29 -07:00
Will Huang
ebc483b28a qcacmn: Add AFC OSIF common changes
Add AFC common North Bound vendor command handlers and common AFC
PSOC/PDEV register functions.

Change-Id: Id87c3c4878362a48546d39e10230d60c2c573154
CRs-Fixed: 3375632
2023-06-07 04:31:19 -07:00
Asutosh Mohapatra
85480032b3 qcacmn: Find 6 GHz power type for connection channel
Currently host doesn't check if power type is supported
for connection channel while calculating best 6 GHz
power type for connection. This results in calculation
of incorrect power for connection values if 6 GHz power
type is not supported for that particular channel.

To address this issue configure power type for connection
only if that power type is supported for connection
channel.

Change-Id: Iab4f666df9a283a890d9a25ed4a43e244b253fd3
CRs-Fixed: 3502915
2023-06-06 05:39:29 -07:00
Sheenam Monga
339c48c7d7 qcacmn: Update etp score for MLO connection
Update etp score as per the mlo_tp_preference_percentage ini.
MLO score require to be boost or reduce based on the mlo
prefrence percentage ini, so update score as per the
provided value.

Change-Id: I0263b0f83207c279a2b4e88ac7b08b3b18a49df4
CRs-Fixed: 3456420
2023-06-05 13:53:23 -07:00
Edayilliam Jayadev
ab8ef68f2f qcacmn: Fix use after free in management Rx REO module
In some cases, the current frame and its associated rx_params/reo_params
may get freed immediately after the frame is queued to the egress list.
Hence accessing the reo_params after the frame is queued to the
egress list could lead to a use after free. Store a copy of "reo_params"
in the frame descriptor and access the copy after the frame is
queued to the egress list.

CRs-Fixed: 3516454
Change-Id: Ia87455b25d71f7de8f5b9c94fb6de05e94922b04
2023-06-05 08:34:05 -07:00
Amit Mehta
bc2323fc08 qcacmn: Only allow connectivity logging for STA mode
Currently connectivity logging is done for all opmode
but logging should be done only for STA mode.

So to fix the issue add check for opmode and skip
connectivity logging if opmode is not STA

Change-Id: Ie6175a02c8167f5ebfd81553837206640431f701
CRs-Fixed: 3515365
2023-06-05 08:33:55 -07:00
Edayilliam Jayadev
43568bb331 qcacmn: Remove zero duration assert for FW consumed mgmt frames
FW drops management frames with zero duration and indicates the same
via FW consumed management Rx WMI event. Hence remove the zero duration
assert for FW consumed management frames.

CRs-Fixed: 3512136
Change-Id: Ifda8831f46860cef0d28a9767a4a18f33e21ac68
2023-06-02 16:50:33 -07:00
Liangwei Dong
6f9b6db8f8 qcacmn: Add northbound notification for link reconfig
When link removal TBTT expires, indicate the link removal
info to upper layer by vendor event.

Change-Id: Idf882cb22ccbd1c8b4ad6f03c6d27980cdbaef50
CRs-Fixed: 3481313
2023-06-02 16:49:42 -07:00
KARTHIK KUMAR T
6c446e7547 qcacmn: add recommended err/debug function
add recommended err/debug function

Change-Id: Icc6597991f4c05abe1669ae4c5822ce8dea641b6
CRs-Fixed: 3500671
2023-06-02 16:49:22 -07:00
abhinav kumar
fe2425cddc qcacmn: Trigger wide band scan only for HMT
Only in the case of HMT, the host sets the
'scan_f_report_cca_busy_for_each_20mhz' scan flag
in scan request.

Trigger wide band scan also only if
scan_f_report_cca_busy_for_each_20mhz flag is set.

Change-Id: I9418d916f1927798ad56460b4c799100fc786378
CRs-Fixed: 3515959
2023-06-02 16:48:51 -07:00
Venkateswara Swamy Bandaru
f4f5f1cb88 qcacmn: Add API to authorize/deauthorise mac address
Add APIs to authorize and deauthorise mac address for
EPCS feature.

Change-Id: I69ac46fe59de85ac57a6142b6a1ed710e02a8cca
CRs-Fixed: 3510154
2023-06-02 03:34:01 -07:00
Venkateswara Swamy Bandaru
2a20dc67d1 qcacmn: Update Priority access ML IE parsing
Update Priority access ML IE processing with below.
1. Check for ie header before updating sub elements
2. Add WME vendor IE parsing support

Change-Id: If479f95517946511d5e94feadf92a10c61efd2a6
CRs-Fixed: 3508861
2023-06-02 03:33:49 -07:00
Surya Prakash Sivaraj
0240a195f9 qcacmn: Include FT-SAE-SAE-KEY AKM as WPA3 AKM
Include WLAN_CRYPTO_KEY_MGMT_FT_SAE_EXT_KEY as an
WPA3 AKM in WLAN_CRYPTO_IS_WPA3()

Change-Id: I3a7fcaf95ad2e132d8c650c3ffce9ba4b9849705
CRs-Fixed: 3512592
2023-05-31 19:08:33 -07:00
Himanshu Batra
b7ad8efcf9 qcacmn: Add null check for connect req while handling deferred connect
Add null check for connect req while handling deferred connect

Change-Id: Iea54005240e5f8608d8da655e8f0fbc0d535291e
CRs-Fixed: 3506588
2023-05-30 23:56:16 -07:00
Priyadarshnee Srinivasan
23421e9478 qcacmn: Allow AP to come up on radar channel if punctured
Add an API dfs_is_radar_on_punc_chan() which determines if
radar is found on a punctured channel and if so, does not mark
the channel as radar.

CRs-Fixed: 3504792
Change-Id: I5b38499baa794138f94898a24918eedc91f314e9
2023-05-30 16:56:49 -07:00
Venkateswara Swamy Bandaru
3e0b45fc11 qcacmn: Add priority access ML IE support
Add support to parse priority access multi link IE.

Change-Id: I7a226e0fd1a4d229d721244aeb675e1c09cc5ed3
CRs-Fixed: 3490404
2023-05-30 16:56:39 -07:00