Commit Graph

629 Commits

Author SHA1 Message Date
Madhvapathi Sriram
1469515e43 qcacmn: Extend QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING
Extend the peer queue flush command with following attributes
1. Enable to flush per TID peer queue
2. Enable to configure when to flush the peer/TID queue

Change-Id: I1c8a9ca82cdfdd67eaf69b73a8a7076ca9c02dab
CRs-Fixed: 3130761
2022-05-15 23:00:28 -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
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
Balaji Pothunoori
4609e90b57 qcacmn: Add vendor attribute for peer TID flush vendor cmd
This change is to vendor attribute for peer TID flush vendor
cmd QCA_NL80211_VENDOR_SUBCMD_PEER_FLUSH_PENDING.

Change-Id: If112ec288a64622b9bf7fe625f7ac9e127d0ecbe
CRs-Fixed: 3170381
2022-04-25 05:38:22 -07:00
Deeksha Gupta
aaee26bbb5 qcacmn: Rename bss to bssid in struct cfg80211_mlo_link_params
Rename bss to bssid in struct cfg80211_mlo_link_params

Change-Id: I6353f6879c7e531f4447906553044291a9caf799
CRs-Fixed: 3179562
2022-04-25 01:48:24 -07:00
Divyajyothi Goparaju
baec64fb93 qcacmn: QCA vendor command support to reset configuration for eLNA bypass
Add support to reset eLNA bypass configuration to default behavior.
If value of 2 is configured, the driver can choose either to
disable/enable eLNA bypass control and there is no enforcement
from userspace.

Change-Id: I813abe5beda49e394ff381aae57c78069ca28784
CRs-Fixed: 3172147
2022-04-12 16:39:53 -07:00
Ashish Kumar Dhanotiya
2f947e661f qcacmn: QCA vendor attribute to indicate NDP interface managemtn using nl80211
Add a QCA_WLAN_VENDOR_FEATURE_USE_ADD_DEL_VIRTUAL_INTF_FOR_NDI
flag to indicate that the driver requires add/del virtual interface
path using the generic nl80211 commands for NDP interface create/delete
and to register/unregister of netdev instead of creating/deleting
the NDP interface using vendor commands.

With the latest Linux kernel (5.12 version onward), interface
creation/deletion is not allowed using vendor commands as it leads to a
deadlock while acquiring the RTNL_LOCK during the register/unregister of
netdev. Create and delete NDP interface using NL80211_CMD_NEW_INTERFACE
and NL80211_CMD_DEL_INTERFACE commands respectively if the driver
advertises this capability.

Change-Id: Icb1782b147cf7ef7fed7bb4ba28ece23d4b0dc21
CRs-Fixed: 3167119
2022-04-11 19:47:27 -07:00
Himanshu Batra
022ae0bb7f qcacmn: Avoid connect req for a 3 link MLD AP
Avoid connect req for a 3 link MLD AP

Change-Id: I7c2a1166f1d67b272f07bf62761cf850d9c2ee51
CRs-Fixed: 3165708
2022-04-08 07:20:27 -07:00
Jhalak Naik
a68a2f3b18 qcacmn: Add QCA vendor attributes for AFC support in external ACS
Add support for new QCA nested attributes to pass the AFC channel
information as part of the external ACS request command,
EXTERNAL_ACS_EVENT_CHAN_INFO.

Change-Id: I9ab4b8bfce64ea31226dad90f39bee22086b94d9
CRs-Fixed: 3152230
2022-04-05 05:10:38 -07:00
Surya Prakash Sivaraj
2fa9e5cab5 qcacmn: Add support for max 5 number of AKMs in connect req
Currently, host supports max 2 number of AKMs in connect req.

Add support for max 5 number of AKMs in connect req from
userspace.

Change-Id: I889124257c374092128e92f0f1eca1e1d0711f49
CRs-Fixed: 3151412
2022-03-29 14:12:07 -07:00
Pragaspathi Thilagaraj
e58618ef1d qcacmn: Use correct wiphy feature flag
Use NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE instead of
NL80211_EXT_FEATURE_PROTECTION_OF_RANGING_NEGOTIATION.
Also remove NL80211_EXT_FEATURE_SECURE_RTT advertisement
which is not required.

Change-Id: I5ba3da86125719f410c925ef40441acddc40ab9a
CRs-Fixed: 3154060
2022-03-23 19:42:32 -07:00
Pragaspathi Thilagaraj
aa27094cab qcacmn: Add support to set 11az ext feature flags
Add support to set 11az ext feature flags
Read the firmware capability for 11az features and
advertise the corresponding wiphy flags.

