Commit Graph

13521 Commits

Author SHA1 Message Date
Vijay Patil
e5748271d3 qcacmn: Add extract_auth_offload_event to wmi_ops
Add extract_auth_offload_event to wmi_ops to allow cld driver to
register the corresponding callback.

Change-Id: Ie3417f44360021570ce678ce1c3f949a92424494
CRs-Fixed: 3010510
2021-08-28 00:29:33 -07:00
Utkarsh Bhatnagar
b7ab2f5cd7 qcacmn: Add support for Thermal Stats Events
Add support for extracting Thermal Stats Events
from thermal event TLV for FW event
WMI_THERM_THROT_STATS_EVENTID.

Also, added support for FW Cmd to request for
Thermal Stats: WMI_REQUEST_THERMAL_STATS_CMDID

Change-Id: I2bc80d082bda45e2255371bcb0c31d35d9806525
CRs-Fixed: 3016845
2021-08-27 10:23:50 -07:00
Abhijit Pradhan
bd02b05aa5 qcacmn: Move repetitive function bodies into a single function
The body of the two following functions:
1)reg_get_num_sp_freq_ranges,
2)reg_cp_freq_ranges
have much in common.

Move the common part into a single function in order to optimize code size.

Change-Id: Ice9e925ef0e64baa41f867a92a3c3d2902374d74
CRs-Fixed: 3019338
2021-08-27 08:08:53 -07:00
Abhijit Pradhan
575da29354 qcacmn: Find the frequency ranges for AFC request
The regulatory rules contain the frequency ranges that are supported
by the current regulatory domain. Also every radio has a chip range
which indicates the range of frequencies supported by the radio. To
find the list of frequencies for the AFC request, add each regulatory
frequency range that are within the chip range to the AFC list of
frequency ranges. If a regulatory range has a partial overlap with the
chip range add only the overlapping part of the range to the AFC list
of frequency ranges.

Change-Id: Ida3e2217783db82fef2825c6a6603e79ef65951b
CRs-Fixed: 3019336
2021-08-27 08:08:48 -07:00
Shashikala Prabhu
d4c52fb8ef qcacmn: Remove the 'multi_link is null' error print
"scan_entry->ie_list.multi_link is null" print is
flooding the scan component. Hence, remove this print.

Change-Id: I921eea8afc2dba5637c7c02717e2d1fb544ba103
CRs-Fixed: 3023813
2021-08-27 08:08:43 -07:00
Hariharan Basuthkar
0b8e97ac32 qcacmn: Add dispatcher APIs for AFC in the regulatory
1) Add an ucfg dispatcher for reg_afc_start.
2) Add an API wlan_reg_get_afc_req_id, to fetch AFC request id.
3) Add an API wlan_reg_is_afc_expiry_event_received, to check if the AFC
   expiry event is received from the target.

Change-Id: I45841706c500e74632b60546d945cde4d634a5d2
CRs-Fixed: 3011675
2021-08-27 05:44:45 -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
Will Huang
64d063094f qcacmn: Change beacon drop log to rate limit log
Although beacon drop info is important, but if continually print with
info level it will flood serial log and lead to low performance.
Security mode check is mandatory in 6Ghz band, so it is by default
enabled, so possible to see many beacon drop log because of this check.

Change beacon drop log to rate limit and fix one potential memory
leak in __scm_handle_bcn_probe().

Change-Id: Ic9032b99504d6ff41256d547e2d8fad101301589
CRs-Fixed: 3014786
2021-08-27 01:06:19 -07:00
Liangwei Dong
71ba53089e qcacmn: Add API wlan_reg_get_next_lower_bandwidth
Export regulatory API wlan_reg_get_next_lower_bandwidth to
get next lower bandwidth of given channel bandwidth.

Change-Id: Id86d83c1bf738061d325b23d3f46b77d45eaeca5
CRs-Fixed: 3021976
2021-08-26 20:56:17 -07:00
Hariharan Basuthkar
21ee351e31 qcacmn: Extract AFC event in WMI layer
Extract the parameters of the WMI_AFC_EVENTID in WMI.

