Commit Graph

3984 Commits

Author SHA1 Message Date
Vignesh U
5dc7fe9a25 qcacmn: Unpack AFC structures
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.

Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
2023-04-03 01:36:23 -07:00
Priyadarshnee Srinivasan
30e5729efd qcacmn: Fill only supported opclass in the AFC request buffer
In case of a split-phy 6 GHz radio, there are 6 GHz opclasses and cfis
that do not intersect with the chip range for a given pdev.
The current algorithm appends such opclasses with "num_cfis as 0" to
the AFC request buffer and the buffer with empty cfis are
sent to the AFC server.
This change ensures that the chip unsupported opclasses/cfis are not sent
to the AFC server.

Also, if the reg rule frequency range is not supported by the chip range,
reg_intersect_ranges() is expected to set the out_range as
{low_freq = 0,high_freq = 0}. However, it only sets the low_freq to 0.
Since high_freq is a non-zero value, the chip un-supported range is
considered as a valid range with frequency_low as 0.
This causes the following error from the AFC server:
"error": "The frequency range indicated in the Available Spectrum
Inquiry Request is at least partially outside of the frequency band
under the management of the AFC System (e.g. 5.925-6.425 GHz and
					6.525-6.875 GHz bands in US).

To fix this issue, assign high_freq also to 0 if the
reg rule frequency range is not supported by the chip range.

CRs-Fixed: 3442719
Change-Id: I5504376ac31203045b32e23f54a9ab6a41e63a3f
2023-04-02 05:17:27 -07:00
Aasir Rasheed
ca023bedc9 qcacmn: Register MLO get link state event handlers
Register and unregister the MLO get link state WMI event handler.

Change-Id: I7ac0a20949cc435907e433c279f14fd792415824
CRs-Fixed: 3432102
2023-04-01 09:15:27 -07:00
Uraj Sasan
ab8cf64ef0 qcacmn: Connect if pri_umac & assoc link are same
Some devices in WDS station mode have limitation when connected
in 3 LINK MLD association where the Primary umac selected and assoc
link should be same. Make sure to have a sanity check before
going for association in such cases.

If the primary umac and assoc links are set to be different then
the connection will be rejected.

Change-Id: If56461a140d4685ba279b1babe04709d919d1650
CRs-Fixed: 3443733
2023-03-30 23:15:34 -07:00
Krunalsinh Padhar
6f685b0907 qcacmn: send assoc resp only once for multilink
Do not send assoc response from wlan_mlo_peer_create for
multilink MLO connection. This makes sure that assoc resp
is invoked only once.

Change-Id: Id1acf20bd5e3e3beb16e0dc3073676c421825ae6
CRs-Fixed: 3443511
2023-03-30 18:30:29 -07:00
Paul Zhang
310c7ce085 qcacmn: Add enums for TDLS for MLO feature
1\ Add QDF_STATUS_TDLS_MLO_SYNC,
2\ Add WLAN_ELEMID_LINK_IDENTIFIER.

Change-Id: I58e912dc46a48b9ba7c2d411a2ccd7e107df1b22
CRs-Fixed: 3435983
2023-03-30 14:44:29 -07:00
Shreedhar Parande
3bdf816735 qcacmn: Add VDEV up check before deriving bridge peer PSOC
If VDEV state is not up, skip such VDEVs for creating
bridge peer.

CRs-Fixed: 3439647
Change-Id: Ibd5eaff197ed0ce984915fc197bcd33b6e674e37
2023-03-30 10:44:02 -07:00
Rahul Gusain
4e7ff1e143 qcacmn: fetch roam vdev from pdev obj
Driver extracts the vdev from peer, self mac address and
vdev_id. But in some APIs, there can be below scenarios
For example:
1. peer is not available for that vdev( roam vdev),
2. API does not have vdev_id,
3. mac address is not known or incorrect,
4. there is no session available.
While roaming, there can be scenario where driver need to
fetch the vdev before peer creation and session is not
available.
For this, driver introduces new API to fetch roam vdev from
pdev object.