Change-Id: I85f6cc2f65a5d9892830f66a726cffc823093bca
CRs-Fixed: 3150584
2022-03-23 19:42:26 -07:00
abhinav kumar
e7ce9595c1 qcacmn: Enhance QCA vendor interface with kernel timestamp attribute
Add kernel timestamp attribute in enum qca_wlan_vendor_attr_diag
for subcmd QCA_NL80211_VENDOR_SUBCMD_DIAG_DATA to send it from
driver to userspace. Also, QCA_WLAN_VENDOR_ATTR_DIAG_HOST_TIMESTAMP
attribute indicates the system timestamp but is documented as kernel
timestamp wrongly. So correct the documentation of this attribute to
reflect the correct behavior.

Change-Id: I9559345185cb75ae6adc6792126fc6679b089e5d
CRs-Fixed: 3150783
2022-03-16 19:34:05 -07:00
Deeksha Gupta
bd5b183f58 qcacmn: Enhance QCA vendor interface to indicate TWT required capability of AP
Add QCA_WLAN_TWT_NOTIFY command type to send event to userspace when AP
changes TWT required bit field in its capabilities.

Change-Id: I6333213f4e8ca4fe9ca637db287759fd6c6622f4
CRs-Fixed: 3143525
2022-03-14 07:28:37 -07:00
Jhalak Naik
055dfbe881 qcacmn: Add Host support for Spectral FFT recapture
Add support to receive the fft_recapture arg value
from spectraltool, handle the FFT recapture config and
pass this to FW. The recapture feature must be
enabled only for spectral scan period > 52 us and
Normal Spectral scans.

Change-Id: Ied637704d25bb15bff2139a215da7481d4f80e4f
CRs-Fixed: 3140890
2022-03-09 06:51:27 -08:00
chunquan
19cc13911c qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
2022-03-05 07:11:01 -08:00
Bapiraju Alla
b88a049cb7 qcacmn: Don't unlink the BSS for ML VDEV connect failure
Currently driver is doing unlink BSS when there is a connect failure.
This will cause an issue, for 2G+5G ML connection.
  1) Connect on 5G link failed due to Auth failure
  2) Connect on next candidate (2G) is success and FW is in SMM
  3) Partner link(5G) connect will fail due to 5G scan entry won't
     be found in SMM mode.

To avoid this, don't unlink the BSS for ML VDEV connect failure.

Change-Id: Icaa8c736d9038c971b5c3d459fd4af5a833bdc80
CRs-Fixed: 3129726
2022-03-02 04:19:22 -08:00
Alan Chen
51637c64bb qcacmn: Add new cfg80211 wrapper for registering net device
Add a new wrapper wlan_cfg80211_register_netdevice() that calls
cfg80211_register_netdevice for Kernel 5.12+.

Change-Id: I17655f1e3123d663d25b9dfc82e7c6f737486391
CRs-Fixed: 3133310
2022-03-02 01:28:27 -08:00
Jayachandran Sreekumaran
d0232b9bc0 qcacmn: Vendor command to configure rate mask
Introduce a new vendor command QCA_NL80211_VENDOR_SUBCMD_RATEMASK_CONFIG.
This is used to set the rate mask config to be used in mcs rate selection
per PHY type.

Change-Id: I013a547be89dac187bc48531a674f3dde8a3f6e9
CRs-Fixed: 3137604
2022-03-01 05:39:19 -08:00
Surya Prakash Sivaraj
9ed0a7c970 qcacmn: Add vendor command attributes for NDP
Add support for the QCA_WLAN_VENDOR_ATTR_PEER_NDPE_SUPPORT
and QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID vendor attributes
in the driver.

Change-Id: I8835f363f8327315c9ec91acfb3770cd3313f572
CRs-Fixed: 3128863
2022-03-01 05:39:14 -08:00
Bapiraju Alla
6bb2ad7c5b qcacmn: Get partner vdev using vdev ID instead of link ID
While notifying the ML connection status to the supplicant, partner vdev
information will be filled in the connect response. This partner vdev info
is populated using partner link IDs. This may cause issues since it is
not guaranteed that link id information in the partner vdev is valid while
notifying the connection status to the supplicant.

To address this, get partner vdev information using vdev ID instead of
link ID.

Change-Id: I5e45b038b1fe5b6ab9c6bbb514eefb0ad4c39e66
CRs-Fixed: 3117702
2022-02-23 11:10:35 -08:00
Liangwei Dong
a0fa276d5a qcacmn: Add MCC quota Vendor command and event index
Add enum QCA_NL80211_VENDOR_SUBCMD_MCC_QUOTA_INDEX for
new vendor command QCA_NL80211_VENDOR_SUBCMD_MCC_QUOTA.

