Commit Graph

691 Commits

Author SHA1 Message Date
Himanshu Batra
80db72a890 qcacmn: Add changes to support link_id param in cfg80211_disconnected
As part of MLO dynamic link deletion handling, cfg80211_disconnected is
taking link_id as an argument.
Add changes to support link_id param in cfg80211_disconnected.

Change-Id: Ia312b5e5768ba9abb11675839e912d4819a2fa86
CRs-Fixed: 3315102
2022-11-19 20:11:05 -08:00
David Oladunjoye
25cb050e32 qcacmn: Add lock to Set/clear WLAN_VDEV_FEXT2_MLO_STA_LINK flag
Currently, this MLO flag is being set/clear without regard for
concurrency. We need to lock the vdev when updating these values to
prevent race condition.

Change-Id: Ied90d62f10f6f12a35eeac3060dd0fae7d0c6cfd
CRs-Fixed: 3305558
2022-10-21 21:31:17 -07:00
Jyoti Kumari
5ba9521bfb qcacmn: Add a vendor attribute to configure concurrency policy for AP interface
Add a new QCA vendor attribute
QCA_WLAN_VENDOR_ATTR_CONCURRENT_POLICY_AP_CONFIG to
QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_POLICY sub command to set
the concurrency policy for AP interface.
QCA_WLAN_VENDOR_ATTR_CONCURRENT_POLICY_AP_CONFIG uses the values
defined in enum qca_wlan_concurrent_ap_policy_config to specify
concurrency policy.

Change-Id: I73931e41e469b3696f80fe8897428d4fc796ec95
CRs-Fixed: 3302865
2022-10-19 22:30:46 -07:00
Jyoti Kumari
115f04aa57 qcacmn: Rename QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY
Rename QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY to
QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_POLICY to allow extension
for other interface type(s). A subsequent commit will extend the
renamed definitions in a manner that is inconsistent with the
current naming.

This is a precursor for AP/P2P concurrency policy configuration
support via updated vendor command
QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_POLICY.

Change-Id: I1df8e7b289a8d7f1982f5daab732a36ad013d9ca
CRs-Fixed: 3302835
2022-10-19 22:30:39 -07:00
Yu Wang
093c816d05 qcacmn: print SSID with QDF_SSID_FMT and QDF_SSID_REF
To protect user privacy, print SSID with QDF_SSID_FMT
and QDF_SSID_REF, then SSID will be hide in logs if
anonymization is enabled.

Change-Id: Ifad0ccd76bd1184a9b1d20f3d7fa4455df924843
CRs-Fixed: 3291826
2022-10-18 11:57:53 -07:00
Harsh Kumar Bijlani
53f89d318b qcacmn: Add service class id attribute in SCS rule config vendor subcommand
Add service class id attribute
QCA_WLAN_VENDOR_ATTR_SCS_RULE_CONFIG_SERVICE_CLASS_ID in SCS rule
configuration vendor subcommand
QCA_NL80211_VENDOR_SUBCMD_SCS_RULE_CONFIG.

Change-Id: I1a1be0a1a5c65be488e36c0d078dbc6aef47838a
CRs-Fixed: 3314058
2022-10-18 05:22:40 -07:00
Rachit Kankane
8f76bf1455 qcacmn: Add Spatial Reuse event index
Add async event index for Spatial Reuse

Change-Id: I486e45e074fca857670876e51ca5878a5a60906c
CRs-Fixed: 3307824
2022-10-17 06:48:55 -07:00
Sheenam Monga
6e707dac35 qcacmn: Add QCA vendor interface support for Spatial Reuse (SR) feature
Add a new vendor sub-command to implement Spatial Reuse feature.
Userspace enables SR feature with specific configuration parameters. The
driver/firmware upon receiving the command, enables the SR feature if it
is supported by the currently connected AP. The driver may reject the
command if it cannot enable the SR with the configured parameters. The
driver sends events to userspace to indicate when SR feature is enabled
or disabled internally. Userspace can also query SR feature related
parameters and statistics from the driver/firmware as needed.

