Commit Graph

656 Commits

Author SHA1 Message Date
abhinav kumar
2e92c9f7a5 qcacmn: Add QCA vendor attribute to configure ROAM_BAND
Add a QCA vendor attribute to configure the driver to use
roam band set by userpace. This attribute is also used to
get the configured roam band from the driver.

Change-Id: I5ea7f9d12b2a01e1b4baa43e46342af34bebba49
CRs-Fixed: 3009747
2021-08-31 07:54:59 -07:00
Shiva Krishna Pittala
e0ff191da1 qcacmn: Add QCA vendor attribute indicating the spectral scan bandwidth
Add the following vendor attribute to indicate the bandwidth to be used for
Spectral scan operation.
 - QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_BANDWIDTH

CRs-Fixed: 3024152
Change-Id: I8ffc5f4d0106cb293ac81408e3b691fc29808080
2021-08-30 15:47:16 -07:00
Yue Ma
674474c55a qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: I698492f175ea140e6854c372f366a63f36de24c9
CRs-fixed: 3022556
2021-08-30 13:38:44 -07:00
Kiran Kumar Lokere
e2ada05cee qcacmn: Config support to use BSSID in probe request RA
User configuration support to use scan request BSSID value
in Probe Request frame RA during the scan.

Change-Id: I40d07e4c3e4814a9c816b3e426dcbb63df7ddf27
CRs-Fixed: 2945679
2021-08-27 01:06:23 -07:00
Utkarsh Bhatnagar
8041677626 qcacmn: Add QCA vendor interface to fetch thermal stats from driver
Enhance QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD to fetch thermal stats
for different temperature levels from the driver to userspace. The
stats will be stored in the driver/firmware for predefined temperature
levels and will be reported to userspace when
QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD is sent with command type
QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_GET_THERMAL_STATS.
The thermal stats can be cleared from userspace by sending
QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD command with type
QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_TYPE_CLEAR_THERMAL_STATS.

Change-Id: I937bc89865df484a068c887d906df5a9502f1925
CRs-Fixed: 3016851
2021-08-23 19:09:21 -07:00
Pooventhiran G
60533b64ea qcacmn: Add policy for QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
Vendor commands using nested attributes should use properly defined
policies instead of RAW_DATA and the same has been enforced since 5.4
kernel. Hence, defined a policy for the vendor command
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS.

Change-Id: Ibdf7a19ddd533653c0706b4f0cf3ac97d31b9e40
2021-08-20 01:18:39 -07:00
Deeksha Gupta
bff0c0a961 qcacmn: Add QCA vendor attribute for TWT termination due to power save exit
Add QCA new status vendor attribute
QCA_WLAN_VENDOR_TWT_STATUS_POWER_SAVE_EXIT_TERMINATE
to indicate the TWT session termination due to power save
exit request from userspace.

Change-Id: I515e4e8384b92b2556d72c4015252f075577f13c
CRs-Fixed: 3013360
2021-08-18 05:17:17 -07:00
Kiran Kumar Lokere
60c442a689 qcacmn: QCA vendor attributes for BTWT and Rx ctrl frame to MBSS
Add QCA vendor attributes to configure the driver to enable/disable
the Broadcast TWT support and Rx Control Frame To MultiBSS support in
HE capabilities information field. This attribute is used for testing
purposes.

Change-Id: I22a2646b642d1e764e89b209e0c872ac113ca2ee
CRs-Fixed: 3012996
2021-08-16 12:53:09 -07:00
Aditya Kodukula
6ad64c3532 qcacmn: QCA vendor command for mDNS offload
Define a new vendor command for enabling/disabling mDNS offload.

Change-Id: Id0245a8fe76e0d7c6e15ec5f91db67ee30a6325c
CRs-Fixed: 3008553
2021-08-10 01:47:38 -07:00
Vivek
f8167f4dbc qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which is
used by the supplicant to allocate memory.

In those situations, we should pass the allocation flags based on
the context in which the response is sent.

Send the response with the right allocation flags to the supplicant.

Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1
CRs-Fixed: 2987552
2021-07-26 13:54:14 -07:00
Kiran Kumar Lokere
900bd16b58 qcacmn: QCA vendor attribute to configure BSS max idle support
Add new QCA vendor attribute to configure the driver to enable/disable
the BSS max idle period support. This attribute is used for testing
purposes.

