Commit Graph

9194 Commits

Author SHA1 Message Date
Vignesh U
ca60e2f141 qcacmn: Remove radar parameter translation for partial-offload chips
The routine 'dfs_translate_radar_params()' translates the radar found
offsets given by a 160MHz detector which ranges from -80MHz to +80MHz
to that of the offsets given by an 80MHz detector that ranges from
-40MHz to +40Mhz. The same function also translates the segment ID from a
single-detector(160MHz) model to a two-detector model(80Mhz). This routine
is unnecessarily called for partial-offload chipsets which do not support
True 160MHz.

Do not call the function 'dfs_translate_radar_params()' from
'dfs_process_radar_ind()' which is common for both partial-offload and
full-offload. Call it from the full-offload specific radar action
function 'tgt_dfs_process_radar_ind()'.

Change-Id: I2c717219d0b0f9263734767bee6070f335032b04
CRs-Fixed: 2718507
2020-07-29 06:40:04 -07:00
Kiran Kumar Lokere
69bc670b4b qcacmn: Don't run scan aging on non-tx bss of connected AP
Do not age out the scan entries of non-tx bss of connected AP
as the non-tx bss entries are updated based on connected AP
beacon.

Change-Id: Ib7276ff919f4c9a843c018caca1a90fd31168eac
CRs-Fixed: 2714982
2020-07-28 20:18:44 -07:00
Shwetha G K
e18a6dab27 qcacmn: Add service_bitmap to support CFR capture_count & MO marking
Add wmi service_bitmap to support CFR capture_count & MO
marking.

Change-Id: I4e72dd089971dbbfc8391bb8d4eca1400bb94f77
2020-07-28 17:39:09 -07:00
Shwetha G K
4876ce33bf qcacmn: Add support for wmi_ext2 service bitmap
Add support for wmi_ext2 service bitmap

Change-Id: I2c147b91e11c2487027a7af88ff1752c7b48730b
2020-07-28 17:39:06 -07:00
Srinivas Pitla
3731db6e13 qcacmn: add flag in PPDU user to indicate processed
New flag is added in PPDU user, this flag gets updated
on processing the user of a PPDU desc

Change-Id: Ib778b08833392bfd5651a83c2c1131f1d1ce3ea8
CRs-Fixed: 2738431
2020-07-28 11:39:59 -07:00
Rakesh Pillai
19a0a18573 qcacmn: Ratelimit defrag path error logs and add stats
Ratelimit the defrag path error logs and add the stats
for fragmented packets received out-of-order which
inturn leads to sequence number mistamtch in defrag path.

Change-Id: I17d4c1cff214a8c8a05abf576701824b293d2883
CRs-Fixed: 2740805
2020-07-27 15:58:56 -07:00
Karthik Kantamneni
5e49c050f4 qcacmn: Update supported MAC per target for QCA6750
Currently WLAN_CFG_MAC_PER_TARGET value is two which may cause
dp stats request sent to firmware with unsupported pdev mask.

Update WLAN_CFG_MAC_PER_TARGET value to one for QCA6750 target.

CRS-Fixed: 2738910
Change-Id: I14fdf483bf7d18bb2f8302251ac096885547b43b
2020-07-27 09:03:52 -07:00
Wu Gao
80df191a1a qcacmn: Add API to get spectral version
Since struct spectral_samp_msg may be modified, so provide API to get
version information, then spectraltool can compatible with different
host based on version information.

Change-Id: If68dbd0d85b28f46056208d849fe2db4faea493a
CRs-Fixed: 2575818
2020-07-27 09:03:49 -07:00
Rachit Kankane
13b4322e3b qcacmn: Add runtime support for Inter-Band MCC
To handle no-inter-band MCC scenarios for dual MAC non-DBS solutions,
add changes to detect capability at run-time based on service bits.
If the service is set then code for only intra-band MCC will be
exercised.