Change-Id: I4a2521773b893a8dc0553335bcadac5a84fbc300
CRs-Fixed: 3441493
2023-03-30 09:01:23 -07:00
Shiva Krishna Pittala
45da3822ae qcacmn: Fix use-after-free of MGMT Rx params in wlan_mgmt_rx_reo_algo_entry
Once an incoming MGMT frame is inserted in the MGMT Rx REO egress list from
wlan_mgmt_rx_reo_algo_entry(), there is always a possibility that the same
frame could be sent to upper layers from the other CPUs before
wlan_mgmt_rx_reo_algo_entry() completes its execution in the original
MGMT Rx path. This means that nbuf and MGMT Rx params of a given frame
could be freed before wlan_mgmt_rx_reo_algo_entry() completes.
Hence, make sure to not access frame's nbuf and MGMT Rx params once the
list updates are done for that frame.

Change-Id: I91cbdef4b1ea5b81d39606e47a46021f30193ce5
CRs-Fixed: 3433621
2023-03-30 02:32:30 -07:00
Nidhi Jain
4f84ad378c qcacmn: Add 11az TB rsta ext feature flag support
The existing code does not support capability to be set
if trigger based ranging rsta wmi service bit is enabled.
This require addition of ext feature flag for trigger based
ranging rsta support.
Add 11az TB rsta ext feature flag and set the same as per
firmware capability for 11az feature.

Change-Id: I12512175d0b33daa906586c7f96f0c8c3f7400a3
CRs-Fixed: 3437057
2023-03-29 11:29:44 -07:00
Rahul Gusain
b629391f22 qcacmn: Extract MLD addr for BSSID
In some scenarios, there can be need to get the peer MLD address.
For this, add new API to extract the MLD address from the scan entry
by the BSSID.

Change-Id: I3b78501cb5320b3e834313a048b6fa0a84eab03b
CRs-Fixed: 3441498
2023-03-29 05:23:49 -07:00
Srinivas Pitla
3edff068ab qcacmn: Primary TQM changes
1) select lower bw vdev link as primary umac for first station
2) Added support to increase group size to distribute stations
   on all PSOCs

Change-Id: Ic6762fbe8e6bc5feef70ddaaa118af121d38a1f4
CRs-Fixed: 3366442
2023-03-29 05:23:29 -07:00
Priyadarshnee Srinivasan
5b3d70f9a2 qcacmn: Address memory leak in dfs_init_chan_state_array
Fix memory leak in dfs_init_chan_state_array() API.

CRs-Fixed: 3442778
Change-Id: If2d7db598077975dc33617f6c30f6f86fb2d1247
2023-03-29 02:59:48 -07:00
Surya Prakash Sivaraj
88804f2cfc qcacmn: Add support for AKM25
Add support for FT-SAE-EXT-KEY AKM.

Change-Id: I832b414b31d42113eec6d099ba4c62e76dfe6cb1
CRs-Fixed: 3406626
2023-03-27 11:21:18 -07:00
Rachit Kankane
f5820188d2 qcacmn: Trigger SAP / GO channel switch
Trigger SAP / GO channel switch on receiving
wmi_csa_ie_received_event_id from FW in STA + SAP / GO DFS SCC
concurrency.

Change-Id: Iff60dffb71b170f56c4fbee4e297b81b87632a2a
CRs-Fixed: 3431365
2023-03-27 09:23:01 -07:00
Rachit Kankane
d525bc0165 qcacmn: Support WMI_CSA_IE_RECEIVED_EVENTID
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:

   1. Register the handler
   2. Handler to extract the event

Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363
2023-03-27 09:22:51 -07:00
Neha Bisht
1cfaea506b qcacmn: Move PTQM update API to appropriate file
Move PTQM update API to appropriate file