Change-Id: Ie203576d4ace691e37a1c5eea379f562bf416835
CRs-Fixed: 3298975
2022-10-15 05:18:57 -07:00
Amruta Kulkarni
319456fee7 qcacmn: Add callback api to send stored keys
For STA MLO connection, the AP can send M1 right after assoc
response on assoc link, which will trigger sending keys to FW
for mlo links, but it can happen that wmi_peer_assoc is not
sent for mlo link until this time.
Current code does not have handling for this case.

To solve this, store the link vdev keys and send them once
link vdev is connected.

Change-Id: I882da96280711ca9cfa4d6ba852fda4a8b6d7a77
CRs-Fixed: 3293692
2022-10-12 23:22:44 -07:00
Jeff Johnson
8aa059674f qcacmn: os_if: Fix misspellings
Fix misspellings in os_if/...

Change-Id: I15604af98007e6ed4a7bc91abc9c07dfed1276fc
CRs-Fixed: 3304690
2022-10-11 14:23:11 -07:00
nakul kachhwaha
af02ec866a qcacmn: Add a new QCA vendor attribute to support flexible TWT
Add a new attribute QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_SP_START_OFFSET to
configure offset to shift start of the service period. This attribute
will be used when device supports flexible TWT. If provided, this
attribute will override QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME.

Change-Id: I1f066f328c6d0f3ca4d4bf4a94e63647d639f49d
CRs-Fixed: 3299714
2022-10-08 05:12:50 -07:00
Amruta Kulkarni
f1da02acc9 qcacmn: Release vdev reference to avoid leak
Currently vdev reference is not released in api
osif_send_roam_auth_mlo_links_events().

To solve this release vdev reference to avoid leak.

Change-Id: Idc766925f5cd71cbdd577ee7b67abffc35130dd9
CRs-Fixed: 3305547
2022-10-06 16:53:03 -07:00
Pragaspathi Thilagaraj
d95e7863cd qcacmn: Add support to enable/disable responder 11az ranging
Enable/Disable responder 11az ranging based on the below ini:
"enable_responder_11az_support"

With "enable_responder_11az_support" disabled, the below ext
cap advertisement will be disabled:
Non-TB Ranging Responder
TB Ranging Responder

and below vendor capabilities advertisment will be disabled:
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE_AP
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF_AP

Change-Id: I82eb70615f8daf82e98e7600418e07fad0672b76
CRs-Fixed: 3296410
2022-09-29 04:22:45 -07:00
Amruta Kulkarni
c3051031c5 qcacmn: Send roam auth mlo links event
After mlo roaming is complete send roam auth mlo links
event to kernel.
Also populate cfg roam info structure with mlo link info.

Change-Id: I8710e3a53f05c50b7b276d87a39411cb43d0983f
CRs-Fixed: 3279967
2022-09-27 16:23:16 -07:00
Chaoli Zhou
400309d015 qcacmn: Fix compiler warning on shift overflow in QCA vendor definitions
Fx the following compiler error:
qca-vendor.h:5892:54: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
 5892 |  QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,

This "1" needs to be marked unsigned for this case of MSB=1.

Change-Id: I27daebd07d0cbf314459254cfc5906f5e56dd4be
CRs-Fixed: 3299457
2022-09-27 13:22:24 -07:00
Jianmin Zhu
fb43cc12b8 qcacmn: Fix scan with random address failed since wdev is connected
Reproduce steps:
1.	Connect from OSIF success, wdev->connected = true;
2.	Disconnect from target if and reassoc from OSIF happens back to
	back.
3.	Disconnect event is not sent to kernel, wdev->connected keeps
	true, isn't cleared.
4.	Connect from OSIF failed too, wdev->connected keeps true,  isn't
	cleared.
5.	Scan with random address failed since wdev->connected is true.

To fix it, if connect req was a reassoc req and received in not connected
state for race between disconnect from target if and reassoc connect from
OSIF, set reassoc_in_non_connected to send disconnect instead of
connect rsp to kernel to cleanup kernel flags like: wdev->connected.