Change-Id: I086f095beb0961dfd7d3813c68e2caedf65a596d
CRs-Fixed: 3023089
2021-08-26 15:48:12 -07:00
Basamma Yakkanahalli
4597a3b4ad qcacmn: Increase WMI_BEACON_TX_BUFFER_SIZE to support 2.3k 20TU prb res
Redefine WMI_BEACON_TX_BUFFER_SIZE for WIN AP as 2500 bytes to support
2.3k 20 TU probe response.

Change-Id: Ia3414b9e49dfbe3839c7b993da74de8d963c24a4
2021-08-26 12:58:36 -07:00
Lincoln Tran
ce48d77998 qcacmn: Add debug MLO changes
-Add debug logs to MLO manager code.
-Add ml_dev validation checks for ML peer operations.
-Add pointer checks to avoid NULL pointer dereference

Change-Id: I8e9ddf177a999a43e8612f8c6acedd08ffce63d5
CRs-fixed: 2998964
2021-08-25 19:45:02 -07:00
Himanshu Batra
df25501b83 qcacmn: Fill ML info while getting active connect/disconnect request
Fill ML info while getting active connect/disconnect request

Change-Id: Ifdbfacab64bfcc144ac3f2afb68854f2108e729d
CRs-Fixed: 3022005
2021-08-25 13:07:19 -07:00
Shiva Sankar Gajula
d3b7b11795 qcacmn: Reset mgmt ciphers and key mgmt to 0 by default
The 11r roaming is not happening when PMF disabled STA is trying to
roam from PMF disabled AP to PMF optinally configured(ieee80211w=1)
AP which is due to candidate_list is not found because of mgmt
ciphers mismatch (the PMF disabled mgmt cipher is None(1<<17) and PMF
optional AP's mgmt cipher is CMAC(1<<6)) happening while comparing
security params and is due to mgmt cipher value is reset to None(17)
after STA connected to AP.

So, Added changes to reset the mgmt cipher value to zero. Also, added
changes to reset the keymgmt to 0 instead of None since this is
missing in earlier implementation.

Change-Id: I9f24a215011b4984937e98225bcb3975bc3f685f
2021-08-25 07:25:20 -07:00
Karthik Kantamneni
8c0efa6281 qcacmn: Send force wake release if force wake request times out
Even though force wake request timed out there is possibility of
wake request got stuck and handled later at qmi level this leads
to leaving device in wake state for long time unnecessarily.

To avoid this send force wake release when wake request times out.

Change-Id: Ic0e1b3d3fe9d4b0e0f0d4b9be5804ef4f1d3e724
CRs-Fixed: 3019575
2021-08-25 05:07:14 -07:00
Sai Pavan Akhil Remella
5adde265e2 qcacmn: Add extract_roam_stats_event to wmi_ops
Add extract_roam_stats_event to wmi_ops to allow cld driver to register
the corresponding callback.

Change-Id: I77ebb05a1a2ce9fa0b2f2f2ffb50c523ab9070e6
CRs-Fixed: 3007690
2021-08-24 13:12:53 -07:00
chunquan
14d9d6d697 qcacmn: Support configure IPA tx alt ring and tx ring separately
Add support configure ipa tx ring and tx completion ring for
2.4G and/or 5G separately.

Change-Id: Iafb8fa589ff0cce15609a3dfa2209364291d7cef
CRs-Fixed: 2996604
2021-08-24 11:02:09 -07:00
nobelj
050c08476e qcacmn: Add support to capture delayed ba in SU
add support for delayed block ack for SU frame type

Change-Id: Ia99aebcd84a2ccd3d4139b3ada0a68e010e093c9
2021-08-23 19:09:25 -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
Liangwei Dong
116aba71e2 qcacmn: Fix DFS_RANDOM_CH_FLAG_NO_DFS_CH not working
When DFS_RANDOM_CH_FLAG_NO_DFS_CH set, the random channel
selection will pick non-dfs channel. But currently the
MCL API utils_dfs_get_channel_list doesn't populate
the DFS flags "WLAN_CHAN_DFS" for dfs channel.
That causes the dfs_prepare_random_channel_for_freq API
can't identify DFS channel.
Fix by set WLAN_CHAN_DFS for dfs channel

Change-Id: I7ead760ddc77c198a630d12960e775961840796c
CRs-Fixed: 3016746
2021-08-23 19:09:17 -07:00
Ananya Gupta
13bc719612 qcacmn: Fix QDF status for no phy level ack
Use QDF_TX_RX_STATUS_NO_ACK when phy level ack is not
received for packet.

Change-Id: Ic518dd0a9caee7197e9f11cb8b85773f4622fe36
CRs-Fixed: 3018626
2021-08-23 19:09:12 -07:00
Aakanksha Doda
52595dc304 qcacmn: Add changes to extract halphy_cal_status from FW
Add changes to get halphy_cal_status properly from FW
defined variables to host.

Change-Id: I891420e0d021702553c69569d71db394e897067e
2021-08-23 15:44:10 -07:00
Vignesh Mohan
10ca017ae0 qcacmn: Check if pdev only supports 6G for DFS check
While checking if the pdev is 5G for DFS APIs, only 11A mode
support is checked which is also present for 6G radios which do not
have DFS. Check if the radio is only 6G in addition to the 11A check,
and if it's only 6G supported, return false.

Change-Id: I80008de610a93eeac326da36da43a747bafad2d9
2021-08-23 13:26:40 -07:00
Edayilliam Jayadev
9ccbe5a0fb qcacmn: Add API to get address of mgmt Rx REO snapshots
Add APIs to get address of management rx-reordering snapshots.

CRs-Fixed: 2963485
Change-Id: Idfe13425ad5f95f1a3d92edfc2d6d41aded5aec9
2021-08-23 13:26:36 -07:00
aloksing
00832d6f5b qcacmn: fix mvdev NULL issue
set mvdev to null only if mvdev is pointing to vdev
for which monitor vdev detach is called.

Change-Id: I5c82db4e8ea192636a8c322c36f55a5574f9dcee
CRs-Fixed: 3015003
2021-08-23 13:26:31 -07:00
Vivek
a32acb5027 qcacmn: Send connect/disconnect response for flushed connect/disconnect
Send connect/disconnect response for flushed connect/disconnect

Change-Id: I23df9c249bdcba0530dcee33c2a09534869815b0
CRs-Fixed: 3008838
2021-08-23 00:18:24 -07:00
Hariharan Basuthkar
d2ef66d69a qcacmn: Get AFC mas_chan_list and check if AFC power event is received
Add an API wlan_reg_is_afc_power_event_received, to check if AFC power
event is received.

Add an API wlan_reg_get_6g_afc_mas_chan_list. to get the AFC master
channel list.

Export wlan_reg_get_6g_afc_chan_list so that it can be used by
APIs outside the UMAC module.

Change-Id: I09338a41f38e4db03f00ef2c15e9a0b7805f649e
CRs-Fixed: 2991293
2021-08-21 17:28:20 -07:00
Shiva Krishna Pittala
93c0702c78 qcacmn: Add support for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames.
Add target_if and tgt layer support for the same command.

Change-Id: I5daaf4d095774d751d98a27fd77dec9daaa6b16a
CRs-Fixed: 2960488
2021-08-21 15:17:33 -07:00
abhinav kumar
86812026a0 qcacmn: Possible Integer overflow in wifi_pos_oem_rsp_handler
API "target_if_wifi_pos_oem_rsp_ev_handler" is the handler for
the event with WMI_OEM_RESPONSE_EVENTID. Host receives
"rsp->dma_len" from fw. The integer overflow occurs if
"oem_rsp->dma_len" is big enough while calculating the total
length of the Oem Data response buffer.

Fix is to add a sanity check for rsp->dma_len to avoid integer
overflow.

Change-Id: Idfbd358f62534eae0147f03505ced5728877a269
CRs-Fixed: 3001191
2021-08-21 15:17:29 -07:00
Shiva Krishna Pittala
57543be336 qcacmn: Add WMI layer functionality for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames. Add WMI layer support for the
same command.

Change-Id: If1498fd4fbccd86e7d54d9eac268868b36523d06
CRs-Fixed: 2960472
2021-08-21 13:06:51 -07:00
Shiva Krishna Pittala
361f45dd82 qcacmn: Add APIs to extract MGMT Rx REO params tlv
When MGMT Rx REO feature is enabled, FW will be sending MGMT Rx REO
parameters TLV as part of WMI_MGMT_RX_EVENTID for the frames that require
reordering. Add APIs to extract the same.

Change-Id: I57b132927cf413384d680b5778bfe6a2e2737adf
CRs-Fixed: 2960471
2021-08-21 13:06:43 -07:00
aloksing
a4d289451e qcacmn: Fix pktlog compilation error
Fix compilation error when pktlog feature is disabled

Change-Id: I2bf51c8a994e5b01ba83c21e5b5b4d1f02c10615
2021-08-21 09:58:04 -07:00
Rhythm Patwa
c3aaef41d8 qcacmn: Export symbol for use in offload module
Export ucfg_reg_register_afc_req_rx_callback symbol for use
in offload module.

Change-Id: I6cd2e479aadb1c4d50b7341ea361b1fee20a1ba8
2021-08-21 02:07:48 -07:00
Aditya Kodukula
e668136ffc qcacmn: Support Multicast Domain Name Server Offload
The purpose of the multicast Domain Name System (mDNS) is to resolve
host names to IP addresses within small networks that do not include
a local name server.

It utilizes essentially the same programming interfaces, packet formats
and operating semantics as the unicast DNS, and the advantage is zero
configuration service while no need for central or global server.
Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover
a named list of services by type in a specified domain using standard
DNS queries.

Here, we provide the ability to advertise the available services by
responding to mDNS queries.

Change-Id: Ie6a3cd319d219c2f338d83f4bdbd704a090711c4
CRs-Fixed: 3008552
2021-08-20 22:02:19 -07:00
Gururaj Pandurangi
5c4ead3c06 qcacmn: Fix byte alignment in struct dfs_nolelem
Fix byte alignment in struct dfs_nolelem by removing
structure packing (qdf_packed).

Change-Id: I83ca71fe019a2482283655b1b8837844a8afb007
CRs-Fixed: 3017791
2021-08-20 19:38:12 -07:00
Hariharan Basuthkar
ea19d1eaca qcacmn: Create afc regulatory structure and variables
Create a new struct afc_regulatory_info to store the parameters
received in the WMI_AFC_EVENTID.

Also add the following members to the wlan_regulatory_pdev_priv_obj:

1) bool is_6g_afc_power_event_received
2) bool is_6g_afc_expiry_event_received
3) struct regulatory_channel afc_chan_list[NUM_6GHZ_CHANNELS]
4) struct regulatory_channel mas_chan_list_6g_afc[NUM_6GHZ_CHANNELS]

