Commit Graph

3318 Commits

Author SHA1 Message Date
Vignesh U
e22d6a62b8 qcacmn: Update array boundary checks for regulatory API
The regulatory API reg_freq_to_chan_for_chlist()  uses num_chans as the
bound to access the array chan_list. While an invalid index INVALID_CHANNEL
is prevented from accessing chan_list, values that are greater than
NUM_CHANNELS are not prevented from accessing the array.

Prevent access to the array when the index is greater than NUM_CHANNELS.
Since INVALID_CHANNEL is also greater than NUM_CHANNELS, the existing
condition that prevents access to the array when num_chans is
INVALID_CHANNEL can be removed.

Change-Id: I8b9793b84fc5b3a9406389fd3482673dd4667cfc
CRs-Fixed: 3196165
2022-05-17 05:54:32 -07:00
Hariharan Basuthkar
1e745ce16a qcacmn: Initialize eirp and psd in reg_get_eirp_for_non_sp
Initialize eirp and psd in reg_get_eirp_for_non_sp to fix WHUNT failure.

Change-Id: Id2f9ca8b658648dd50d47647270ac05fd5f330c9
CRs-Fixed: 3196444
2022-05-17 00:48:54 -07:00
Edayilliam Jayadev
2da6d3df11 qcacmn: Bypass management Rx reorder if the number of MLO vdevs is zero
Bypass management Rx reorder if the number of MLO vdevs the
given pdev is zero.

CRs-Fixed: 3194267
Change-Id: Ia286999fdf99bb2b77008c31dfb3a52731cd5167
2022-05-16 03:50:15 -07:00
Edayilliam Jayadev
e2ceb89b48 qcacmn: Change the order of reading mgmt Rx REO snapshots
Change the order of reading management Rx REO snapshots.

CRs-Fixed: 3193845
Change-Id: I55b9d49f9a1693ae01d88430552d202f55d006f1
2022-05-16 03:50:09 -07:00
Aditya Kodukula
16c15a6499 qcacmn: Add support for MLO stats
As part of MLO stats feature, add support to send ll_stats
and get_station stats request to firmware for all the MLO vdevs.

Change-Id: Ic50a6294f868f0604d4cfc0d4b657b6085da2fb4
CRs-Fixed: 3181020
2022-05-14 03:35:17 -07:00
Surya Prakash Sivaraj
7f57fa1bd9 qcacmn: Add sta_sap_scc_on_indoor_channel var to psoc/pdev
Add the variable sta_sap_scc_on_indoor_channel in
psoc and pdev reg objmgr, to access the INI value of
sta_sap_scc_on_indoor_chan

Change-Id: Ie0c41d75d0f617274743f5196e65dab93414b7eb
CRs-Fixed: 3191788
2022-05-13 04:20:54 -07:00
Jithender Miryala
dccc154314 qcacmn: Replace qdf timers with HR timer for preCAC timeout
Replace qdf timers with HR timer for pre CAC timeout and process
the preCAC completion work in workqueuecontext.

Since preCAC expiry is processed in H/W interrupt context
(while using HR timers), no other timer cancellation is allowed
('qdf_hrtimer_cancel' function will wait for the handler finish)

But if we  process the preCAC timer completion work in H/W context,
other timer cancellation will take time. To fix this, process the
preCAC completion work in workqueue context to allow other timer
cancellation.

CRs-Fixed: 3185213
Change-Id: Iaa24055e0d485f613e16d6110d22002fecf10821
2022-05-12 06:52:57 -07:00
Srinivas Pitla
feb53a95ee qcacmn: Release link peer ref if MLO peer attach fails
MLO peer attach fails if MLO peer with same MLD address gets
created. While freeing MLO peer, releasing of link peer ref
is missed

Fixed some of the corner cases handling with ml peer id, AID

Change-Id: Ia3ff13a3840083bfe389b39086a6c5aa1f709fca
CRs-Fixed: 3185069
2022-05-12 00:04:06 -07:00
Sai Pavan Akhil Remella
aabe3575e9 qcacmn: Add mode based flags to channels in PNO request
Currently 6 GHz channel flags are not set for channels
present in the list from PNO scan request but are set for
all other 6 GHz channels which are added when either of the
two below conditions are satisfied
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in PNO scan request.
2. At least one 6 GHz channel is present in the PNO scan req.