Change-Id: Ib63c81e34344e637b638638b1da323102c66d906
CRs-Fixed: 2994951
2021-07-26 09:14:27 -07:00
Kiran Kumar Lokere
8917a00d40 qcacmn: QCA vendor attribute to use BSSID in Probe Request frame RA
Add a QCA vendor attribute to configure the driver to use scan
request BSSID value in Probe Request frame RA(A1) for scan.
This attribute is used for testing purpose.

The driver saves this configuration and applies this setting to all
user space scan requests until the setting is cleared. If this
configuration is set, the driver uses the BSSID value from the scan
request to set the RA(A1) in the Probe Request frames during the scan,
else the broadcast address is set in the Probe Request frames RA(A1).

Change-Id: I0b26fde5f631e99f3e6d0ecf52918cd49d0153c7
CRs-Fixed: 2994935
2021-07-26 09:14:22 -07:00
wadesong
abdd65099c qcacmn: Limit log verboseness of some chan change code
The log output will be too verbose when the following scenario
is hit:

 1) hostapd is started on chan 149 with cc=US
 2) ref-sta connects to sap
 3) ping -i 0.01 to ref-sta from dut
 4) set cc=JP on dut

and the verbose log output will result in a wlan scheduler
watchdog bite on some platforms.

Use rate limited versions of log outputting api to avoid the
instabilities brought by this.

Change-Id: Id87d81070334aab145bae6909857fd5d2851008a
CRs-Fixed: 2868738
2021-07-23 22:36:29 -07:00
Nandha Kishore Easwaran
b82dd5554f qcacmn: Add 4.9 ghz frequency for scan command
Add 4.9 ghz frequency check also in scan command. This change
is needed so that scan entry is formed and association happens in 4.9ghz.

Change-Id: I2fbf719ea6a5e747e07a5973a2da3d2ca2d11b7b
2021-07-23 20:17:29 -07:00
Himanshu Batra
73f871654f qcacmn: CM changes for ML connection
CM changes for ML connection

Change-Id: I7718734b0f08c8e73702b2c1c7c297bf71b6b5e3
2021-07-20 08:28:42 -07:00
Jia Ding
5960ae09ec qcacmn: Add uplink delay attribute in QCA vendor command get_sta_info responses
Add uplink delay attribute in responses of
QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO vendor command.

Change-Id: I9f1d6f1a8e9135ed18949759a837c866005b43c5
CRs-Fixed: 2990880
2021-07-19 17:57:38 -07:00
Jia Ding
df63752a7c qcacmn: Extend QCA vendor command for TSF to enable and disable auto report
Add TSF cmd to enable and disable automatic TSF report from the target
to the host.

Change-Id: I17b255299f55b8e78968d951824726d533a7c6e9
CRs-Fixed: 2991909
2021-07-17 06:06:50 -07:00
Jia Ding
8831af07cc qcacmn: Add channel load percentage attribute into QCA vendor command
Add channel load percentage attribute in enum ll_stats_results.

Change-Id: Ib3603730e93d70ab1adc384b0c438f198fc889e9
CRs-Fixed: 2990868
2021-07-16 20:47:32 -07:00
Deeksha Gupta
a7fee1cb2f qcacmn: Add QCA vendor attribute to enable/disable FT over DS
Add QCA vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_FT_OVER_DS
to configure FT over DS to the driver/firmware.

Change-Id: I0745c27c6bc0a8d1075d753f1d898870479105f8
CRs-Fixed: 2968681
2021-07-15 04:13:18 -07:00
Aditya Sathish
6b048962f6 qcacmn: Add support for scanband config for cfg80211 scan
cfg80211tool athX scanband <val> config is used to
select a specific band to scan (i.e., 2.4GHz and/or
5GHz). The initial support for this command was
added as an iwpriv for WEXT-based scanning through
IOCTL. However, on bringing up cfg80211 support,
support for not extended for the cfg80211-based
vendor scan.

Add support to ensure that this command will
control band configuration for scanning for cfg80211
vendor scanning.

CRs-Fixed: 2969914
Change-Id: Ie3b7140ea78f15533e73fbe6251e670e6faa6d29
2021-07-02 02:46:47 -07:00
Abhishek Singh
04a8eb2045 qcacmn: Code cleanup for connection manager Macro
Code cleanup for connection manager Macro.