Change-Id: I27ae8545e28bc2ca1c7004d2d2adcc539dc9a8f9
CRs-Fixed: 3017210
2021-08-20 17:30:49 -07:00
Shiva Krishna Pittala
593e206028 qcacmn: Add target_if layer functionality for FW consumed event handling
Add register and unregister handlers to MGMT Rx FW consumed event handlers.
Add target if layer handlers for the event.

Change-Id: I3b70f86811c562a3be75353585dc1f6cf43c02ac
CRs-Fixed: 2959925
2021-08-20 15:13:17 -07:00
Shiva Krishna Pittala
a52614b732 qcacmn: Add WMI layer functionality for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add WMI layer functionality for this event handling.

Change-Id: Id95f41a717b88589e861781e1111b17dc90475be
CRs-Fixed: 2959118
2021-08-20 12:57:21 -07:00
Shiva Krishna Pittala
047ac89481 qcacmn: Revert "qcacmn: Spectral init path changes for QCN9224"
As part of Spectral init, the Host sends DMA ring init command to
HALPHY. QCN9224 M2M emulation setups don't have HALPHY subsystem and
the WMI command need to be cleanly stubbed out in emulation FW image.
Until then, revert this Spectral init change.

Change-Id: I88e3e3995ee1b7103a03e4b6a38ff4117044c63c
CRs-Fixed: 3016633
2021-08-20 04:59:14 -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
abhinav kumar
0df0ae40b0 qcacmn: Possible OOB read in process_fw_diag_event_data
API "fw_diag_data_event_handler" is the handler of an event
WMI_DIAG_DATA_CONTAINER_EVENTID comes from FW. Arguments of
this handler function come from FW.