change-Id: Ibbe38da14e9339b49589216250453b76c7387b57
CRs-Fixed: 3290496
2022-09-22 02:21:43 -07:00
Sreeramya Soratkal
fd8b102007 qcacmn: Validate status of spectral control request processed
Validate the result of spectral specific ucfg control operation
after processing the control request to get the spectral system
capability information and the spectral diag status.

Throw error if it is an invalid operation.

CRs-Fixed: 3272699
Change-Id: Iba1b165caa41a7b4a133e9d9f3df7203a60a2b75
2022-09-21 09:34:44 -07:00
David Oladunjoye
8be4fef5d9 qcacmn: QCA vendor attribute to configure periodic sounding
Add a new QCA vendor attribute to configure the periodic sounding for Tx
beamformer functionality.

Change-Id: Id4b75e992e22facdc58b467aaed29d9b00901fad
CRs-Fixed: 3290371
2022-09-19 14:54:16 -07:00
Adwait Nayak
321fa3cb5f Revert "qcacmn: Do not send the scan entry for nontx profile to cfg80211 layer"
This reverts refer to the Commit-Id
f60c8e57d3.

Change-Id: I4d004ecad6fffd654ee3e90db765acd6cde242c1
CRs-Fixed: 3291428
2022-09-19 00:29:06 -07:00
Ashish Kumar Dhanotiya
09220f783e qcacmn: Process tx and rx rate count from peer stats
Based on the new requirement process tx and rx rate counts
from peer stats response and send these stats to user space
as part of big data stats.

Change-Id: I988f0d6cf6a3537f31433d4f57280336ab58bc38
CRs-Fixed: 3289789
2022-09-17 01:11:22 -07:00
Pragaspathi Thilagaraj
89f5e532f3 qcacmn: Add support for AP secure-LTF capability
Add support to advertise AP secure-LTF capability based
on ini configuration

Change-Id: I8aebbd683694e36d8d16215c0358f5bfb18d5443
CRs-Fixed: 3283114
2022-09-14 09:36:20 -07:00
Adwait Nayak
f60c8e57d3 qcacmn: Do not send the scan entry for nontx profile to cfg80211 layer
Send only the scan entry for Tx profile to upper layer. As in cfg80211,
it goes through every nontx profile to from a new frame.

Change-Id: I4f01a1a5ed61bfd2a2b8a541c8d3be14ffa2e3c9
CRs-Fixed: 3251364
2022-09-08 12:24:20 -07:00
Asutosh Mohapatra
81d86f0f99 qcacmn: Add QCA vendor interface to get SAR capabilities to userspace
Add QCA_NL80211_VENDOR_SUBCMD_GET_SAR_CAPABILITY to get various SAR
capabilities supported by the WLAN firmware to userspace. These
capabilities are usually reported by the firmware during the initial
bootup handshake with the driver. Based on these capabilities, user
space can choose proper SAR indexes.

Change-Id: I31be4bd58dc02fe82ae57f703f7db54f5a3c027e
CRs-Fixed: 3274703
2022-09-05 04:49:09 -07:00
Jianmin Zhu
d012f9e86f qcacmn: Fix OOB when add 6 GHz channels for pno scan
If there are more than 1 preferred network list in schedule scan, after
6 GHz channels added to pno channel list of 1st network list, channel
num is updated and set for 2nd network list wrongly, then OOB happens when
6 GHz channels are added to 2nd network list.

Change-Id: I2658620ce4e6e8dcf93e810c7bc10364e4de7a73
CRs-Fixed: 3280705
2022-09-02 14:32:32 -07:00
Jianmin Zhu
b67ab65175 qcacmn: Enhance QCA vendor roam event to indicate MLO links after reassociation
Enhance QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event for the
driver to indicate the information of the associated links of MLO
roaming.