Change-Id: Ib09d5a6ad59b625e2d5d458a01e8f6c82cee4762
CRs-Fixed: 3101808
2022-02-17 07:45:17 -08:00
Liangwei Dong
e157d2f8f1 qcacmn: Add QCA vendor MCC channel quota command and event
Add QCA_NL80211_VENDOR_SUBCMD_MCC_QUOTA. When two or more interfaces are
active on the same band and two different home channels (MCC), the
target may allocate quota of "on channel" time for each home channel.
The target will indicate the quota information to application layer with
this event. Application may do TX bitrate control based on the
information. The user may also set the MCC quota for an interface by
using this command.

Change-Id: Ic8d8c5a5f2a6f0c55fd46394fa8e2062a37abefc
CRs-Fixed: 3101791
2022-02-17 07:45:11 -08:00
Nirav Shah
e1f64d3562 qcacmn: Rename moderate latency level to XR latency level
Currently the moderate latency level is not used. Rename the moderate
latency level to XR latency level to be used in XR (extended reality)
applications.

Change-Id: Ie5ca8983c17800131bb554dbb14f5cf94023aa1c
CRs-Fixed: 3128109
2022-02-15 18:50:38 -08:00
Srinivas Girigowda
fd35443a0a qcacmn: Add support for TWT disable operation
Add support for TWT disable operation.

Change-Id: I302ac6a3898f53ea25030d9a15d8d14988287b27
CRs-Fixed: 3085373
2022-02-11 00:25:20 -08:00
Srinivas Girigowda
2d0aea5c1d qcacmn: Add support for TWT enable operation
Add support for TWT enable operation.

Change-Id: I638a4a78bf33d7185d8eab1f6735c3db0abfcd53
CRs-Fixed: 3085373
2022-02-11 00:25:12 -08:00
Srinivas Girigowda
5367345cfb qcacmn: os_if: Add TWT componentization structs and skeleton code
Add TWT componentization structs and skeleton code.

CRs-Fixed: 3085329
Change-Id: I3ddbe7caad9e77858a2300151c92a83bc6c4b3c7
2022-02-11 00:24:36 -08:00
Vishal Miskin
0f0d23d5cd qcacmn: Defined a driver interface for periodic TSF sync feature
Add a QCA vendor netlink interface to start/stop periodic TSF sync
feature and also support configuration of interval value as part of TSF
sync start command. In addition, improve documentation for the related
attributes and values.

Change-Id: Ia39609a3cc72c0194fe4685e43f08f1c49f8b412
CRs-Fixed: 3108416
2022-02-09 05:31:37 -08:00
Himanshu Batra
66883847fb qcacmn: Ignore ML IE if vdev is created without MLD context
Ignore ML IE if vdev is created without MLD context

Change-Id: I7992bbbc92e177ab84c44751844fa8a9a8a986dc
2022-02-02 00:47:32 -08:00
Divyajyothi Goparaju
a266f3af83 qcacmn: move wlan_cfg80211_mc_cp_stats.h file from cmn to qcacld
Currently wlan_cfg80211_mc_cp_stats.h file is present at
qca-wifi-host-cmn/cmn/os_if/linux/cp_stats/inc.
With this change, move file to  qcacld-3.0/os_if/cp_stats/inc
as this file contain MCC specific code.

Change-Id: I6017e1f2b136da3a1de2965a37c56c9477941d79
CRs-Fixed: 3108258
2022-02-01 23:35:59 -08:00
abhinav kumar
3b1731aa70 qcacmn: Allow FW to pno scan 6G chan based on RNR flag only
First host checks below two things in PNO scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in pno scan request.
2. At least one 6G channel is present in the pno scan req.

If any of above conditions satisfy, Host fills all remaining
(other than channel(s) present in pno scan req) valid 6 GHz
channel(s) to pno scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).
Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for pno scan
to firmware.

By this driver allows Firmware to scan 6G channels based on
RNR IEs only (for colocated APs reported by 2.4/5 GHz APs).

Change-Id: Ib6118c4525e9fbe233eb6a7e07a4a3345d486e8a
CRs-Fixed: 3103923
2022-01-27 23:01:01 -08:00
Ashish
5fe88ada0a qcacmn: Free scan request if netdev is NULL or get vdev ref fails
Currently driver just cancels the scan request and does not free
scan request memory if netdev is NULL or get vdev ref fails,
which leads to memleak.