Change-Id: I1526187e5efc6f4e38265d617c0342b4c1ea1228
CRs-Fixed: 2978727
2021-06-29 01:33:15 -07:00
Yu Wang
dcd269c55a qcacmn: enhance crypto api to install key synchronously
Add parameter 'bool sync' for wlan_cfg80211_crypto_add_key()
to indicate whether or not to add key synchronously.
If it's set to true, wait until install key complete event
is received.

Change-Id: I9a69d486665fb3f65a5720ccfbfb638c09329418
CRs-Fixed: 2865832
2021-06-21 23:14:27 -07:00
Liangwei Dong
baa0309eaf qcacmn: Add QCA vendor definitions for DFS radar history
Introduce definitions for QCA vendor specific subcommands and
attributes to report DFS radar history.

Change-Id: I2140f636a42978b564fa0800484d3dc89865c2a0
CRs-Fixed: 2958699
2021-06-18 08:57:39 -07:00
Abhishek Ambure
7f1cabbe4d qcacmn: Add support for cfr data transport mode
User sets CFR data transport mode using vendor command
QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG. By default
CFR data transport mode is relayfs, user uses vendor command
attr QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE to set
transport mode QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS or
QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS.
If user sets QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_RECEIVER_PID
attr in QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG vendor
command then hosts uses RECEIVER_PID to send unicast NL events
for CFR data.

Change-Id: I40e896fad8af24e761fcbedeba761f4a3815f0b8
CRs-Fixed: 2952095
2021-06-03 22:16:41 -07:00
Kiran Kumar Lokere
21ef8b1970 qcacmn: QCA vendor attributes to configure keep alive data type
Add a QCA vendor attribute to configure the driver to use Data or
Management frames for keep alive data. This attribute is used for
testing purpose.

Change-Id: I03b133f3d61c4d34b79e41ad72cfc24334380658
CRs-Fixed: 2960804
2021-06-03 17:06:23 -07:00
Kiran Kumar Lokere
d0b1a8a303 qcacmn: QCA vendor attribute to configure ER SU PPDU type
Add QCA vendor attribute to configure the driver to transmit the
Data frames with ER SU PPDU type format. This attribute is used
for testing purpose.

Change-Id: If11523ea3e6316c47181342c3acc8425da85ee1b
CRs-Fixed: 2960794
2021-06-03 17:06:19 -07:00
Pragaspathi Thilagaraj
3c632fd1e3 qcacmn: Add QCA interface to configure band specific rssi thresholds for roaming
Add QCA interface to specify the RSSI thresholds separately for candidate
APs from different bands.

Change-Id: I51d2e7c4490fde3901a4e4e8ad31d9c18823637c
CRs-Fixed: 2951242
2021-05-30 23:52:10 -07:00
Deeksha Gupta
7b438a5835 qcacmn: Add support for QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAC_ADDR
As a part of this change, in SAP TWT mode this mac_addr
attribute is required in response for TWT setup, get_status,
pause, response and teardown. And is required in request
for TWT get_status and teardown.

Change-Id: I230047ac46181a6bfca054c610b96c054f5c303d
CRs-Fixed: 2952331
2021-05-28 05:51:32 -07:00
Huashan Qu
3493643d20 qcacmn: Add host roam preauth handling code for connection manager
Add host roam preauth handling code for connection manager

Change-Id: Ie2ee72bb33fe5706349d1eb13208a0cfcd15aacf
CRs-Fixed: 2954506
2021-05-28 01:47:08 -07:00
sheenam monga
3cc8e6b591 qcacmn: Add QCA vendor interface to query usable channels
Add QCA vendor interface for userspace to get information of usable
channels for different interface types from the driver/firmware.

Change-Id: Ice662b9f14e95f32f853637e73bccd686678f278
CRs-Fixed: 2939047
2021-05-17 23:43:45 -07:00
Abdul Muqtadeer Ahmed
3921edb0ae qcacmn: Fix the integer overflow issue
In the assignment of varaible expected_field_info_size with an expression,
there might be an issue of integer overflow.

To fix this issue add a check for the expression with UINT_MAX
before assigning the expression to variable expected_field_info_size.

