Commit gráf

8872 Commit-ok

Szerző SHA1 Üzenet Dátum
Priyadarshnee S
78bb108d7c qcacmn: Add a dispatcher API to determine if RCAC is supported
Add a dispatcher API ucfg_dfs_is_agile_rcac_enabled() to determine
if RCAC is supported for the given pdev.
Change the prototype of dfs_get_rcac_enable() to store rcac
config in a bool datatype.
Also, do a structure copy of ch_params of RCAC channel in
utils_dfs_get_rcac_channel().

CRs-Fixed: 2679975
Change-Id: I4b033463fc8111144bfffd3bb7e7d2bef6568c46
2020-05-08 09:07:13 -07:00
Gyanranjan Hazarika
edab7cf824 qcacmn: Define WMI_BEACON_TX_BUFFER_SIZE distinctly for WIN AP
The current value of WMI_BEACON_TX_BUFFER_SIZE imposes a limita-
tion on the size of the probe-response template that host can
send to target. This limit is good for offloading probe response
to target in case of soft-ap

WIN AP requires to support up to 16 VAPs in a single WIFI radio.
Also, 20TU probe response requirement for 6Ghz AP now requires
WIN AP to offload probe response

The current limit of 500 bytes is sufficient for soft-ap but does
not fulfill 16 6Ghz WIN AP requirement

Define WMI_BEACON_TX_BUFFER_SIZE for WIN AP as 1500 bytes

CRs-fixed: 2681235
Change-Id: I6251ee049451aa0c4a0482d772842a4f688b2f89
2020-05-08 07:33:47 -07:00
Adwait Nayak
270771642b qcacmn: CFR: Rectify the maximum capture length
In some scenarios, where cfr data is being captured
for maximum supported bandwidth case, memory allocated
in case of streamfs for all 255 buffers is not enough.

Corrections are made for maximum capture length.
Maximum capture length for a single CFR capture should be
(max bandwidth case) 16240B (112 bytes(csi header)
 + 64 bytes(cfr header) + 16064 bytes(cfr payload))

Remove debug logs under spin lock

Change-Id: I7cdc25350f3d85ecb7d0d69431c3c66dbc9b2bed
CRs-Fixed: 2678750
2020-05-07 13:03:50 -07:00
Amir
d2e553e973 qcacmn: Add debug statistics for monitor mode
qcacmn: Add debug statistics for monitor mode

Change-Id: I3fe59af1c7f561bd22f502eb5b19265ecd49ee69
CRs-Fixed: 2677656
2020-05-07 08:44:20 -07:00
Wu Gao
787adae107 qcacmn: Avoid to memory access out of bounds
It uses point to 16 bits variable as 32 bits pointer when setting ta
ra configurations to default. This causes memory access out of
bounds.

Change-Id: Ifa7adb0249cb23fdf71e53f04b92b62c1b215632
CRs-Fixed: 2677422
2020-05-07 06:35:24 -07:00
Alok Kumar
e341157506 qcacmn: Avoid NULL pointer dereference of pdev
Suspicious dereference of pointer 'pdev' by passing argument
to function 'dp_find_peer_by_addr' in dp_register_peer.

Add NULL check before dereference of pointer 'pdev'.

Change-Id: Ibe2db784287ff1557aec983829781378578016c0
CRs-Fixed: 2668253
2020-05-07 03:44:50 -07:00
Shiva Krishna Pittala
2d6af44647 qcacmn: Add WMI support to configure SRG BSS color and BSSID bitmaps
To be able to configure SRG BSS Color Bitmap and SRG Partial BSSID Bitmaps,
add the required WMI support.

CRs-Fixed: 2665817
Change-Id: I141abe24dd34cab92f45b230b385500902d01416
2020-05-07 01:55:20 -07:00
Balamurugan Mahalingam
049211d0b2 qcacmn: reset tag_crash_inject in wmi_handle during recovery
The stale value of this field blocks driver from sending
FW_HANG wmi messages to target after recovery