To address abobve issue, free the scan request if netdev is NULL
or if get vdev ref fails.

Change-Id: Id6605e76a8c0977df93428f2aeb73c0bdfb84685
CRs-Fixed: 3107784
2022-01-19 14:19:07 -08:00
Mukul Sharma
7a88422105 qcacmn: Add new vendor attributes to avoid coex unsafe frequencies
Add additional attributes in QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY_EXT
vendor sub command to avoid usage of unsafe frequencies on wifi
interfaces sent from userspace to the driver/firmware.
The driver/firmware shall use restrictions and power cap accordingly
to restrict the usage of these frequencies on operating interface(s).

Change-Id: Ib2234137e436f1ddfe1163aed6e1d4b291f19aa8
CRs-Fixed: 3098836
2022-01-19 09:31:25 -08:00
Bing Sun
037561c0a4 qcacmn: Add a QCA vendor attribute to indicate ACS over EHT
Add QCA_WLAN_VENDOR_ATTR_ACS_EHT_ENABLED flag attribute to conduct ACS
for EHT mode. The driver can consider EHT specific parameters such as
puncture pattern for ACS when this flag attribute is indicated by
userspace.

Change-Id: I9cb0b7a6bc830a5f4f01a7a7fa5212cc6b2c3a95
CRs-Fixed: 3108987
2022-01-13 15:04:53 -08:00
abhinav kumar
9c2ce46fc6 qcacmn: Allow FW to scan 6G chan based on RNR flag only
First host checks below two things in host scan request:
1. Userspace sets NL80211_SCAN_FLAG_COLOCATED_6GHZ flag
in host scan request.
2. At least one 6G channel is present in the host scan req.

If any of the above conditions satisfies, Host fills all
remaining (other than channel(s) present in host scan req)
valid 6 GHz channel(s) to scan requests and set the flag
FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining channel(s).

Host sends this updated channel list via WMI command
WMI_START_SCAN_CMDID_param_tlvs->channel_list for host scan
to firmware.

With this change, driver allows Firmware to scan 6G channels
based on RNR IEs only (for colocated APs reported by 2.4/5
GHz APs).

Change-Id: I2d9d2aac58bbc521b2476756d5919647bdc265cc
CRs-Fixed: 3103873
2022-01-13 04:54:22 -08:00
Aditya Sathish
877cf5ef7e qcacmn: Add QCA attribute for ACS puncturing bitmap
Add support for a new QCA attribute to pass the puncturing
bitmap as part of the DO_ACS vendor command.

CRs-Fixed: 3102366
Change-Id: Ic0e54d82e48bae695baf3be4fd388ec15f81a416
2022-01-11 06:53:14 -08:00
Bapiraju Alla
76caeb9b44 qcacmn: Use target if component for VDEV manager response path
Currently, VDEV manager responses are using legacy path instead of
target_if, vdev_mgr and os_if components. As the driver implementation
is planned for converged model, legacy implementation will be moved to
the respective components.

To avoid rework, Use target_if, vdev_mgr and os_if components to process
the FW responses corresponding to the vdev manager.

Change-Id: I778f6de93481fc730383e8f8e1c604f173947d69
CRs-Fixed: 3093776
2021-12-23 00:54:35 -08:00
Jyoti Kumari
9f3995df8f qcacmn: Add support for lower span active and passive dwell time
Add LOW_SPAN_ACTIVE_DWELL_TIME and LOW_SPAN_PASSIVE_DWELL_TIME
macro support to keep all 2.4g/5g active/passive dwell time
same for low span scan mode.
Disable adaptive dwell to firmware so that firmware cannot
modify dwell time.

Change-Id: Iff05dd7b37a40226c61b28a1e59ea8aa8c57cb52
CRs-Fixed: 3076163
2021-12-02 02:25:11 -08:00
Edayilliam Jayadev
aaf4382daf qcacmn: Increase the Spectral payload size
Increase the Spectral payload size to account for
FFT size 11.

CRs-Fixed: 3073239
Change-Id: I5c6db642267a96cbc535bf6842c8f9ac90b1a335
2021-12-01 04:23:19 -08:00
Himanshu Batra
f9b5d6b536 qcacmn: Get ML Info from connect req
Get ML Info from connect req

Change-Id: I90c200aff32d88dd934aaa11893f58a37448ffb9
2021-12-01 01:40:27 -08:00
Shashikala Prabhu
a117c19fda qcacmn: Add support to extract the channel info from RTT measreq
Add support to extract the freq, cfreq1, cfreq2, PHY mode, Destination
macaddr, and channel BW values from the RTT measurement request buffer
received from the LOWI application. Pass these values to a registered
callback. Users can use these values to make some decisions on the RTT
scan.