Add flags for channels in the PNO scan request based on the
scan_mode_6g ini configured similar to active scan request.

Add changes to remove the RNR flag for the channel if the
corresponding short SSID entry is present in the RNR db
Cache since if colocated SSID is different userspace doesn't
include corresponding 2.4/5 GHz channel information in PNO
request.

Change-Id: I22c4f7ecf65d4ab09dfbbe126aefe02f9145de42
CRs-Fixed: 3119113
2022-05-11 16:50:46 -07:00
Chaoli Zhou
afbf38079c qcacmn: Disable obss scan for all vdevs in LPM case
Disable obss scan for all vdevs under each pdev
when try to suspend, not just only disable the first one.

Change-Id: I52e46f43727acf004165f39a262b018dc174cc7f
CRs-Fixed: 3190706
2022-05-11 13:21:40 -07:00
Edayilliam Jayadev
40dacfa471 qcacmn: Count MLO vdevs in a pdev
Count the MLO vdevs in a pdev. WLAN_VDEV_FEXT2_MLO feature
flag in vdev object is set for all MLO vdevs. Simple solution is
to increment/decrement the count on every set/clear of
WLAN_VDEV_FEXT2_MLO feature flag. Since this feature flag will be
set/clear at multiple places for a given vdev, this approach
will lead to wrong MLO vdev count. To fix this we need to
increment/decrement the count on first set/first clear of
WLAN_VDEV_FEXT2_MLO flag. Add a lock also to prevent the race
conditions.

CRs-Fixed: 3106235
Change-Id: Ice7edde04553088fbb7c9b769508d441ccd6e4bf
2022-05-11 05:53:18 -07:00
Kai Chen
81f0e6a247 qcacmn: Add AFC device deployment type support
Add AFC regulatory target interface to support AFC device
deployment indoor or outdoor type in init sequence between
FW and host

Change-Id: I3caed77e943fdcaa947cb7e514c88b68604f55a3
CRs-Fixed: 3190262
2022-05-10 22:12:29 -07:00
Kai Chen
90907bdedd qcacmn: Add AFC device deployment type support
Add AFC device deployment type support in regulatory pdev
private object and add API to return the deployment type

Change-Id: I45e44766b25b21ce3024d73f4ed7a4daf3ecb026
CRs-Fixed: 3190240
2022-05-10 22:12:22 -07:00
Aravind Kishore Sukla
6932ea7f8a qcacmn: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: Ib2736aff0f653d046d502d460f204bba2247246f
CRs-Fixed: 3182588
2022-05-10 09:11:47 -07:00
Amith Ajith
19f0a435c6 qcacmn: Add AFC location structure to AFC start request
Create data structure to store the deployment type(location) of AP for
AFC. Append this structure to the end of AFC start request.

Change-Id: I19756fd3ca7a77f11b673d2bf3b0382f29732847
CRs-Fixed: 3177624
2022-05-09 22:18:45 -07:00
Amith Ajith
ecd51a1f66 qcacmn: Add AFC Deployment type enum and deployment type to pdev_priv_obj
Declare the AFC deployment type enum and add deployment type member to
pdev_priv_obj.

Change-Id: Id11a0aac4fcc1b655436d9dbd876607178f27bd4
CRs-Fixed: 3186216
2022-05-09 20:45:31 -07:00
Vijay Krishnan
4bc26c9b2d qcacmn: Reset dfs chan state in CAC stop
When AP moves from DFS to NON-DFS channel, dfs chan state is
not updated and have state DFS_CAC_STARTED. Similarly, if the VAP
operating in a DFS channel goes down, the dfs chan state needs
to change to DFS_CAC_REQUIRED but the dfs chan state remains in
DFS_CAC_STARTED.

During CAC STOP, send the DFS event CAC RESET to change the dfs
chan state.

Change-Id: I21831e2c79da67375f8e340964f899ebd169fd85
CRs-Fixed: 3160346
2022-05-09 07:10:27 -07:00
Himanshu Batra
826f250128 qcacmn: Add support for mlo peer delete params
Add support for mlo peer delete params

Change-Id: Ic6ef0786f73a7bb16c8a5de035b13a0a56862125
CRs-Fixed: 3188357
2022-05-09 04:08:28 -07:00
Edayilliam Jayadev
d58c71c6ff qcacmn: Enhance mgmt Rx reorder debug framework
Enhance management Rx reorder debug framework.