Change-Id: I402311fcecfd03bba67fedfb2b52f779f60b81ce
CRS-Fixed: 2730374
2020-07-27 04:54:22 -07:00
Bapiraju Alla
1081eb4b63 qcacmn: Enqueue scan request only after scan scheduling is success
Currently, vendor scan request is enqueued in the scan queue first and
then posted into the scheduler queue. Now if there is an SSR in between,
then scan request will be freed twice. Once in SSR context and again
in the caller context because scan scheduling fails due to user disabled
the scan.

To resolve this, post the scan request in scheduler queue first. Once
scan request scheduling is success, then enqueue the scan request in
scan queue. This approach can lead to a race condition like after
scheduling scan request, host may get scan response from firmware even
before the scan request is queued. To avoid this race, scan request
scheduling and enqueue should be protected by scan_req_q_lock.

Change-Id: Ic26da0181fb9a902a8a4abb8f68d9fc668f1b3f2
CRs-Fixed: 2714495
2020-07-27 02:42:36 -07:00
Abhishek Singh
de26e8e65e qcacmn: Add logs while removing/avoiding connect candidate
Enhance logs in candidate score by adding logs while
removing/avoiding connect candidate.

Change-Id: I36a455592ebfa1150fffaaad1ba87438fd3d390f
CRs-Fixed: 2740951
2020-07-27 00:38:18 -07:00
Manoj Ekbote
3d34d90697 qcacmn: Set up user completion struct based on max users
Currently, per-user information in Tx PPDU completion is allocated for
37 users though FW may send information for fewer number of users. In
new scheme, FW provides number of users in USERS_INFO TLV and host can
allocate the per-user struct based on this number. This can save memory
while processing each completion message.

CRs-Fixed: 2730923
Change-Id: If04fd664a1ef6e77e8eb44c5d2bd1fa89fcaba72
2020-07-26 20:24:22 -07:00
Linux Build Service Account
f262df3fb7 Merge "qcacmn: Remove references to CHAN_NUM_API" 2020-07-25 04:37:11 -07:00
Rhythm Patwa
4f9a9d0938 qcacmn: Add tx_flag to Host WMI mgmt frame structure for incorrect key support
Add 'tx_flag' param to wmi_mgmt_params structure for configuration
to use incorrect key for encryption of mgmt frame.

The 'tx_flag' param is primarily added to provide additional
test configuration options for mgmt frames.
Currently it only has support to encode the mgmt frame with
incorrect key for PMF protected connection.

Change-Id: Id894c735c4c612a75506a33938372c3fa2e7f24a
CRs-fixed: 2690147
2020-07-24 15:18:15 -07:00
Yeshwanth Sriram Guntuka
d38ce99939 qcacmn: Add per vdev level fisa aggregation control params
Add per vdev level fisa params to control aggregation
per vdev.

Change-Id: I752fb59439d564595612ee9df697a3b38f514939
CRs-Fixed: 2739410
2020-07-24 15:18:12 -07:00
Shashikala Prabhu
ba0276b572 qcacmn: Correct the return types of functions in HIF component
A few functions in HIF component returns QDF status value with return
type as non QDF STATUS and vice versa. For such functions, update the
correct return type.

Change-Id: I806407dd0596cd03500242d97ca8220a7beb6c55
CRs-Fixed: 2734818
2020-07-24 09:21:17 -07:00
Shashikala Prabhu
cb2acc0ea0 qcacmn: Correct the return types of functions in HIF component
A few functions in HIF component returns QDF status value with return
type as non QDF STATUS and vice versa. For such functions, update the
correct return type.

Change-Id: Ifc1068d60e62f7405a15e2b4f0738d91243bd6de
CRs-Fixed: 2734818
2020-07-24 09:21:14 -07:00
Shashikala Prabhu
a143607a26 qcacmn: Correct the return types of CE functions
A few functions in CE files returns QDF status value with return
type as non QDF STATUS. For such functions, update the return type as
QDF_STATUS.