Change-Id: Idb2232c07bbfa2946dc01e75908b9a6036597ecf
CRs-Fixed: 3060685
2021-11-22 15:09:55 -08:00
Abhishek Singh
3915bd37fb qcacmn: Drop disconnect req in INIT state
In case the vdev is already disconnected, the indication to
the upper layer, would have been sent as part of previous
disconnect/connect failure.

If the upper layer is in process of connecting, sending
the disconnect indication back again may cause it to incorrectly
think it as connect failure. So sending a disconnect indication
again is not advisable.

So if a new disconnect is received in INIT state, drop the
disconnect and return failure.

Also remove osif_cm_reset_id_and_src() from osif disconnect
to avoid race between disconnect complete of old disconnect
and new disconnect request. With osif_cm_reset_id_and_src()
old disconnect might also get dropped in osif and with this
fix new disconnect will also get dropped, so make sure that
last/old disconnect indication is sent to upper layer.

Change-Id: Icf7352d8904473329edff9ec124c6197f214f88b
CRs-Fixed: 3074093
2021-11-19 02:03:55 -08:00
Bapiraju Alla
430a5f423e qcacmn: Fix 11BE compilations when kernel doesn't support 11be
Along with 11BE feature macro, check for Kernel 11be macro to avoid
compilation issues when kernel doesn't support 11be.

Change-Id: I11c8287725a25b6b4e3234a38ae61d50f293cc96
CRs-Fixed: 3066178
2021-11-16 20:57:54 -08:00
Himanshu Batra
b21d96305e qcacmn: Modify MLO disconnect handling
Modify MLO disconnect handling to issue disconnect on all links in
parallel
Also modify connect resp to accommodate ml info in connect resp

Change-Id: I57575c6ce7c8ebff7770f862dc81e7dfd20aa42d
2021-11-11 00:37:03 -08:00
Will Huang
7581cd6d12 qcacmn: Add QCA vendor attribute to configure ARP/NS offload feature
Add a QCA vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_ARP_NS_OFFLOAD to
configure ARP/NS offload feature.

Change-Id: I976ed866272c7c82ff12593339bd2d551af6741b
CRs-Fixed: 3062895
2021-11-10 23:02:47 -08:00
Bapiraju Alla
055acf7a87 qcacmn: Notify partner links info in connect response to the supplicant
Fill ML partners info in connect response structure of the connect
notification to the supplicant.

Change-Id: I3b972254138d0f00ef63f2b4d336d142e6d5e2ae
CRs-Fixed: 3036325
2021-11-03 11:31:38 -07:00
Arun Kumar Khandavalli
b94a1425ae qcacmn: Add 11be dot11 mode to qca_wlan_802_11_mode
In the new wifi specification 11be mode support is added, add a new
11be dot11 mode to qca_wlan_802_11_mode.

Change-Id: I9c5238ffaac96fcdf83e7c342a053dda7fc1f205
CRs-Fixed: 3050936
2021-11-02 02:34:37 -07:00
Shiva Krishna Pittala
d0624dedd6 qcacmn: Add QCA vendor attribute to configure priority of vendor scan
Add the attribute QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY to configure the
priority of vendor scan relative to other scan requests.
Add the valid values that this attribute can take.
Also, add an API to convert NL80211-based scan priority value to internal
scan priority value.

Change-Id: I6c62166c2dd6ea0880b332496b1e4bb0b41840c6
CRs-Fixed: 3044332
2021-10-28 04:54:24 -07:00
Srikanth Marepalli
a4128d5887 qcacmn: Add roam set param command for roam params
This change introduces the new roam set param WMI command to set
the roam params from host to FW.
Also added a fail_bssid param in wmi_roam_result TLV to know the
roam failed AP BSSID from the FW.
Added a new vendor command event for sending roam events stats
attributes to userspace.

Change-Id: I7a08635a7912cbd940d90a2d62433296740ad913
CRs-Fixed: 3050799
2021-10-27 12:15:50 -07:00
Srikanth Marepalli
742b2805c0 qcacmn: Vendor command to configure/trigger the roam events
Introduce a new vendor command QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS
that aims to configure/trigger the roam events from the driver.

Change-Id: Ifd9464cc8cb485890c8d171dc136d377f7a59fa1
CRs-Fixed: 3028404
2021-10-27 12:15:45 -07:00