Change-Id: I5cede840ec42bb45ec13e35a1f5caa0c0674047a
CRs-Fixed: 3278009
2022-08-31 21:10:24 -07:00
Mohammed Ahmed
fa6e07082f qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to
wlan_objmgr_get_peer_by_mac, without null pointer checking, which can
result in null pointer dereferencing.
To fix this issue, add checking of the psoc pointer before passing,
and add verification inside wlan_objmgr_get_peer_by_mac.

Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f
CRs-Fixed: 3277651
2022-08-29 22:19:33 -07:00
Jianmin Zhu
640ab03114 qcacmn: Don't treat assoc req as reassoc req
Add a flag to indicate assoc req is used for this roaming,
don't treat assoc req as reassoc req.

Change-Id: I58f357b5581ca71e97841f1d7e0f3daad5d60970
CRs-Fixed: 3273877
2022-08-27 12:09:14 -07:00
Deeksha Gupta
fc9e906e6d qcacmn: Add osif api to get assoc link net device
As per single netdev design, after roaming is completed on link
vdev retrieve assoc link net device and use that for roamed indication
Add osif callback api to hdd to get assoc link net device

Change-Id: I9c8fcd4b095580548b8251818d0f6823df7a52aa
CRs-Fixed: 3274570
2022-08-26 14:21:12 -07:00
Xiaoning Ma
8b1a96a35a qcacmn: Add fixed FDD mode to qca_btc_chain_mode QCA vendor attribute
Previously when chains of BT and WLAN 2.4 GHz are separated,
hybrid mode will be used for BTC. Now adding fixed FDD mode
to fulfill different BTC scenarios.

Change-Id: I8f415ae65160977df478c9bd908e9429d69103c3
CRs-Fixed: 3247146
2022-08-13 15:59:54 -07:00
Rohan Dutta
1f9ff41325 qcacmn: set partner link op-class
Update partner link op-class in station mode

Change-Id: I8d6908253e78adebabab724e7fd89737906367d2
CRs-Fixed: 3206442
2022-08-04 03:55:35 -07:00
Arun Kumar Khandavalli
1630cd3afe qcacmn: Indicate the connect response through new kernel model
Add changes to indicate the connect response for the ml association.

Change-Id: Id59b00992356c9e66a7442e5351bf9372f055f8f
CRs-Fixed: 3241844
2022-08-02 01:15:00 -07:00
Deeksha Gupta
f2db099a03 qcacmn: Revert "qcacmn: Disable 11BE and MLO feature support"
This reverts refer to the Commit-Id
bfe1e87b25.
Driver will enable 11be and MLO feature support.

Change-Id: I8dea7ecc7ac7b8f914c05720aa4c6139f95ab066
CRs-Fixed: 3214037
2022-07-29 12:57:58 -07:00
Pragaspathi Thilagaraj
c73852b323 qcacmn: Fix filling PASN source mac address
Fix the condition to fill the source mac address
during initiate PASN authentication

Change-Id: I997e24e8d4654b6ccb4376b790659f2c79d45256
CRs-Fixed: 3253353
2022-07-29 09:21:04 -07:00
Aravind Kishore Sukla
d7c3414ca0 qcacmn: Add back port flag for multi AKM connect support
Add logic to set back port flag based on Linux kernel version
for multi AKM connect support.

Change-Id: Ia2365afc678edf025f63d4d3c0fc963c97193eb8
CRs-Fixed: 3246135
2022-07-27 07:22:47 -07:00
Deeksha Gupta
b75f0b1100 qcacmn: Fill mlo connect resp parameter if connection is successful
In connect resp, while sending the connect resp indication to supplicant
fill mlo parameters only if connect resp status is successful

Change-Id: Ifa1baf34deaffff68e98b81bd20a4939aaec170f
CRs-Fixed: 3250884
2022-07-25 08:22:04 -07:00
Jianmin Zhu
11ae3a31b7 qcacmn: QCA vendor attribute to configure RX link speed threshold for roaming
Add QCA_ATTR_ROAM_CONTROL_RX_LINKSPEED_THRESHOLD value as the RX link
speed threshold to disable roaming. If the current link speed is above
the threshold, there is no need to roam.