Change-Id: Ibc7c346beebd468913363ca6532ddaf8ada4704d
CRs-Fixed: 3438694
2023-03-25 22:03:05 -07:00
Paul Zhang
2859ea85d1 qcacmn: Add flag WLAN_VDEV_FEXT2_MLO_STA_TDLS
Add a flag WLAN_VDEV_FEXT2_MLO_STA_TDLS to mark whether
the vdev is used for TDLS or not.
It can use these API:
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
wlan_vdev_mlme_feat_ext2_cap_clear(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
tdls_vdev = mlo_get_tdls_link_vdev().

Change-Id: I89c50ad5321013993e798ebb5549c5015ac18969
CRs-Fixed: 3435963
2023-03-25 05:32:51 -07:00
Asutosh Mohapatra
0d779068fe qcacmn: Add two definitions for allowed SP mode
Currently for client SP, super channel list is disabled
even if the corresponding reg rules are sent by the target.

To address this issue, add two definitions for
reg_is_sp_pwr_mode_allowed_in_supchan, to check
if the given mode is SP mode in the super channel list.

Change-Id: Idb1fc22e3ba4a61a07e03302f92fd8e2a6a9bc85
CRs-Fixed: 3426498
2023-03-23 09:08:27 -07:00
Priyadarshnee Srinivasan
70a7674b32 qcacmn: Retrieve DFS channel parameters such as CAC, NOL, state
Add APIs to fetch the DFS channel parameters such as CAC, NOL and the
channel state to the user application.
struct dfs_cacelem is defined to store all the CAC related information
such as cac start time, cac completed time and the cac timeout.
dfs_cacelems is stored for NUM_5GHZ_CHANS in the dfs pdev object.
dfs_handle_cac_events() API is used to handle CAC related events such
as WLAN_EV_CAC_COMPLETED, WLAN_EV_CAC_RESET and radar during CAC.

CRs-Fixed: 3428828
Change-Id: I82f7aafeb20222d9722bed5a1a8c10b5703ac975
2023-03-23 00:14:50 -07:00
Surya Prakash Raajen
3b2a716195 qcacmn: Detach dp soc and mlo ctx in soc down sequence
Detach dp soc and mlo ctx in mlo soc down sequence,
to remove the dependency with link teardown event

Change-Id: I2dc2f64398904a7c57f579029297d11d887979c4
CRs-Fixed: 3390199
2023-03-23 00:14:40 -07:00
Surya Prakash Raajen
aad2e9bdb9 qcacmn: Re-init mlo global shmem in case of recovery
Re-init mlo global shmem region whenever in case of expected
target recovery mode. In case of mode1 recovery assert, need
complete teardown of mlo and clearing out global mlo shared
memory, when asserted SoC is recovered, re-init global shared
memory region again.

Change-Id: I475b08934bdceb78b87d115b79abf45e76633795
CRs-Fixed: 3390199
2023-03-23 00:14:31 -07:00
sandhu
55435d303a qcacmn: Add WMI_SERVICE_11BE_TDLS_SUPPORT
1\ Add BE tdls fw support bit.
2\ Add link force reason per wmi changes

Change-Id: I0c297b0ea337d4060ac339c89679ec6059afc89f
CRs-Fixed: 3435979
2023-03-22 12:14:32 -07:00
Shwetha G K
40931af2b3 qcacmn: t2lm draft 3.0 changes
Changes to incorporate link mapping size in t2lm control
field of t2lm ie per draft 3.0

CRs-Fixed: 3431897
Change-Id: I61834258e6348b6483a86eb9e9217e3d5997c2c9
2023-03-22 07:33:20 -07:00
Jyoti Kumari
48ed0b7680 qcacmn: Pass vdev_id as an argument in policy_mgr_get_pcl()
Pass vdev_id as an argument in policy_mgr_get_pcl()

Change-Id: I047ec205632798a3e4e0da5ada6677764ae4f203
CRs-Fixed: 3412907
2023-03-22 00:40:43 -07:00
Uraj Sasan
975f28b2fc qcacmn: Limit Max number of assoc links for AP-MLD
Limit the AP-MLD association links to 3 currently.
More than 3 links will not be supported currently
for association.

Change-Id: I3cd6acda27d2f538172673a8d573367d77ee00b5
CRs-Fixed: 3435787
2023-03-21 17:33:05 -07:00
Pragaspathi Thilagaraj
381a41f67d qcacmn: Read service capability for TDLS concurrencies
Read the new service capability:
WMI_SERVICE_TDLS_CONCURRENCY_SUPPORT for TDLS concurrencies
support. With this service capability below concurrencies are
supported:
STA+TDLS+P2P
STA+TDLS+P2P+P2P
STA+TDLS+P2P+SAP

Host driver will check this capability to disable TDLS
off channel when concurrent interface comes up. If this
service cap is not advertised by the firmware then
existing TDLS connection will be teared down when concurrent
interface is started.

Change-Id: I744775080a22ca8f3bc88894c349916eea27fd3a
CRs-Fixed: 3414266
2023-03-21 11:51:23 -07:00
Balaganapathy Palanisamy
ca53ea9c0c qcacmn: Export MLO peer APIs
Export MLO peer APIs
wlan_mlo_peer_get_assoc_peer
wlan_mlo_get_mlpeer_by_mld_mac

Change-Id: I4d71cf0ad2214f63f0b4c2be6a63f33fd407d1bf
CRs-Fixed: 3437752
2023-03-21 07:51:02 -07:00
Srinivas Pitla
68a9eec276 qcacmn: Prevent ML peer creation with duplicate MLD address
This change searches for ML Peer across all MLDs, if ML peer
is found in other MLDs, it will reject MLO peer creation
and rejects association

Change-Id: Ifcb150615d840f536d92734e2ef4f86080f5bb6b
CRs-Fixed: 3425900
2023-03-20 00:23:46 -07:00
Vinay Adella
c847ddd958 qcacmn: Clear partner link state before starting to connect
This is needed in case the STA is configured with more MLO links
than the AP. It will make sure only links that the AP allows
are in use in the STA MLO as well.
Also check for mlo flag on vdev before sending link connect and
updating partner bitmap.

CRs-Fixed: 3423668
Change-Id: Iceec3cf7e8dc7e5bc0a29c56b990faef4f741158
2023-03-19 22:53:08 -07:00
Kiran Venkatappa
a9dbdc28df qcacmn: Add rTWT params in btwt remove sta cmd
Add new params(ul_tid_bitmap & dl_tid_bitmap) for rTWT remove sta cmd.
This will be sent from test command to trigger remove sta.

Change-Id: Id68c020a18e3e418ad6605f27827ab755f8eea53
CRs-Fixed: 3431178
2023-03-17 09:13:31 -07:00
Vinod Kumar Myadam
b7987d7b29 qcacmn: Fix OOB in util_gen_new_ie
For example, If tmp_new[1] = 3, subie_len=160,
tmp_new + tmp_new[1] + MIN_IE_LEN) - sub_copy will be 159.
In this scenario, while condition gets true (159 <= 160)
In if condition (159 >= 160), we are not breaking the loop in if.
tmp_new will get incremented, tmp_new will point at 159,
tmp_new[1] will point at 160, tmp_new[2] point at 161.
So, we are accessing one byte out-of-bound value.