Change-Id: Iaa58fc164655d5b074eef55f8fd78f83a71e3fdf
CRs-Fixed: 2825846
2021-04-27 16:13:16 -07:00
Jingxiang Ge
4cb1ee5c0c qcacmn: Add vendor hang reason code for tasklet/credit latency
Define a new reason code in enum qca_wlan_vendor_hang_reason,
QCA_WLAN_TASKLET_CREDIT_LATENCY_DETECT, for tasklet/credit latency
detection.

Change-Id: I4852fc22f57d14d6eac30ddfd8361f2a63326981
CRs-Fixed: 2929164
2021-04-26 00:17:48 -07:00
Pragaspathi Thilagaraj
a9ba1ebb26 qcacmn: Add vendor reason code for TWT setup reject due to scan in progress
The firmware rejects the TWT setup request when scan is in
progress. Extend enum qca_wlan_vendor_twt_status to represent new
reason code for it.

Change-Id: I8576d8cce2fac62d9e3cf020a3dadee06ec14d5c
CRs-Fixed: 2923272
2021-04-23 10:49:15 -07:00
abhinav kumar
7bb4eb806a qcacmn: Vendor command to config concurrent STA connection policies
Introduce a QCA vendor command to configure the concurrent connection
policies when multiple STA interfaces are (getting) active.

Change-Id: I574880e526e4aa8e179b417fbcba6d7e9e9fcfb1
CRs-Fixed: 2915545
2021-04-22 17:34:21 -07:00
Kiran Kumar Lokere
8a76044e65 qcacmn: Vendor attributes to configure broadcast TWT parameters
Define the new TWT attributes for configuring the broadcast TWT
parameters in enum qca_wlan_vendor_attr_twt_setup.

Change-Id: Ia7b0e1565cef3bfe5d213b783390c7231a1a8446
CRs-Fixed: 2924690
2021-04-19 20:57:25 -07:00
Deeksha Gupta
38ec0b2a48 qcacmn: Introduce reason code for TWT session
The firmware sends new reason codes for roaming and
channel switch in progress. Update the enum
qca_wlan_vendor_twt_status to represent new reason code.