Change-Id: I401c0a1e1c21ac0865cf4da018eb2d2fb6d86900
CRs-Fixed: 2734818
2020-07-24 09:21:11 -07:00
Shashikala Prabhu
b87eec2b53 qcacmn: Correct the return types of HIF functions
A few functions in HIF component returns QDF status value with return
type as  non QDF STATUS. For such functions, update the return type as
QDF_STATUS.

Change-Id: I69644a2206266ffe2c2d105056f9fec452f5d972
CRs-Fixed: 2734818
2020-07-24 09:21:08 -07:00
Jeevan Kukkalli
30f2d61e6d qcacmn: Handle invalid HW ast index case inside dp_peer_map_ast()
Handle invalid HW ast index case inside function dp_peer_map_ast().
This change aids upcoming feature where status of HMWDS ast add is
reported to upper layer. This change eliminates extra peer ast list
traversal required for the new feature.

Change-Id: Ic6f45fedb53204c52719686aee9a90ae12695d09
CRs-Fixed: 2728611
2020-07-24 07:10:24 -07:00
Chaoli Zhou
81d4965369 qcacmn: Reduce the ce entries while disable pktlog
If disable pktlog for hasting/genoa, we need to
mark the ce5/ce7 not used separately to save
some memory. But currently, if set target ce
entries to 0, it has wlan fw crash issue,
so reduce it from 32 to 2 first. Once wlan
fw fix the crash issue, and then change to 0

Change-Id: I7ab11f202fe353737a4104e71fc79ee749b80fc8
2020-07-24 07:10:21 -07:00
Edayilliam Jayadev
6c76bce586 qcacmn: Modify vendor command handler to accept vdev
The Spectral module uses the first vdev of a pdev for scanning.
For MCL platforms all the vdevs are associated with a single pdev
and this may cause a mismatch between the vdev intended by user and
the vdev used by driver. To avoid this MCL platforms pass a reference
to vdev on which Spectral scan is triggered. WIN platforms
can continue to use the old approach of using the first vdev of a
pdev by passing NULL for vdev to vendor command handlers.

CRS-Fixed: 2725777
Change-Id: I1a7278bdcbcc2b706aa292b33c17546190dac082
2020-07-24 02:01:11 -07:00
Wu Gao
b43c68dedf qcacmn: Gets vdev by id in spectral component
It starts spectral scan without vdev object, and uses the first vdev
as current vdev. which cause vdev mismatch in some platforms. So pass
vdev object or id when finding current vdev.

Change-Id: Iab55afbe2c98906021a008918f186d3d2dce5871
CRS-Fixed: 2716460
2020-07-24 02:01:08 -07:00
Vijay Krishnan
53f1d00e8f qcacmn: Remove references to CHAN_NUM_API
CONFIG_CHAN_NUM_API macro will be disabled. Remove all the references to
any function defined/declared under the macro. The function
reg_get_channel_list_with_power was placed under CHAN_NUM_API by mistake.
This API does not have any CHAN_FREQ_API counterpart. Therefore, move
this function out of CHAN_NUM_API macro.

The function dfs_send_radar_ind_for_freq is redundant as its counterpart
dfs_send_radar_ind has the same arguments and same functionality,
removing the function dfs_send_radar_ind_for_freq. The function
dfs_send_radar_ind is moved out of CHAN_NUM_API macro.

The function wlan_reg_chan_to_freq, wlan_reg_legacy_chan_to_freq is
moved out of CONFIG_CHAN_NUM_API macro. Since it is applicable for legacy
bands.

CRs-Fixed: 2711600
Change-Id: Ib29be638c17ce51f928c865e362ac5b2b8954b42
2020-07-23 21:37:06 -07:00
Kai Chen
ee26d03b10 qcacmn: resolve issue on updating protocol tag
Skip protocol tag updating from msdu end TLV protocol tag meta data
when there is RXDMA REO entrance push error on monitor destination ring.
The attention and msdu end TLV is not updated reliably when there
is RXDMA REO entrance push error such as FCS error on monitor
destination ring.