Change-Id: Ifeeacfa9d49de76c28fe968c1eb26b5036261c9a
CRs-Fixed: 3200264
2022-07-22 02:44:01 -07:00
Yu Wang
9788f23284 qcacmn: QCA vendor command for CoAP offload processing
Add vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD to
enable/disable offload processing in firmware for CoAP messages
(RFC7252: The Constrained Application Protocol) or fetch the
CoAP messages cached during offload processing.

Change-Id: I2eaeba58ec6bc44738f68eb00c36ebdce2eae6f8
CRs-Fixed: 3193633
2022-07-21 21:09:57 -07:00
Arun Kumar Khandavalli
08067d2b67 qcacmn: Add support to send SAE authentication frames with link address
Add feature flag to indicate support for sending authentication
frames with Link Address.

Change-Id: Ifbd28b8d474b28b0e85a23c9c91ebccedb381d9c
CRs-Fixed: 3239304
2022-07-18 16:00:39 -07:00
Jingxiang Ge
8b82e08d02 qcacmn: Add QCA vendor attribute for TIM beacon statistics
Add the following two vendor attributes to send TIM beacon
statistics to userspace which can be used for power saving:
    QCA_WLAN_VENDOR_ATTR_LL_STATS_TIM_BEACON
    QCA_WLAN_VENDOR_ATTR_LL_STATS_TIM_BEACON_ERR

Change-Id: I2986d7e573ed7eaf72a620b928daceccc43b9066
CRs-Fixed: 3234924
2022-07-14 14:48:55 -07:00
Pragaspathi Thilagaraj
38b8236ddc qcacmn: Add support for initiate pasn auth vendor command
Add support for initiate pasn authentication using the vendor
command: QCA_NL80211_VENDOR_SUBCMD_PASN
Fill the below required attributes to initiate PASN:
QCA_WLAN_VENDOR_ATTR_PASN_ACTION
QCA_WLAN_VENDOR_ATTR_PASN_PEERS
QCA_WLAN_VENDOR_ATTR_PASN_PEER_MAC_ADDR
QCA_WLAN_VENDOR_ATTR_PASN_PEER_SRC_ADDR

Change-Id: If33f54eafe5986b4571cc21a80fb0b61578db116
CRs-Fixed: 3232261
2022-07-14 04:12:51 -07:00
Harsh Kumar Bijlani
b1461c9317 qcacmn: Add QCA vendor subcommand and attributes for SCS rule configuration
Add a new vendor subcommand QCA_NL80211_VENDOR_SUBCMD_SCS_RULE_CONFIG
for configuration event of Stream Classification Service (SCS) rule.

Also define the attributes present in this subcommand.

Change-Id: Idab722532f9870a377e5f1c02185bdfe2ccb39eb
CRs-Fixed: 3226253
2022-07-13 00:22:35 -07:00
Harsh Kumar Bijlani
f3aa35e599 qcacmn: Add enum for SCS rule configuration index
Add enum for SCS rule configuration index.
This index is used by vendor subcommand
QCA_NL80211_VENDOR_SUBCMD_SCS_RULE_CONFIG while sending NL event
to SCS daemon.

Change-Id: Ic2491d8ec6c2f13f5c45ebaec189b239f0ee9933
CRs-Fixed: 3241704
2022-07-13 00:22:27 -07:00
Aditya Kodukula
bf46176516 qcacmn: Add QCA vendor attribute to configure DBAM feature
Add a new QCA attribute QCA_WLAN_VENDOR_ATTR_CONFIG_DBAM
to configure Dedicated Bluetooth Antenna Mode (DBAM) feature.
It is used to switch between dedicated antenna mode for BT and
COEX shared antenna mode for WLAN and BT.

Change-Id: Id1e04e8647a0b4ff6bb83f272c0f891aa88f111c
CRs-Fixed: 3239894
2022-07-12 22:33:50 -07:00
Pragaspathi Thilagaraj
788ca7bb89 qcacmn: Set 11az Ranging related feature capabilities
Set 11az Ranging related extended capabilities over the
wiphy extended capabilities. Mask these fields for SAP iface