Change-Id: Ib44388c5c95c2574c96117b77fdabda26f5890bd
2020-05-07 00:06:58 -07:00
nobelj
d5cee84d47 qcacmn: fix qdf trace print during ppdu stats log
fix qdf trace print during ppdu stats log

Change-Id: Ibe91f597498324e49d0e6b335d3d8edb7dcdb828
2020-05-06 12:27:47 -07:00
Wu Gao
355b2b49bd qcacmn: Use %pK uppercase K instead of k in format specifier
Usage of %p instead of %pK can lead to info leak, so use %pK uppercase
K instead of k.

Change-Id: Ie4f51e053ed28045b9920f274baebef0233f070e
CRs-Fixed: 2677374
2020-05-06 10:48:03 -07:00
Edayilliam Jayadev
6392e1b119 qcacmn: Add null pointer check
Add a null pointer check after allocating memory for storing the
FFT bins.

CRs-Fixed: 2673564
Change-Id: I1c55256a1bed921b2272e01a014808b4396bf193
2020-05-06 08:43:53 -07:00
Uraj Sasan
0608b9dfbe qcacmn: Add cache invalidation for ARM platforms
Add cache invalidation api for ARM platforms.
The API is not supported, for non-ARM platforms.

Change-Id: Iec7d4878a0fcd0f1ae8257cfd9cc0865ad5825c2
2020-05-06 03:10:28 -07:00
Basamma Yakkanahalli
b8396604b4 qcacmn: Reduce number of CE to 6 for IPQ5018
Reduce the number of CEs used in IPQ5018 to 6 since it has only
one mac and requires only 6 CEs. CE7 and CE8 are reserved for FW
and not needed to be configured from host.

Change-Id: Ibe262c32d8b3234873391559d939bc198c658c60
2020-05-06 03:10:23 -07:00
Gyanranjan Hazarika
333ee0fc2b qcacmn: Add UMAC changes for EMA AP
Enhanced Multi-BSSID Advertisement is an enhancement to the
existing Multi-BSSID feature in terms of advertising
non-transmitted bssid profile using the transmitted bssid
beacon. Mandatory inclusion of RNR IE in lower-band AP
beacon to support Out-of-Band Advertisement of colocated
6Ghz AP may impose limitation in the beacon size. EMA AP
provides a standardized way of overcoming such a limitation

Relevant UMAC changes are:
1. Add fw_caps_ext support bit WLAN_SOC_CEXT_EMA_AP
2. Add vdev_control_flag WLAN_VDEV_MLME_FLAGS_EMA_MODE
3. Support of 32-bit ema_params in beacon_tmpl_params.
The 4 octets in this param field will respectively
indicate ema_beacon_profile_periodicity, ema_beacon_tmpl_idx,
ema_first_tmpl and ema_last_tmpl in the order of low to high

CRs-fixed: 2677701
Change-Id: I3d96fd3becd7609abb2529f977362bfa5401d600
2020-05-06 03:10:19 -07:00
Gyanranjan Hazarika
bf7b89c52b qcacmn: Add WMI changes for EMA AP
Enhanced Multi-BSSID Advertisement is an enhancement to the
existing Multi-BSSID feature in terms of advertising
non-transmitted bssid profile using the transmitted bssid
beacon. Mandatory inclusion of RNR IE in lower-band AP
beacon to support Out-of-Band Advertisement of colocated
6Ghz AP may impose limitation in the beacon size. EMA AP
provides a standardized way of overcoming such a limitation

Relevant WMI changes are:
1. Support of EMA AP service bit in wmi_service_ready_ext
2. Support of 32-bit ema_params in wmi_bcn_tmpl_cmd_fixed_param
to signal ema_beacon_profile_periodicity, ema_beacon_tmpl_idx,
ema_first_tmpl and ema_last_tmpl to firmware while sending the
beacon template
3. Support of 32-bit WMI resource-config params in INIT cmd
to signal number of max transmitting BSSs and max profile
periodicity

CRs-fixed: 2677701
Change-Id: I6c7b146b5071ad0a1c45fc3ec6fd03ed5dbe8020
2020-05-06 03:10:14 -07:00
Hariharan Basuthkar
794de3dacb qcacmn: Find if a range has only 6Ghz channels
The range given/provided by the FW (low_5g, hi_5g), may contain both
5Ghz IEEE channels and 6Ghz IEEE channels.