Change-Id: I4098c01251b4f4cb2e796d450c156ba8f2b9464d
2020-07-23 19:28:48 -07:00
nobelj
ab4338f749 qcacmn: Add support to get device name and tx capture debugfs init
Add support to get device name and invoke debugfs init
on post attach so that device name is updated at that point.

Change-Id: I0e0a06cae4bef4d6e43c0295f5db99220b185df2
2020-07-23 19:28:45 -07:00
Gururaj Pandurangi
0bd8b1bf75 qcacmn: Update reg dmn to support new 5.9 ghz chan
Update reg domain rules to support three new
channels in 5.9 GHz for US.
New channels are 169, 173 and 177 with freq
5845, 5865 and 5885 MHz respectively.
These new channels will be controlled by an
ini fcc_5dot9_ghz_chan_in_master_mode and
a service bit WMI_SERVICE_5_DOT_9GHZ_SUPPORT.
If the service bit is not set we disable the
new channels, and if service bit is set but not
the ini, we make the channels passive. If both
are set, they will be enabled.

Change-Id: I575b02ad387cbda00b015f7075d80c907463bdef
CRs-Fixed: 2683702
2020-07-23 17:24:09 -07:00
Gururaj Pandurangi
b1f6686944 qcacmn: Enable three new 5.9 ghz channels for US
Add new channel bonding pairs as well as frequency
pairs for 40, 80 and 160 MHz with the support of
three new 5.9 GHz channels 169, 173 and 177.
Add new API reg_modify_chan_list_for_5dot9_ghz_channels
to enable/disable these new channels based on
INI value and service bit.

Change-Id: I8598e705ba4047e96e7167661ba70d4236cde251
CRs-Fixed: 2696211
2020-07-23 17:24:06 -07:00
Jinwei Chen
f3bffbfdd2 qcacmn: handle IPA buffer smmu map/unmap correctly
Handle ipa buffer smmu map/unmap with below changes,
(1) Do IPA smmu unmap for RX buffer received from REO
exception/WBM RX release/REO DST/RXDMA DST ring.
(2) Align IPA smmu map length to qdf_nbuf_map_nytes_single()
with fixed length.

Change-Id: I1ed46b31ed31f5b7e4e2484d519bc85d35ce1e69
CRs-Fixed: 2728644
2020-07-23 13:17:09 -07:00
Rakesh Pillai
eec104893e qcacmn: Add stats for stale cookie read from rx ring
Add a count for the number of times we read a stale
cookie value from the REO2SW ring.

Change-Id: I4b20fa93f5261b4ccb9479b7b3469a294703a184
CRs-Fixed: 2736028
2020-07-23 13:17:06 -07:00
Shivani Soni
bf1bffa51d qcacmn: QDF macro for skb shared info size
Introducing QDF macro for getting size of skb shared info considering
alignment

Change-Id: Idb8e714c8de00b640dc7e400a757c71e80ae48e6
CRs-Fixed: 2737178
2020-07-23 07:00:44 -07:00
Mainak Sen
33d438516f qcacmn: Update hal api for IPQ5018 SG support
HAL spi addition for SG support on IPQ5018

Change-Id: I76179f41cbbf80504ee2e88156783a86bd07e8fe
2020-07-23 04:46:13 -07:00
Manoj Ekbote
181194b1ea qcacmn: Check period while getting CFR capture status
When a one-shot capture is triggered with CFR, the state is not
reset to DISABLED after capture has completed. This affects HW mode
switch behavior because if CFR capture is ongoing (ENABLED), mode
switch is not allowed. This change checks for period to return DISABLED
or ENABLED. Period is 0 in case of one-shot capture.