Change-Id: Ib6ce92f42d7125b4e9532d5c893ffe955be0f0dc
CRs-Fixed: 3235143
2022-07-08 21:30:55 -07:00
Pragaspathi Thilagaraj
ba8cfc391a qcacmn: Add AP and STA specific P802.11az security capabilities (vendor command)
Add feature capability indication for P802.11az security for the drivers
to advertise capabilities such as secure LTF support, secure RTT
measurement exchange support, and protection of range negotiation and
measurement management frames for station and AP interfaces
independently. This allows a more fine-tuned capability indication as an
alternative to the upstream nl80211 mechanism that is not specific to
the operating mode.

Change-Id: I53073fec66abf38986038ab9e4d17531ddd67b5a
CRs-Fixed: 3235149
2022-07-08 21:30:49 -07:00
Pragaspathi Thilagaraj
f0cac26bbb qcacmn: Add support to delete all pasn peers
Add support to delete all pasn peers

Change-Id: I2c3d95cb8994693d8944d69624d2db0992f2f03d
CRs-Fixed: 3158523
2022-07-06 23:08:01 -07:00
Pragaspathi Thilagaraj
b7fa703306 qcacmn: Add support to send PASN commands
Add support to send below PASN commands:
WMI_RTT_PASN_AUTH_STATUS_CMD
WMI_RTT_PASN_DEAUTH_CMD
WMI_VDEV_SET_LTF_KEY_SEED_CMDID

Change-Id: I5a50a634317d0a692feee5be5a36da22b4c5d713
CRs-Fixed: 3154530
2022-07-06 23:07:52 -07:00
Arun Kumar Khandavalli
db02916cc1 qcacmn: Add new cfg80211 wrapper api's Multi link operation
Add new cfg80211 wrapper api's to support single link multi wdev
operation.

Change-Id: Idf245df7a96a85afe5ff1aac5829423d0bee5b85
CRs-Fixed: 3235154
2022-07-05 09:01:26 -07:00
Pragaspathi Thilagaraj
ee69671df1 qcacmn: Donot advertise TB and NTB ranging support
Donot advertise TB and NTB ranging support as kernel
doesn't support that flags.

Change-Id: I43ba16a7130dfc570c371db8474bbc136e576173
CRs-Fixed: 3233041
2022-07-04 16:47:39 -07:00
Pragaspathi Thilagaraj
3f34e08581 qcacmn: Add QCA vendor interface for PASN offload to userspace
Define QCA vendor interface for PASN offload to userspace from the driver.

The driver can send this command as an event to a userspace component to
perform PASN authentication with a list of peers with which the driver
needs to do ranging. The userspace component, if capable of performing
PASN handshake, can perform PASN handshake with all the peer devices and
set the relevant keys by sending the
QCA_NL80211_VENDOR_SUBCMD_SECURE_RANGING_CONTEXT command for each peer
to the driver.

Once PASN handshake is completed with all requested peers, the userspace
component sends consolidated status for all the peers to the driver. The
consolidated report is required for the driver to understand that the
PASN handshake process is complete and whether it succeeded/failed for
each of the peers it was requested for. The secure ranging context is
configured only for the peers with which the PASN handshake succeeded.

When the driver requests PASN keys, the userspace component can set the
keys from its cache if those keys have not already expired and were
derived with the same source MAC address that is requested by the driver
instead of doing the full PASN handshake again.

If the driver detects that current keys of a peer are not valid anymore,
it sends a notification to userspace using the
QCA_NL80211_VENDOR_SUBCMD_PASN command and setting the action to
QCA_WLAN_VENDOR_PASN_ACTION_DELETE_SECURE_RANGING_CONTEXT. The userspace
component should delete the corresponding keys from its cache.

Change-Id: Ib6e2c7baf7728dacf0303513c5a41412dae40b8b
CRs-Fixed: 3224160
2022-06-28 15:37:55 -07:00