To fix accessing out-of-bound value subtract one from the subie_len
in while and if condition to avoid this scenario.

Change-Id: I624585323963b6d79acf9ff0f96ec17e0b415c2d
CRs-Fixed: 3358833
2023-03-17 07:20:18 -07:00
Ruben Columbus
42d4fdeb3a qcacmn: change int size for ampdu
change size for ampdu from 8bit to 16bit to store new size for be.

Change-Id: I369f9f43c6cbad0f3af4cf787ef912e4318b55dc
CRs-Fixed: 3405031
2023-03-17 01:41:48 -07:00
Rachit Kankane
d458f39acf qcacmn: Add support for STA+GO DFS scc in VDEV MGR
Add variable and get / set APIs in VDEV mgr for STA + SAP / GO DFS SCC
scenario to track SAP / GO's channel switch before STA's channel switch

Change-Id: Ie13291602a5888942c71e3882c72796c7ea47378
CRs-Fixed: 3431360
2023-03-16 20:52:33 -07:00
Uraj Sasan
f5553f82ef qcacmn: Fix logical_link_index for STA vaps
There was a case in which the logical_link_index for link vdev and
partner vdev was matching which was causing an issue.

The reason for duplicate logical link was because the mlo_link_connect
was not sent in same order in which partner link vdevs are added.