Change-Id: Iae8727959a1becd3b5f4da166e868c1592910b84
CRs-Fixed: 2735166
2020-07-23 01:57:46 -07:00
gaurank kathpalia
441725b6ef qcacmn: Restructure connection manager structures
Move few scoring params to uint8 from uint32 to save memory.
Also move the req and resp related IE to req and resp structures
instead of global structure.

Change-Id: I67f8dd3f381642083fc5f288ebd9055d2919faad
CRs-Fixed: 2737146
2020-07-22 21:35:20 -07:00
Abhishek Singh
0d404e731b qcacmn: Remove older scan filter params
Remove older unused scan filter params and code related to it.

Change-Id: I13293e047397efb2b857001391e1fc925e034532
CRs-Fixed: 2737908
2020-07-22 21:35:16 -07:00
Jeevan Kukkalli
659ecbabda qcacmn: Return appropriate QDF error codes
Modify functions dp_peer_add_ast(),dp_peer_map_ast() and
dp_rx_peer_map_handler() to return appropriate QDF error codes.

Change-Id: I582a5e68219fe25df5f46ae6044afa3bed880d2c
CRs-Fixed: 2728559
2020-07-22 11:55:41 -07:00
Yeshwanth Sriram Guntuka
01c7242aca qcacmn: Update tx completion cb prototype to pass tx status
Update tx completion callback prototype to pass tx
status also as argument.

Change-Id: I33413a0943ec8050d6c8ae6b2ef3592d593cb063
CRs-Fixed: 2682028
2020-07-22 11:55:38 -07:00
Muthuchamy Kumar
394948ac33 qcacmn: Added new API to get the NSS from the scan entry
NSS from scan entry is required to calculate the link rate.

Change-Id: If0e4bf2499239abe14dc21154f20687a8d4dd87c
2020-07-22 07:45:26 -07:00
Paul Zhang
77c4c9ff7e qcacmn: parse the 20MHz PSD in TBTT info of RNR
In the TBTT info of RNR, one byte is added for power
spectral density. Add logic to get the PSD limit.

Change-Id: I7ce44a762c47d0d0526157fcb41a80ad3ef3c08e
CRs-Fixed: 2731433
2020-07-22 07:45:22 -07:00
Shwetha G K
a87d0fe709 qcacmn: freeze_tlv changes due to 37 UL-MU users in Pine
Add freeze_tlv changes due to 37 UL-MU users in Pine

Change-Id: Ibe794b83e7d8722b5ea8709fa23d33fb823bd992
2020-07-22 07:45:19 -07:00
Yeshwanth Sriram Guntuka
8007762d6a qcacmn: Set invalid bit in cookie for exception ring descriptor
On returning the msdu link descriptor to HW via WBM
release ring, the rx exception ring contents are not
zeroed. This could result in host reading stale ring
descriptor content in the scenario when HP is updated
even before the latest values are reflected in the ring
descriptor.

Fix is to set invalid bit in cookie for exception ring
descriptor and add cookie sanity check.

Change-Id: I01a294c92b260ebe8e584ef20e9550b1febec913
CRs-Fixed: 2730759
2020-07-22 03:21:44 -07:00
Rathees kumar Chinannan
199049f281 qcacmn: Add new param on peer assoc command
Add new param on peer assoc command to pass sta
type for bsscolor.

Change-Id: I83f78c07f9079b23629c2f7f42d67ae9630c2d6c
CRs-fixed: 2727001
2020-07-22 03:21:40 -07:00
Hariharan Basuthkar
ed5856be03 qcacmn: Modify hal_rx_radiotap_num_to_freq for 6G frequencies
When an AP operates on a 6G channel. The channel frequency in the
radiotap header, in the beacon frame, shows an incorrect 6G frequency.

This is because, the function hal_rx_radiotap_num_to_freq is not updated
to handle the 6G channelization spec update ( IEEE 802.11 11AX Draft 6.1).

To fix this issue, update the function hal_rx_radiotap_num_to_freq to
handle the 6G channelization spec update (increase the 6G frequencies by
an offset of 10MHz).