If num_data may be less than size of(struct wlan_diag_data),
possible OOB while extracting event data.

Fix is to add a sanity check for num_data to avoid the OOB
read.

Change-Id: Ia2eb62dbaa154936bdb4ea34065657d441f12810
CRs-Fixed: 3001178
2021-08-19 22:17:46 -07:00
Surya Prakash Sivaraj
1f8ca56f1a qcacmn: Validate the buffer length in rx mgmt handler
In the WMI_MGMT_RX_EVENTID event handling, add a length
check to validate if the buffer length sent by the firmware
is less than or equal to the actual buffer length.

Change-Id: I7db9af48bc525543b972dcaf40aee0a05d8f5023
CRs-Fixed: 3001331
2021-08-19 19:51:40 -07:00
Surya Prakash Sivaraj
39f2f9dcfa qcacmn: Validate the buffer length in fips event handler
In the WMI_PDEV_FIPS_EVENTID event handling, add a length
check to validate if the buffer length sent by the firmware
in fixed params is less than or equal to the actual buffer
length before processing the data.

Change-Id: I7a952d3e3a2f66060451263b72118a52aa89dd06
CRs-Fixed: 3009887
2021-08-19 17:34:24 -07:00
Rhythm Patwa
07fc0519ee qcacmn: Add support for AFC response structures
Add AFC response structures to send over AFC response
data over to target.