Send mlo_send_link_connect in order in which partner links are added.
This will ensure generation of logical link indices for link vdev
and partner vdevs correctly.

Change-Id: I4053fad7a7b615bca9b6386bf142ea785bca5ccf
CRs-Fixed: 3427985
2023-03-16 15:35:08 -07:00
Himanshu Batra
21a548ada6 qcacmn: Rename WLAN_TELEMETRY_STATS_SUPPORT to WLAN_CONFIG_TELEMETRY_AGENT
Rename telemetry agent macro WLAN_TELEMETRY_STATS_SUPPORT to
WLAN_CONFIG_TELEMETRY_AGENT

Change-Id: I9b2feb33b32daf56e584ae04f260749c358c8ea4
CRs-Fixed: 3425567
2023-03-16 13:50:32 -07:00
Aravind Kishore Sukla
c60807a9c9 qcacmn: Remove ie len check for SON_IE_LEN
SON IE length check drops some of the AP beacon or probe
response due to length mismatch.

As length may increase for some of APs. Remove check for
ie len of WLAN_VENDOR_SON_IE_LEN

Change-Id: I74add7ea539913f67bf7d11e2ff8e4b0374eba05
CRs-Fixed: 3418249
2023-03-16 07:44:43 -07:00
Jeff Johnson
2aa96628ca qcacmn: Fix umac/wifi_pos documentation
The kernel-doc script identified some documentation issues in the
umac/wifi_pos folder, so fix them.

Change-Id: I261ecd11e8e15bac021214c2d9e0774f316d7ac7
CRs-Fixed: 3430355
2023-03-16 03:11:29 -07:00
Chaithanya Garrepalli
b57fbc13f4 qcacmn: Add umac callback to get MLO chip ID
Add new MLO mgr callback to return MLO chip ID

Change-Id: I214b600830991f846ded208b16ed2fb1407a5a28
CRs-Fixed: 3432589
2023-03-15 13:02:42 -07:00
Jianmin Zhu
41c19f596d qcacmn: Add API mlo_is_ml_connection_in_progress
Add API mlo_is_ml_connection_in_progress.
When wpa supplicant enable/disable roaming, need check it to avoid race
condition issue.

Change-Id: I85cc9f8b542169563881c601a477f5c646629071
CRs-Fixed: 3430980
2023-03-15 04:33:56 -07:00
Chaoli Zhou
4e932d4624 qcacmn: Replace kzalloc/kfree with vmalloc/vfree for reg pdev/psoc obj
At continuous physical address limited telematics platform,
in order to avoid occasional memory alloc failure with big
kzalloc size, it's better to use virtual memory allocation
API instead. And below items will be refined to replace malloc
with valloc when CONFIG_ENABLE_VALLOC_REPLACE_MALLOC=y.

1 x 66384 =   66384B @
wlan_regulatory_psoc_obj_created_notification:106  
wlan_objmgr_psoc_obj_create+0x104/0x240 [qca6698]

1 x 44936 =   44936B @
wlan_regulatory_pdev_obj_created_notification:324  
wlan_objmgr_pdev_obj_create+0x17c/0x284 [qca6698]