Change-Id: I342dcb46b2627b3a2c3f12524077e63d811a5feb
CRs-Fixed: 2733367
2020-07-22 03:21:36 -07:00
Wu Gao
5a754eb0c4 qcacmn: Enable spectral scan gen3 for QCA6490
Enble host sopport of spectral scan gen3 for QCA6490 target.

Change-Id: Ic99520bb6db94a0f41c2cd4c94b77e9795617f4c
CRs-Fixed: 2716598
2020-07-20 21:54:21 -07:00
Shwetha G K
5ebf659ba8 qcacmn: Enhanced CFR code cleanup
Enhanced CFR code cleanup

Change-Id: Ie27a0523c8216fc12f24ba6c707ce45cc61fb5c8
2020-07-20 19:26:40 -07:00
Jinwei Chen
50e10cff51 qcacmn: Remove hash key related member in hal_rx_fst
For MCC, hash key related member in struct hal_rx_fst is not used,
it requires big chunk memory > 40K bytes that sometimes may fail to
allocate from system, wlan start up failed.
Remove hash key related member in hal_rx_fst by macro
WLAN_SUPPORT_RX_FISA for MCC.

Change-Id: I4214e18155c3ebc3dcc800c8c74f7eed16d580b4
CRs-Fixed: 2732990
2020-07-20 17:15:45 -07:00
Hariharan Basuthkar
ae92ea605f qcacmn: Fix KW issue in the regulatory component
In  I3c82e2eb98cdaf0ff8754bd990529a1833276304, KW error is reported in
the function, reg_compute_chan_to_freq.

This is because min_chan_range and max_chan_range can be assigned values,
that can cause array out of bounds issue.

To fix the issue, add explicit range checks against min_chan_range and
max_chang_range before iterating through master_chan_list to
avoid out of bound access.

Change-Id: Id5cd032fb899475720080b29012a6de1b5d4a916
CRs-Fixed: 2727082
2020-07-20 04:47:04 -07:00
Jinwei Chen
87d4f73245 qcacmn: Handle raw frames and invalid flow_idx stats
Make sure to drop the raw Rx frames as both driver and stack
are not expected to handle them.
Add counter for invalid fisa flow_idx packet received.

Change-Id: I5107c554b8ce6a9a7973f2aeca44bb0f360dc2df
CRs-Fixed: 2733981
2020-07-20 04:47:00 -07:00
Srinivas Dasari
b6130d4eb6 qcacmn: Process NAN events even when nan_disable_support is present
Currently, host driver processes NAN events only if
wmi_service_nan_dbs_support is advertised by the firmware. But NAN
concurrency is handled in host in non-DBS platforms also when
wmi_service_nan_disable_support is advertised by the firmware.
So, process the events if any of these two are capabilities
are present.

Change-Id: Ib571ef69ea177ddd758f800448939122126339b8
CRs-Fixed: 2735465
2020-07-20 04:46:55 -07:00
Rakesh Pillai
28f1bf3f4e qcacmn: Invalidate ring desc cookie after processing
Currently all the rx ring descriptor contents are left
intact even after these entries are processed. This can,
at times, lead to stale entries being processed, if the
head pointer of any ring is updated before the updated
contents of the ring descriptor gets reflected in the memory.

This can lead to scenarios where the host driver reads a
stale value of sw_cookie, and free/unmap a currently in-use
buffer, thereby leading to the hardware accessing unmapped
memory region.

The sw_cookie is the integral part of al the rx ring
processing. Hence we always mark the sw_cookie as invalid
after dequeuing an entry from the REO2SW ring. Every time
we check for the validity of the sw_cookie before we try to
process an entry from REO2SW ring. if the invalid bit in the
sw_cookie is set, we just skip this entry and move on to the
next entry in the ring.

Change-Id: I0e78fa662b8ba33e64687a4dee4d1a5875ddb4bf
CRs-Fixed: 2730718
2020-07-18 00:00:04 -07:00