Change-Id: I4446ebf2e096873ab641029447f8fba9153216aa
CRs-Fixed: 2908446
2021-04-16 10:20:30 -07:00
Jeff Johnson
79b61afd8f qcacmn: Do not export static functions
Linux kernel commit 15bfc2348d54 ("modpost: check for static
EXPORT_SYMBOL* functions") adds a check to make sure that static
functions are not exported.

With this in place the following fatal errors are reported:
FATAL: modpost: "__qdf_nbuf_get_ether_type" is a static EXPORT_SYMBOL
FATAL: modpost: "os_if_spectral_free_skb" is a static EXPORT_SYMBOL
FATAL: modpost: "qdf_nbuf_tx_desc_count_update" is a static EXPORT_SYMBOL
FATAL: modpost: "__qdf_nbuf_get_ip_offset" is a static EXPORT_SYMBOL

To fix these errors do not export the static functions.

Change-Id: Ib5caab904401900bafb23dee23b119daa76d4055
CRs-Fixed: 2910980
2021-03-31 10:07:30 -07:00
Amruta Kulkarni
5c1ca03ebe qcacmn: Support roam sync ind in CM
Add support for roam sync indication in
connection manager.

Change-Id: I750403aa0dfa6c615f9bca832898c63af608d28d
CRs-Fixed: 2901863
2021-03-24 09:48:18 -07:00
Kiran Kumar Lokere
902d27c0d4 qcacmn: Vendor attribute for 6GHz connection with all security types
Add a QCA vendor attribute to configure the driver to allow the
6GHz connection with all security types. This attribute is used for
testing  purposes.

Change-Id: Icbd493a9a28bef77d8a31f12082a37a1bacdfd35
CRs-Fixed: 2900829
2021-03-24 04:33:40 -07:00
Kiran Kumar Lokere
3b81ea6e27 qcacmn: QCA vendor attribute to ignore SAE H2E requirement mismatch
Add a QCA vendor attribute to ignore SAE H2E requirement mismatch
for 6GHz connection. This attribute is used for testing purposes.

Change-Id: I9d1a5680d3949da1a8009f4689d0c2859f15989f
CRs-Fixed: 2900813
2021-03-24 04:33:36 -07:00
Pragaspathi Thilagaraj
0cb0420cc7 qcacmn: Introduce reason code for TWT teardown due to concurrency
The firmware sends new reason codes to indicate TWT teardown due to
single channel and multi channel concurrency. Update the enum
qca_wlan_vendor_twt_status to represent new reason code.

Change-Id: I49b35ca9570a4faf73f6c93eb957c357576efd1e
CRs-Fixed: 2904365
2021-03-23 21:39:39 -07:00
Deeksha Gupta
4ea1f79ac8 qcacmn: Add new TWT attribute to configure wake mantissa in us
Add support for below TWT setup additional parameters:
Mantissa in Microsecond

Change-Id: I4d60393892477ac63e28a5df5274e04334bcfe42
CRs-Fixed: 2892933
2021-03-18 03:38:28 -07:00
Amruta Kulkarni
64b096fde9 qcacmn: Support roam start and roam abort request in CM
Add support for roam start and roam abort request
in connection manager.

CRs-Fixed: 2882233
Change-Id: I5780e7f22363ee6014d39b0df9cb068b4afdd71c
2021-03-05 10:10:04 -08:00
Ashish Kumar Dhanotiya
ad9b0c99d0 qcacmn: Replace wlan_cm_roam_resp struct with wlan_cm_connect_resp
Structure wlan_cm_roam_resp and wlan_cm_connect_resp are identical
structures and in current code these structures are used for connect
and reassoc functionalities with different functions as these are
identical structures and only one structure can be used to reduce
the duplication of the code.

To address this code duplication issue replace wlan_cm_roam_resp
structure with wlan_cm_connect_resp.

Change-Id: I90949c25f46acd2fa78cebb70c9a04f0718b90c4
CRs-Fixed: 2875232
2021-03-04 06:37:09 -08:00
Himanshu Batra
d269165345 qcacmn: Set value for locally_generated flag for disconnect response
Set value for locally_generated flag for disconnect response based on
disconnect req source

Change-Id: I4f693be98ca10a5f883f1a9349ed50876679e723
CRs-Fixed: 2880520
2021-03-01 22:50:10 -08:00
Kiran Kumar Lokere
a7436df393 qcacmn: QCA vendor attribute to configure Punctured Preamble Rx in HE cap
Add a QCA vendor attribute to enable/disable the Punctured Preamble Rx
support in HE PHY capabilities.
This attribute is used for testing purposes.

Change-Id: I5d0089ddc95beb334c73538431dde3a034a1bc21
CRs-Fixed: 2886737
2021-03-01 13:15:37 -08:00
Kiran Kumar Lokere
f94de208c2 qcacmn: QCA vendor attribute to disable data and management frame Tx
Add a QCA vendor attribute to configure the driver to disable data
and management response frame transmission to test the BSS max
idle period feature.
This attribute is used for testing purposes.

Change-Id: I106da43f9044bd15727152e04a233376e79e034a
CRs-Fixed: 2886732
2021-03-01 13:15:33 -08:00
Kiran Kumar Lokere
1da1673aae qcacmn: QCA vendor attribute to configure RU 242 tone for data Tx
Add a QCA vendor attribute to configure the driver/firmware to
use only RU 242 tone for data frame transmission.
This attribute is used for testing purposes.

Change-Id: I32af9b34b335887279a41f64d7e93b14d6f44f41
CRs-Fixed: 2884735
2021-03-01 13:15:29 -08:00
Kiran Kumar Lokere
ddd3c558ed qcacmn: QCA vendor attribute to configure BSS max idle period
Add a QCA vendor attribute to configure the driver with a specific BSS
max idle period value to advertise in (Re)Association Request frames.
This attribute is used for testing purposes.

Change-Id: Ibe98ab7947b759d9dcd3f963629de4dd6a86b543
CRs-Fixed: 2884705
2021-03-01 11:09:12 -08:00
gaurank kathpalia
fffe13cbc9 qcacmn: Fix the pointer reset in cm_allocate_and_copy_ies_and_keys
In cm_allocate_and_copy_ies_and_keys instead of target's pointer
source's pointers are reset thus making the following code void

Fix this by resetting the target pointers which needs to be allocated
with new memory.

Change-Id: I4417492c43eb27833d365ec4aa644e07ed4eca51
CRs-fixed: 2884187
2021-02-24 01:51:45 -08:00