CRs-Fixed: 3183165
Change-Id: I968b9cc3f9eef4f1e8c76dd5b2eb01df27fbabbd
2022-05-09 01:40:49 -07:00
Santosh Anbu
8cd30a16c8 qcacmn: Use "_" instead of "-" to diff b/w substate
"-" is used to differentiate between state and substate.
User "_" in substate string convention to avoid confusion between
state and substate strings.

Change-Id: I9efb8fd7edd60f5d28c8f774fb17bda49e64ca24
CRs-Fixed: 3188646
2022-05-09 01:40:42 -07:00
Deeksha Gupta
928ebb4225 qcacmn: Update RNR IE as per 11be D1.4 specification
Update RNR IE fields as per 11be D1.4 specification.

Change-Id: I46b04e430ee4477117e8396d65a9de4608cd8dbe
CRs-Fixed: 3157064
2022-05-06 16:42:31 -07:00
Deeksha Gupta
598c7f9c07 qcacmn: Update ML IE handling as per D1.4 new definitions
Update multi link IE definition as per 11BE draft 1.4 spec.

Change-Id: I560d63019d10e22672dc95e9426fa6e8aca5a105
CRs-Fixed: 3156980
2022-05-06 16:42:10 -07:00
Srinivas Dasari
cc60bec109 qcacmn: Ignore H2E RSNXE support for test config
Userspace sends the vendor command WIFI_TEST_CONFIGURATION by
setting the attribute WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE when
driver needs to ignore the SAE H2E mismatch for 6 GHz connection.
This is needed for certification test support

Change-Id: I5c1838598478ab74d72d57a765452d7fd989b701
CRs-Fixed: 3072578
2022-05-06 16:41:55 -07:00
Surya Prakash Raajen
7521505f91 qcacmn: Initialize teardown event only once
Initialize teardowen event only once, intializing
events multiple times leads to assert.

Change-Id: I93a72c787dffa7ab081df9cca8ba17cc065e207a
CRs-Fixed: 3186523
2022-05-06 16:41:43 -07:00
Vignesh U
1fe27938f7 qcacmn: Add array out of bound access checks
- Add NULL check of the pointer "afc_req" in the function
reg_get_partial_afc_req_info() before it is dereferencedi to avoid
NULL pointer derefernce.

- Add array size check in the reg_compute_chan_to_freq_for_chlist()
API to avoid the array out of bound access to "chan_list" array.

- Make use of the function reg_is_supp_pwr_mode_invalid() which
does the boundary check for the arrays chan_info->state_arr[] and
chan_info->chan_flags_arr[] to avoid out of bound array access.

- Add a check in the reg_freq_to_chan_for_chlist() API to avoid chan_list[]
array out of bound access.

Change-Id: Ifcade9e971a77f483d5c5138206eab47454f28ad
CRs-Fixed: 3184214
2022-05-06 16:39:15 -07:00
Sheenam Monga
6606026e3f qcacmn: Avoid re allocation of req in mlo_ser_set_link_req
In mlo_ser_set_link_req, req is again allocated and thus
the req->ctx.cb_arg doesn't points to the new memory.

so avod reallocating the req memory again in
mlo_ser_set_link_req and use the passed memory directly
as umac_cmd.

Change-Id: I0bdc9cf746b2a36c69b5ca0f773f06900a9783dd
CRs-Fixed: 3188736
2022-05-05 07:13:08 -07:00
Balaganapathy Palanisamy
08940324e7 qcacmn: Change arguments for son rx ops
Change the arguments of son rx ops and make it compatible with
new SON api.

CRs-Fixed: 3127085
Change-Id: Ia6658763df145e34c2f6b8bde1c4a3f6e0ee94de
2022-05-05 02:51:52 -07:00
Vignesh Mohan
b6a3e8642c qcacmn: Recalculate start ptr of beacon buf before appending ssid
When hidden SSID is enabled, the offset at which the SSID IE exists
in a beacon buffer is first calculated, after which the extra length
is added to the beacon skb.
Since this increase in length may change the start of the data in
skb, reassign the start pointer remembered locally
to the data pointer of the skb before adding the SSID configured.