Change-Id: I80530b56b94acc43b35b414c10d6783cd8dcdd92
2021-08-19 15:22:02 -07:00
abhinav kumar
a368b81e70 qcacmn: From connection manager filter only ESS type of AP
ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
2021-08-19 11:30:39 -07:00
Krishna Rao
9503c2a865 qcacmn: Rectify format specifier for qdf_size_t in MLO utility
Resolve compilation error seen on some platforms by rectifying print
format specifier for qdf_size_t to "zu" in MLO utility functions.

Change-Id: I68b0696fea1c54578631e731a3cc48ec0eb84c97
CRs-Fixed: 3017056
2021-08-19 07:07:09 -07:00
Mohit Khanna
af4c03b546 qcacmn: Reserve a TX bank for FW usage
FW has some usecases when it needs to enqueue frames into hardware. In
BE WLAN chips, some hardware TX desc fields are moved into Tx
banks, hence a TX bank is also needed to queue to HW.

Dedicate a bank for FW usage.

Change-Id: I1f19f0ef85aff4c7592b0f07de4631259da743a6
CRs-Fixed: 3016828
2021-08-19 07:07:04 -07:00
Shiva Krishna Pittala
fa7d919cbc qcacmn: Drop gen2 spectral samples after spectral scan is stopped
The host can receive some spectral samples even after stopping the scan
as there could be some samples already sitting in the WMI event pipe.
Drop those frames in the driver itself.

CRs-Fixed: 3014336
Change-Id: I8aece67b46aa84e974b538f40ffcb937c855f5a3
2021-08-19 04:59:56 -07:00
Shiva Krishna Pittala
3bde57d8de qcacmn: Add rx_ops and TGT layer APIs for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add rx_ops and TGT layer functions for this event handling.

Change-Id: I50a4b02063bc545d6976944cf331982dc3e853d0
CRs-Fixed: 2959082
2021-08-19 04:59:51 -07:00
Edayilliam Jayadev
ff18a53051 qcacmn: Add API to read mgmt Rx REO snapshots
Add APIs to read management rx-reordering snapshots.

CRs-Fixed: 2955865
Change-Id: I1f36705607b0bae92d422d85223f825ed0b96ef9
2021-08-19 04:59:46 -07:00