Change-Id: Ia2f1b0d3f6f0149c3a88ee776ee4b11493943227
CRs-Fixed: 3426809
2023-03-15 02:40:58 -07:00
Sai Pavan Akhil Remella
5d62197747 qcacmn: Send vendor attributes with the Roam stats
As part of commit I7a08635a7912cbd940d90a2d62433296740ad913
a vendor command is added to enable roam stats event.
This change registers callback to send the added vendor
command event to userspace.

Change-Id: I6dc3f8357ace5bb3fa41b4aa116652a91b9fd924
CRs-Fixed: 3427397
2023-03-14 10:37:42 -07:00
Edayilliam Jayadev
4855c6ef1a qcacmn: Enable management rx reo scheduler
Enable management Rx reorder scheduler.

CRs-Fixed: 3410648
Change-Id: I90fad2bb3c118f3d9021dc94ecdd1a300c9ab00c
2023-03-14 08:46:27 -07:00
Jeff Johnson
f3217146fa qcacmn: Fix misspelling "bandwitdth"
Fix misspelling: "bandwitdth" => "bandwidth"

Change-Id: I7fde29d0be481e6e4214a00d68ff4c468d03a322
CRs-Fixed: 3430187
2023-03-13 23:54:33 -07:00
Edayilliam Jayadev
d3f1f54f3f qcacmn: Add mgmt Rx REO scheduler debug support
Add support for mgmt Rx REO scheduler debug.

CRs-Fixed: 3409291
Change-Id: I5027fb4196d3d072fe4ade880eb217bcef47a6d3
2023-03-12 13:42:51 -07:00
Shreedhar Parande
000049c119 qcacmn: Delete link peers upon bridge peer creation failure
If bridge peer creation is failed, delete all link peers belongs
to that MLD.

CRs-Fixed: 3428992
Change-Id: Ife492cbaa4bb0e80df2f5a62539804912fe76637
2023-03-11 16:02:53 -08:00
Shashikala Prabhu
09c1bea86c qcacmn: Update the datatype of T2LM provisioned links
T2LM provisioned links of preferred link structure are represented as
bitmap of type wlan_link_band_caps enum. Hence, replace the datatype
'enum wlan_link_band_caps' with 'uint16_t'.

Change-Id: If6cdaf5b12a9bd8b06050db67464fb4db642883b
CRs-Fixed: 3429430
2023-03-10 16:11:43 -08:00
Neha Bisht
80ee0f60c6 qcacmn: Add support for primary TQM migration
Add support for primary TQM migration.

Change-Id: Ifd62eb7e731bbd9e86c462642fd2e20d50d5495a
CRs-Fixed: 3410900
2023-03-10 16:11:33 -08:00
Hariharan Basuthkar
aecdfaa78a qcacmn: Rectify 20 MHz opclass check
When the CLI command wifitool athX disable_opclass_chans is executed
with a valid 20 MHz operating class, the command throws an error,
"Opclass should only be 20 MHz opclass" on the console.

The opclass passed as an argument to reg_enable_disable_opclass_chans,
which is greater than 20 MHz in value, makes the API reg_is_20mhz_opclass,
always return false.

To fix the issue, pass channel spacing (in MHz units) as an argument to
the 'reg_is_20mhz_opclass'. Also rename 'reg_is_20mhz_opclass' to
'reg_is_chanspacing_20mhz' as we are verifying if the channel spacing
of an opclass is close to 20 MHz; not verifying the opclass itself.

Change-Id: I198b4d90c68613210377b96f6836c5b8c810dc7f
CRs-Fixed: 3410934
2023-03-09 15:43:22 -08:00
Paul Zhang
f453c827cb qcacmn: handle MBSSID IE for critical update
With the MBSSID IE, it has to generate the corresponding
beacon and probe response frames. Then handle the generated
frames per critical update feature.

Change-Id: Iff3fdb3a335a98d9ed7e51957885e2f161069807
CRs-Fixed: 3376521
2023-03-08 21:10:24 -08:00