Change-Id: Ida32927de5986105efdc10c5115466fe071aa9f3
CRs-Fixed: 3169213
2022-05-05 01:20:49 -07:00
Edayilliam Jayadev
cecf753cac qcacmn: Fix compilation issues in mgmt Rx REO
Fix compilation issues in mgmt Rx REO feature.

CRs-Fixed: 3179407
Change-Id: I19e475b9f4eb5615d9ae63a85af3daf3ea1434ba
2022-05-03 12:41:07 -07:00
Edayilliam Jayadev
97e2f4b060 qcacmn: Check the sanity of mgmt Rx REO snapshots
Ensure the sanity of management Rx reorder snapshots of each valid
link.

CRs-Fixed: 3182800
Change-Id: I5949c8a7f8b15cb6a3eac874694daebb39423624
2022-05-03 12:41:01 -07:00
Edayilliam Jayadev
f9969cdc06 qcacmn: Initialize/clear mgmt Rx reorder data structures
Initialize/clear mgmt Rx reorder data structures on init/deinit.

Change-Id: Idf634fded0dadf2e13cea90f4819788b08ed4a12
CRs-Fixed: 3183181
2022-05-03 12:40:55 -07:00
Paul Zhang
28df9f4e53 qcacmn: Enhancement for RNR IE processing
Since the idx is always initialized zero in function util_scan_parse_rnr_ie.
If there are two or more RNR IEs in the frame, then the RNR info is
overwritten by the last one.

Change-Id: If6d47871267ea43c3a5b3130cae73ebd0de45930
CRs-Fixed: 3183233
2022-05-03 10:40:04 -07:00
Pragaspathi Thilagaraj
7738bad9e9 qcacmn: Add support to manage Wifi pos vdev private object
Add support to manage Wifi pos vdev private object. Add new peer
type in enum wlan_peer_type. Add rx_ops and register the rx_ops
for PASN peer create/peer delete request.
Register 11az PASN related WMI events in target if.

Change-Id: I2a5e4d8d7c9b9562d9ab02b287957e93ee6f4758
CRs-Fixed: 3154521
2022-04-30 22:49:55 -07:00
Venkateswara Swamy Bandaru
cf2e7f5172 qcacmn: Fix invalid ehtops print flooding on console
Due to moving to 11be D1.3 old eht ops is seen as invalid and
unnecessarily flooding console. Moding these prints to debug level.

Change-Id: Ibb21ffe9ed670c9ef9bc1e6d91f90ea5118a78f3
CRs-Fixed: 3185395
2022-04-29 13:49:53 -07:00
Venkateswara Swamy Bandaru
964ba5e0a6 qcacmn: Update EHT capabilities as per draft 1.4
Update EHT Capabilities as per 11be draft 1.4 specification.

Change-Id: Ibce3df4ec1aed07102f01d201409ef4e120fa94f
CRs-Fixed: 3176802
2022-04-29 09:01:23 -07:00
Deeksha Gupta
7310b12d12 qcacmn: Update EHT capabilities as per draft 1.4
Update EHT Capabilities as per 11be draft 1.4 specification.

Change-Id: I1300f0a1ece4ccd11c230097b57d9f6f5da8d6af
CRs-Fixed: 3160719
2022-04-29 09:01:15 -07:00
Edayilliam Jayadev
167f6c146a qcacmn: Exclude parallel Rx from stale frames
Frames which are received in parallel across links should not be
discarded as stale frames. Exclude frames received in parallel from
stale frames.

CRs-Fixed: 3183145
Change-Id: I218f24658307244b3d5fbad09c6ccf2e42221138
2022-04-29 06:32:16 -07:00
Shashikala Prabhu
6f0d0248f0 qcacmn: Define T2LM structure in wlan_mlo_peer_context structure
T2LM negotiation happens per MLD level. Hence, define the T2LM related
structure in wlan_mlo_peer_context.

Add API to get the protected EHT action frame subtype.

Change-Id: Ia3870fbb38b8d673f96954af18078c96d20365f3
CRs-Fixed: 3167178
2022-04-29 02:10:57 -07:00
Edayilliam Jayadev
1c9f82f0ec qcacmn: Use PPDU duration to find end time stamp
Use the PPDU duration given by FW to find the end time
stamp of management frames.

CRs-Fixed: 3181500
Change-Id: Ibabe82c8e2d3cd7e494e764a9a2baeded89a7300
2022-04-28 10:40:59 -07:00
Edayilliam Jayadev
3a96deddfb qcacmn: Read all the snapshots before wait count calculation
Read all the REO snapshots before calculating wait count.