Add an API wlan_reg_is_range_only6g to check if the input low and
high channel frequencies are only in the 6Ghz frequency range, and also,
place the API changes under a macro CONFIG_6G_FREQ_OVERLAP. First find
out if 5Ghz and/or 6Ghz range are available. Then, by applying the
method of exclusion find out if the range provided by the FW is only a
6G range.

Change-Id: I29675a6520a27257f3d1c7424b7f0c94797244cc
CRs-Fixed: 2676307
2020-05-06 03:10:10 -07:00
Yue Ma
41890f9647 qcacmn: Refine runtime PM usage count checking logic
Commit c81a71e488 ("qcacmn: Cleanup and refine runtime PM open/close
logic") addes the change to align default usage count for both runtime
PM enabled and disabled cases. So active usage count for runtime PM
enable case is 0 and for disabled case is 2. Refine the usage count
checking logic based on that change.

Change-Id: I4e78089760a28d10e6b37bb1a7b2d5242de6c111
CRs-fixed: 2676761
2020-05-06 01:26:48 -07:00
Ruben Columbus
1bda6dc94f qcacmn: setting phy_mode to preambles value
if peer delayed ba is true then value of preamble will be eventually
overwritten by previous frame (HE) and would give wrong values when
shown in pcap for radiotap fields. phy_mode is set to preamble value to
hold it and later on set it to mpdu_info preamble.

Change-Id: I054d27064b9ad151130fcbc1684594308352cef4
2020-05-05 05:00:07 -07:00
Ankit Kumar
8156bbf7fd qcacmn: Add sg formation check
Add check for sg formation.
Only enable chfrag_cont and msdu_continuation if reo
error code is HAL_RX_WBM_ERR_SRC_REO or rxdma_err_code
is HAL_RXDMA_ERR_UNENCRYPTED.

Also chain all nbuf in case of sg in separate buffer
and finally loop through that. This is added because
sometime we dont get desc in sync with hw.
To avoid such mismatch, this buffer is added.
We will process nbuf only when all msdus has been
received.

Change-Id: I3b154a68955db61f3acaa0cb8d130c8918a3d450
CRs-Fixed: 2672126
2020-05-05 00:51:56 -07:00
Alan Chen
331f8a3a54 qcacmn: Map qpower vendor command to advanced_power_save_mode
Map qpower vendor command to advanced_power_save_mode in order to support
users of HST as well as HSP.

Change-Id: I38de5981dca384b666b5086727e3da741f0cd4e3
CRs-Fixed: 2676713
2020-05-04 21:28:05 -07:00
Rakesh Pillai
5ff0936c12 qcacmn: Ratelimit status nbuf alloc failure logging
The status nbuf replenish can fail in low memory
scenario, and the error logging can flood the console.

Ratelimit the status nbuf allocation failure logging.

Change-Id: I8e26b1060fdca62d36236f2d57fbbf7be165e3c6
CRs-Fixed: 2678202
2020-05-04 21:28:02 -07:00
Jinwei Chen
ac1aea6e59 qcacmn: WAR for duplicate RX desc issue from REO2SW ring
Two back to back same RX desc is received from
REO2SW1 ring. After first RX desc is processed,
RX_desc nbuf will be set to null.
when second REO entry/same RX desc is processing,
dp_rx_desc_nbuf_sanity_check() will access to RX_desc nbuf, null
nbuf accessing lead to panic.

As a WAR, check RX_desc in_use flag firstly to avoid
invalid accessing to nbuf, move
dp_rx_desc_nbuf_sanity_check() after it.

Change-Id: Ib9455c76af85cf83587c1428b20a9ad9e93a9499
CRs-Fixed: 2672088
2020-05-04 21:27:59 -07:00
Ruben Columbus
06ccc52edd qcacmn: get full mac address for rts case
rts full destination address is needed to be able to do check on mac
to be able to recreate cts frame correspondingly.

Change-Id: I3ec7e765bb4a0645a1495b4ca42d81fd3134cc5d
2020-05-04 19:38:17 -07:00
Abhishek Singh
d96c0dbfbf qcacmn: In crypto use QDF api to calculate MIC for OS derivatives
For WLAN_CRYPTO_OMAC1_OS_DERIVATIVE and
WLAN_CRYPTO_GCM_OS_DERIVATIVE set use QDF API to calculate MIC

Change-Id: I5971eb39414a292534981753805df6d9beb54be0
CRs-Fixed: 2664275
2020-05-04 03:50:18 -07:00
Nirav Shah
e2d6e92a68 qcacmn: Do not vote for PCIe link for QCN7605
Do not vote for PCIe link for QCN7605 to allow PCIe
bus to go to low power mode.

Change-Id: I14e1a5d142497e3cbe8ed12874a428ab7d90afed
CRs-Fixed: 2649897
2020-05-04 00:32:53 -07:00
Nisha Menon
a2f5ca7c04 qcacmn: Check return status of deliver to stack function
Check the return status of the osif->rx function and in case
of failure drop the skb. This is needed when OOR error frame
is received and if the frame was not delivered to stack it
needs to be dropped.
Add error counter to periodic stats to determine how many Rx
packets were rejected or were dropped since deliver to
stack failed.
Add the new status check for delivering rx frames to stack
under MCC specific flag - DELIVERY_TO_STACK_STATUS_CHECK.

Change-Id: I9b1c795f168774669783cc601e68003a7747a279
CRs-Fixed: 2672498
2020-05-03 18:19:10 -07:00
Padma Raghunathan
0668b9fc45 qcacmn: Skip CFR target init when feature is disabled
When user disables CFR through INI -
1. Skip CFR SRNG allocations
2. Skip WMI handler registrations for DBR/TX completion events

Change-Id: I4f397e35717dc492aea5af74b167c1111cbc16a9
CRs-Fixed: 2671611
2020-05-03 18:19:01 -07:00
Padma Raghunathan
79f10bc2d2 qcacmn: Skip CFR umac handling when feature is disabled
Retrieve the INI option to disable CFR and store the
same in pdev feature ext caps.

When CFR feature is disabled -
1. Skip pdev/peer cfr object allocations
2. Skip CFR SRNG allocations
3. Skip WMI registration for DBR and TX completion events

Change-Id: I5a7a6ae67d2c3a863b952e00e317c44a71e9fbc1
CRs-Fixed: 2671620
2020-05-03 18:18:58 -07:00
Padma Raghunathan
297e63ab48 qcacmn: Add support to disable CFR through INI
Add option to disable cfr for a pdev through INI.
Since INI is per psoc, bitmap is used to indicate
the set of PDEVs for which CFR needs to be disabled.

Change-Id: Iaff24295c8c3ec702647db24961395b8a7ecf8c4
CRs-Fixed: 2671620
2020-05-03 18:18:54 -07:00
Christopher Chopp
6b17c700d4 qcacmn: Add TSF timestamp to MCAST pkts in TX Cap
Move dp_tx_peer_init before dp_peer check to init for
bss_peers as well for MCAST packets. Add TSF timestamp
for wbm completion path in TX Capture feature.

Change-Id: I7da500671e2c22a937cae8770ce5357b9bbe5364
2020-05-03 13:43:45 -07:00
phadiman
1f3652debc qcacmn: Datapath init-deinit changes
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
2020-05-02 21:59:42 -07:00
Vevek Venkatesan
e4a31a803d qcacmn: change logging with spin_lock held to debug level
Change the error level logging which are called by holding
the spin_lock to debug level to avoid printing to console.

Change-Id: If057087e808ed49000eba8b9795397a0cf35a357
CRs-Fixed: 2676235
2020-05-02 15:50:31 -07:00
Alok Kumar
25a79eb0f4 qcacmn: Register WAKE IRQ for QCA6750
Register CE2 IRQ as WAKE IRQ for qca6750

Change-Id: I62517ed09aef6662960c427e075dd3c1c4922783
CRs-Fixed: 2675316
2020-05-02 11:10:13 -07:00
Padma Raghunathan
f637c5c9a9 qcacmn: Add CFR support enable bit in pdev ext caps
1. CFR feature can be disabled through INI
2. Add a bit in pdev ext caps to indicate whether
CFR feature for pdev is enabled/disabled by user.

Change-Id: I3bbb6c23a0be087c64e45bffedb2338cb96717d8
CRs-Fixed: 2671620
2020-05-02 04:27:35 -07:00
Radha Krishna Simha Jiguru
0750a7c7c2 qcacmn: Fix compilation issue in batched inval desc API
Fix compilation issue in batched inval desc API

Change-Id: Iedd0a7554006ce11aceed8d1949d25458c0c127b
2020-05-01 23:29:21 -07:00
Rajeev Kumar
0dffbe0845 qcacmn: Add validation assert for runtime pm get/put out of sync
As part of HIF runtime PM close add assert to make sure no runtime
PM user has missed any put which may lead to runtime PM getting
disabled at runtime. This assert ensures all runtime PM users
have get and put in sync.

Change-Id: I6663be013e85b8a262ccc0f60c8bd9c59bac25ef
CRs-Fixed: 2665231
2020-05-01 12:49:24 -07:00
Vignesh Mohan
a208da2cfc qcacmn: Post various events to the RCAC state machine
Trigger Rolling CAC SM events from
 - NOL expiry (EV_RCAC_START) to trigger RCAC START with a
   new channel if possible and not already running.
 - Agile radar (EV_ADFS_RADAR_FOUND) to restart RCAC with a
   new random channel.
 - vdev restart (EV_RCAC_STOP) to stop the running RCAC when
   the primary channel changes. Start will be based on the
   availability of the new channel.

In case of the rolling CAC feature, a channel is programmed to
the agile detector on which CAC is running continuously.
Introduce an API that finds an RCAC completed channel and return
the channel params which will be used for the next channel
change.

Also add a boolean argument in  dfs_set_current_channel api to
indicate if the dfs current channel is updated in the API
"dfs_set_current_channel".

CRs-Fixed: 2674621
Change-Id: Ica54a57f131cd54e47138f1cbeef2dd0023390ed
2020-05-01 07:00:26 -07:00
Nisha Menon
12cc7c6558 qcacmn: SKB buf memory Leak@ Func dp_pdev_nbuf_alloc_and_map
Fix the skb leak in dp_rx_process where rx descriptor cookie
validity fails. This skb should be cleaned up as part of the
rx desc and nbuf free function called during the driver unload.
However this will ensure that the skb released and added rx desc
added to the free list during dp_rx_process itself.

Add skb map, unmap functions, line numbers and if the nbuf is
mapped or unmapped to the nbuf tracking table. This debug info
will be logged once the skb is leaked.

Change-Id: I52dbf38922be20fc0aaea380e0e572af16de773e
CRs-Fixed: 2662992
2020-04-30 18:21:23 -07:00
Vignesh U
70eb719dfe qcacmn: Reduce the PRI threshold to detect w53 duplet pulses
So far the DFS algorithm detected only a train of single pulses and the
diff ts(PRI) which is the difference in time stamps between 2 consecutive
pulses, should be greater than a threshold DFS_INVALID_PRI_LIMIT of 100us.

When the diff ts is less than 100us, the radar queue gets reset. With the
updated w53 DFS specification for Japan country, new sets of duplets have
been introduced and the time interval between the 2 pulses in a single
duplet can be as low as 20us. Since, the diff ts threshold
DFS_INVALID_PRI_LIMIT is 100us, the duplets with a time interval less than
100us is not be detected.

Reduce the diff ts threshold DFS_INVALID_PRI_LIMIT to 15us for MKKN
DFS domain.

CRs-Fixed: 2656660
Change-Id: I67b8ebab80155a5bcefcaa33f5a8d75c30d2ef40
2020-04-30 14:50:36 -07:00
Linux Build Service Account
1bb533325c Merge "qcacmn: Enable Agile Spectral in single synth targets" 2020-04-30 10:20:44 -07:00
Gerrit - the friendly Code Review server
86b1c1a03f Merge changes into wlan-cmn.driver.lnx.2.0 2020-04-30 05:53:07 -07:00
Edayilliam Jayadev
1de47959b6 qcacmn: Enable Agile Spectral in single synth targets
Some targets have a single synthesizer and it allows
a single Spectral detector to scan in 160 MHz /165 MHz.
Enable Agile Spectral scanning in 160 MHz / 165 MHz for
such targets. Agile creq2 will be populated in the WMI
command after WMI interface changes are merged.

CRs-Fixed: 2648480
Change-Id: I8522cbeeab29ac41479e3041eea376b081c0758a
2020-04-30 01:51:14 -07:00
Manoj Ekbote
f87f43f8b2 qcacmn: Add function to get CFR capture status
This function is used to disallow HW mode change if
CFR capture is in progress.

CRs-fixed:2663183

Change-Id: Ib5939c1f5743a1aa3cf7594c98fe4bbcc6ced49f
2020-04-30 01:51:10 -07:00
Radha Krishna Simha Jiguru
41c0716617 qcacmn: Add a change to do fast transmit completion
Lot of checks in Tx completion path are for special handlings
such as when ol stats are enabled some protective debug checks etc..
Add a logic to fast free of buffer at transmit completion.
If extended stats not enabled(Typically needed for enterprise cases)
do the buffer free faster. This is controlled through a flag.

Change-Id: I04873b5e3643d8e93e5b248fcaf23504dcb7624f
2020-04-30 01:51:07 -07:00
Yu Wang
2bfeac4376 qcacmn: update BT coex config for all vdevs when setting BT coex mode
When setting BT coex mode, the config was not updated for all
when there are multiple vdevs.
Modify the code to update it for all vdevs.

CRs-Fixed: 2667933
Change-Id: Ibad3adf44bef6842a12cbe7e46050b693ed474d6
2020-04-29 22:27:47 -07:00
Lihua Liu
acb2945a97 qcacmn: Fix compile error when enabling pkt log
Variable "type_specific_data" is defined under macro
PKTLOG_HAS_SPECIFIC_DATA in struct ath_pktlog_hdr, but
used without control of the macro.

Change-Id: I9d46ddc141a0641aa6eaecf712c52e640c48053c
CRs-Fixed: 2665564
2020-04-29 22:27:43 -07:00
Ramanathan Choodamani
40ef96ef99 qcacmn: Add support for PHY logging for pktlog
The user can add phy logging to be enabled in user space
by using '-ephy' option, which will let the host know about
this corresponding event and will send the event information
to the firmware.

Change-Id: Ibb4888101a80a765d196264403ce7912d1a6e9aa
2020-04-29 19:36:18 -07:00
Tallapragada Kalyan
8186e7d0cf qcacmn: fix qdf trace print during desc allocation
fix qdf trace print during desc allocation

Change-Id: I6d786a20a7bc65dcc67a62e784825f72a64a6565
2020-04-29 17:56:12 -07:00
Pavankumar Nandeshwar
60561d5b3f qcacmn: remove the redundant API dp_peer_flush_ast_entry
Since the peer unmap handler removes all the associated
wds ast entries, the redundant API dp_peer_flush_ast_entry
can be removed.

Change-Id: Ib8fc19e846e07f9a60c73530cac66d357a00fd98
2020-04-29 16:03:41 -07:00
Yue Ma
c81a71e488 qcacmn: Cleanup and refine runtime PM open/close logic
Runtime PM code has been refactoring multiple times so some open/close
logic may be duplicated and messed up. Cleanup and refine the logic.
In other to align both runtime PM enable and disable cases, make sure
default usage count is always 2 and sanitize the same when runtime PM
exit. hif_pm_runtime_stop() should always happen from HDD disable power
management APIs so clean it up from hif_pm_runtime_close().

Change-Id: I3b64369608c2d9aa4b3353503c12e0d05a57b592
CRs-fixed: 2666196
2020-04-29 16:03:38 -07:00