CRs-Fixed: 3181495
Change-Id: Ica542f3c5ff8d32c983b82100bdf29761d0bf872
2022-04-28 10:40:48 -07:00
Basamma Yakkanahalli
a9b55f2c20 qcacmn: APIs to handle MLME VDEV OP flags
Added APIs set, get, and clear mlme vdev op flags.

Change-Id: Ibc20e07553545fd3c30f42f192171922f63e4b4c
CRs-Fixed: 3161657
2022-04-28 08:40:18 -07:00
Hariharan Basuthkar
263d5b8138 qcacmn: Add an API to get best power mode based on freq and bw
Add an API wlan_reg_get_best_pwr_mode, to get the best_power_mode
based on AP's primary channel center frequency and AP's operating
bandwidth. The best power mode that has the maximum EIRP power
allowed for operation among the 3 AP types, i.e, LPI, SP and VLP is
chosen as the best power mode.

For example:

If primary channel center frequency = 6115 MHz and AP's operating bandwidth
is 80 dbm. If,
LPI EIRP = 30 dbm
SP EIRP = 33 dbm,
VLP EIRP = 27 dbm,
then the best power mode returned is SP.

Also, remove the static declaration of reg_get_subchannels_for_opclass
so that it can be called by wlan_reg_get_best_pwr_mode.

Change-Id: I89b6bc35b5c15a49e2d49265c8685f9d291fb48e
CRs-Fixed: 3163714
2022-04-27 13:01:54 -07:00
David Oladunjoye
52945c51a9 qcacmn: umac: Add mapping for WMI to Host TWT nudge status
Add mapping for WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED on host side.

Change-Id: Ia7bcd78cfc709677b9b28a9fc2703e30f3cb2b7b
CRs-Fixed: 3181119
2022-04-27 13:01:48 -07:00
Himanshu Batra
bef237765d qcacmn: Add fix to use correct vdev pointer
Add fix to use correct vdev pointer

Change-Id: I14721d494b9ca40b480cf9315002e96006f848a1
CRs-Fixed: 3178303
2022-04-27 07:24:20 -07:00
Shashikala Prabhu
1a3a58f4de qcacmn: Add API to get MLD CAP info from Basic Variant ML element
Add API to get the MLD capabilities from a given Basic variant Multi-Link
element or element fragment  sequence.

Change-Id: I9f0d8069a970523948fd604b4977efd3d41a4d2d
CRs-Fixed: 3177254
2022-04-27 07:24:14 -07:00
Edayilliam Jayadev
94d603ee9b qcacmn: Add support for multiple snapshot versions
Add support for multiple version of management Rx reorder
shared snapshots.

CRs-Fixed: 3171325
Change-Id: Idae8d3f8179dc4a60730033e55d5744324133839
2022-04-26 10:00:35 -07:00
Vishal Miskin
36da36e010 qcacmn: Populate TWT target API to set pdev param
Populate TWT target API to set pdev param

Change-Id: Id82ee089825293c05bace5ead97727c8c79845db
CRs-Fixed: 3168199
2022-04-26 07:03:52 -07:00
Pragaspathi Thilagaraj
1911d07d35 qcacmn: Add new Wifi Pos module PASN related files
Add new files in Wifi-Pos module to support PASN authentication.
Introduce new API to handle 11az ranging peer create, to handle
PASN peer create response and manage the PASN peers to initiate
external authentication to userspace.

Change-Id: I0b638d3cfca2753074fdb56ad78373f842ca80ee
CRs-Fixed: 3150241
2022-04-26 04:03:28 -07:00
Pragaspathi Thilagaraj
f002514396 qcacmn: Add new public structure file for Wifi pos module
Add new public structure file for Wifi_Pos module to define
11az related structures & enums, vdev private object for
Wifi Pos module.

Change-Id: Ia8b8ebb3b36cc8f1d9598629e63d15a0f16301c7
CRs-Fixed: 3150228
2022-04-26 04:03:22 -07:00
Amit Mehta
e498989902 qcacmn: Add DP component ID
Add DP component entry in debug id and umac component id.

Change-Id: Ia4302f5b22c26cd099821388e09be0358b83ab1b
CRs-Fixed: 3165355
2022-04-25 23:11:56 -07:00