Commit graph

7,484 commits

Author SHA1 Message Date
Manoj Ekbote
82a4606b8b qcacmn: Add ioctl param to retrieve MBSS status
Add parameter to know if MBSS feature is enabled or disabled.
During 'wifi detect', the wireless config file is changed and
there's no way to figure out status of MBSS feature.

Change-Id: Ie56244097fd15efc71213f23e5afcb57188c9386
CRs-fixed: 2531506
2019-09-24 14:00:07 -07:00
Vignesh Mohan
fe0b8b48db qcacmn: Maintain FW ADFS support flags in dfs
Agile DFS support depends on the Firmware's aDFS support. This
information is propagated to the HOST in the WMI ready event as a flag.
This flag was not used by HOST before enabling agile DFS which resulted
in preCAC being enabled for the FW that does not support them.

Also, for certain chainmask configurations, aDFS should be enabled
only if the current pdev is operating in non 160 BW.
Introduce two new flags in the DFS object:
1. dfs_fw_adfs_support_160
2. dfs_fw_adfs_support_non_160

which specify FW support for ADFS for pdevs in 160 BW and non 160 BW
respectively. Make appropriate changes in is_agile_precac_enabled
check that includes fw support for the current operating bandwidth.

Also rename "dfs_agile_precac_enable" to "dfs_agile_precac_ucfg" and
"dfs_precac_enable" to dfs_legacy_precac_ucfg" in the dfs structure
to properly indicate what those booleans represent.

Change-Id: I202ead8ef109c707bfbda488064ecaa72a3f737f
CRs-Fixed: 2521654
2019-09-24 07:37:39 -07:00
Kai Chen
99efa0dce4 qcacmn: Enable peer filtering for enhanced RX capture
Enable peer filtering for enhanced RX capture.

Change-Id: Ic8d27b575721f6fe3bae06ed7d23b1ff300306c9
2019-09-23 20:35:31 -07:00
Subhranil Choudhury
5985716a66 qcacmn: Add correct ast-idx in the Tx Descriptor
Add ast-index instead of ast hash value in the transmit
descriptor as specified by Hardware team.

Change-Id: Id5965d6f41aa89af7680ad6f45d1611631ffcff4
2019-09-23 10:40:23 -07:00
Edayilliam Jayadev
7a1d8072a3 qcacmn: Reject aSpectral start scan request if aDFS is enabled
Reject Agile Spectral start scan request from user
space if Agile DFS is running on one of the pdev.

CRs-Fixed: 2517517
Change-Id: If648c53946d1bca1de07a335db67f204de41ba5f
2019-09-23 06:04:20 -07:00
Edayilliam Jayadev
76c73fd4de qcacmn: Add dispatcher API for regulatory
Add dispatcher API for reg_get_5g_bonded_channel.

CRs-Fixed: 2521557
Change-Id: Iad877e9fd8d41f4f44b3a70af938aaf5d5ffc100
2019-09-23 06:04:14 -07:00
Edayilliam Jayadev
b75b9850cf qcacmn: Check Agile span overlaps with operating band
Check whether Agile span overlaps with the current
operating span. This check is done at the time of
start scan and Spectral parameter setting.

CRs-Fixed: 2521554
Change-Id: I9f28ca0a02bd5abf6acdff89301a0c9343e34887
2019-09-23 06:04:05 -07:00
Wu Gao
b63edc6a49 qcacmn: Fix compilation issue about dbr_get_pdev_and_srng_id
There is compilation issue about dbr_get_pdev_and_srng_id on hasting
platform, fix it in this change.

Change-Id: Icd5612c31341e6a5f71c65f1ec10533c164798c3
CRs-Fixed: 2530729
2019-09-23 06:03:56 -07:00
Vignesh U
431649e97f qcacmn: Add new DFS filters to ETSI RADAR table for EN302502
Add new DFS filters to ETSI RADAR table to detect ETSI EN302502
Type 3 and Type 4 RADAR pulses.

The filters have been added per ETSI EN302502 spec
https://www.etsi.org/deliver/etsi_en/302500_302599
/302502/01.02.01_60/en_302502v010201p.pdf
Table D.3.1: DFS Test Signals simulating fixed frequency radars.

Change-Id: I4b9e93dc5069d57992c468cd4c00cb5ff77d3753
CRs-Fixed: 2505394
2019-09-23 06:03:49 -07:00
Wu Gao
85fe728e66 qcacmn: Use new pdev id conversion callback for dbr
In direct buffer rx component, it required to pdev id and mod id match
at same time, so use new pdev id conversion backup and convert pdev id
actually.

Change-Id: If53bde84564becd91f2dd0e20b002da2961dccd2
CRs-Fixed: 2528401
2019-09-23 00:06:33 -07:00
Vignesh Mohan
c9a483e5d7 qcacmn: Send the channel structure to check for ETSI preCAC
While checking if ETSI preCAC is already done on a given channel
in the API "dfs_is_etsi_precac_done", dfs_curchan is always used as
the channel to be checked. Since the API "dfs_is_cac_required" maybe
called without updating the dfs_curchan, using dfs_curchan in
function "dfs_is_etsi_precac_done" is not correct.
Use the current channel provided to the API "dfs_is_cac_required"
as input while checking for ETSI preCAC.

Change-Id: Id2bc59281e17afaa3ba7572f5a2d7bd4718a7639
CRs-Fixed: 2528023
2019-09-22 23:03:42 -07:00
Min Liu
2c14fae3d5 qcacmn: Add interface to get / set eLNA bypass
Add interface to get / set eLNA bypass from / to firmware via WMI.

Change-Id: I2ed78aece6703c18999fdfbfdfa159a2abd477a6
CRs-Fixed: 2498526
2019-09-21 02:47:10 -07:00
Hangtian Zhu
24dab77dbe qcacmn: Add CONFIG_MULTI_IF_LOG to support multi if log
This is a propagation of qcacld-2.0 commit 98821c7dcf49d ("qcacld-2.0:
Add CONFIG_MULTI_IF_LOG to support multi if log"). Add CONFIG_MULTI_IF_LOG
to support multi if log by assigning the specific netlink protocol
when dual wlan cards are loaded.

Change-Id: I827fbd46893c47ed2d9b123bf753c06b2e115fbb
CRs-Fixed: 2525488
2019-09-20 01:06:29 -07:00
Saket Jha
1d97e0c080 qcacmn: Featurize legacy Helium DP
Memory optimization of legacy Helium DP (ol_*.*,htt_*.*)

Change-Id: Ie00c59d95e90efdf585a05962a073f688dcb2a2a
CRs-Fixed: 2508727
2019-09-19 20:55:22 -07:00
Manikandan Mohan
9b1b93cfcd qcacmn: Add support for WMI over QMI
Add support for WMI over QMI to reduce power consumption for
periodic stats report.

Change-Id: Ic57b2bd18be803c97ffeea2e0073751d31e02202
CRs-fixed: 2521835
2019-09-19 18:56:11 -07:00
Ashish Kumar Dhanotiya
258eb6429b qcacmn: Get extscan vendor params out of extscan feature flag
Currently extscan vendor config params are defined under
EXTSCAN feature flag but are getting used for the vendor command
get valid channel list which is independent of EXTSCAN feature.

To resolve above issue move extscan vendor params out of
extscan feature flag.

Change-Id: I049fbc8cdc97f51aa1e390a488074572d5276299
CRs-fixed: 2524535
2019-09-19 10:55:19 -07:00
Will Huang
c180dcd475 Revert "qcacmn: Change pdev_stats to pdev_stats_v2"
This reverts Change-Id: I6dd3abd61730d8f17d74a11a42978a64853136e5.
wmi_pdev_stats_v2 and wmi_pdev_stats_v1 are defined depends on
specific target, can’t use them directly in our common code,
must use wmi_pdev_stats instead. And use different config to
enable v1 or v2 pdev stats.

Change-Id: I6ad11d723ac0c9ed55a266c204957af706045d3d
CRs-Fixed: 2521638
2019-09-19 07:47:09 -07:00
Bala Venkatesh
0c7b22e182 qcacmn: Do not send UAPSD command after TDLS connection
Currently as part of tdls enable link, If the peer is buff
capable or tdls uapsd is enabled in INI. UAPSD is enabled in
FW. Avoid sending this command to FW as it effects the behavior
with AP.

Change-Id: Idc023cb9de3ab63e7643815d473fe0efa98069b9
CRs-Fixed: 2528324
2019-09-19 02:02:03 -07:00
Venkata Sharath Chandra Manchala
780cbb8034 qcacmn: Avoid printing log in console
Avoid printing hif runtime resume log in
console while holding the srng->lock.

Change-Id: I57a361a746884504444028476f20b3735e261d1e
CRs-Fixed: 2522072
2019-09-18 15:49:45 -07:00
Rajeev Kumar Sirasanagandla
63b0f33c4c qcacmn: Use frequency for channel operation
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I7c7542aa8488b4c55764c733590b77c64c397029
CRs-Fixed: 2517900
2019-09-18 11:23:14 -07:00
Wu Gao
fe2a6185ad qcacmn: Support multiple srng per module in DBR
It required to support multiple srng per module in direct buffer rx
component.So extend the array "dbr_mod_param" in dbr pdev object and
let it to support two more srngs per module.

Change-Id: Ia2c649dacc3787cdc13b06f0b22c1c175fb451cc
CRs-Fixed: 2523365
2019-09-17 16:30:21 -07:00
Debasis Das
285561b9ab qcacmn: Support dma_ring_caps info processing
EXT2 event carries the dma_ring_caps info.Necessary
support to process the same is being provided.

Change-Id: Id8ef1840470b272db00fa5e8f98d1fe9dc273a7e
2019-09-17 12:12:43 -07:00
Debasis Das
a7b2f9a1d1 qcacmn: Process dma_ring_caps from EXT2 event
EXT2 event carries the dma_ring_caps TLV.Necessary
support is added to process the same.

Change-Id: I6bdfa2901c4213229a3fbb436120f993635a2925
2019-09-17 12:12:37 -07:00
narayan
7d5c0c3d59 qcacmn: Add cmd to disable same ssid feature
Add a command to globally disable same ssid feature from uci

Change-Id: If995f673f6b0bd3cecc48293cb579e517b623e74
CRs-Fixed:2522146
2019-09-17 10:20:36 -07:00
sheenam monga
446837d5f8 qcacmn: Send vendor_roam_score_algorithm ini to firmware
vendor_roam_score_algorithm is added in order to
enable/disable roam score algorithm.
With this roam score Algorithm, AP score will be calculated
based on below equation:
AP Score = (RSSIfactor * rssiweight(0.65)) +
                        (CUfactor *cuweight(0.35))
Add vendor_roam_score_algorithm inside scoring_param
and inside function send_roam_scan_offload_ap_profile_cmd_tlv
populate score_param->vendor_roam_score_algorithm_id
from ap profile.

Change-Id: I21bb788d96a34c3bf237f0d304e51a7f4664d2ee
CRs-Fixed: 2517492
2019-09-17 05:15:25 -07:00
Vivek
91dcde9050 qcacmn: Check for pdev/psoc before requesting serialization psoc object
The serialization vdev destroy handlers extracts the psoc
from the vdev, and get its psoc component object.

If the pdev or psoc is NULL for some reason, we get a
crash in object manager while trying to retrieve the serialization
psoc object.

So check for valid pdev/psoc before we get the serialization psoc object.

Change-Id: I9ca45654250403a8b5fe674431251defd1aac6e8
CRs-Fixed: 2524231
2019-09-17 03:56:23 -07:00
Vignesh U
b577fa9898 qcacmn: Change maximum duration of a Korea RADAR Filter
When the radio is in HT20 mode, the duration of Korea Type 3 RADAR is
reported by the HW as 3us although the duration is only 1us. The minimum
and maximum duration for the corresponding filter(FilterID 42) is 0us
and 2us respectively. So host will neglect the pulses with a duration of
3us. This will result in Host failing to detect the Korea Type 3 RADAR
pulses in HT20 mode.

Increase the maximum duration of the filter(FilterID 42) to 3us.

Change-Id: I45f337ec31e017c4a0c19f1afea3fc7a08af9888
CRs-Fixed: 2503942
2019-09-17 03:56:18 -07:00
Alok Kumar
1c42376e40 qcacmn: Add paddr in CE descriptor history
Add IOMMU IOVA to PA and MMU virtual to phys address
in CE Desc History, hif_ce_desc_history.

Change-Id: I877a2275e7ea99748087ea6f2ad5f26aa3b2476e
CRs-Fixed: 2524381
2019-09-16 23:49:36 -07:00
Saket Jha
52e54333f4 qcacmn: Delete all peers during SSR
During SSR in dp_vdev_flush_peers function, the else condition finds peers
to delete by calling dp_peer_find_by_id. If the delete_in_progress_ flag
has already been set to TRUE, then dp_peer_find_by_id will return NULL
and not delete the vdev object. Calling __dp_peer_find_by_id will always
return peer id so all peers are sure to be deleted.

Change-Id: I86bf2bdda7ebc5a9c2f4bbc877392ebff9cbaf59
CRs-Fixed: 2513104
2019-09-16 17:23:27 -07:00
Hariharan Basuthkar
7eb35947eb qcacmn: Add frequency based APIs within the regulatory component
The IEEE channel numbers in the 6GHz band overlap with the
IEEE channel numbers in 2.4GHz, 4.9GHz (e.g. Channel number 1) and 5GHz
(e.g. Channel number 149). Currently many APIs in the regulatory
component, have channel number as a parameter. This leads to the channel
number collision.

To overcome this, new APIs with channel center frequency ( in units of
megahertz or MHz) as a parameter are created, as a channel center center
frequency is unique for 2.4 GHz, 4.9 GHz, 5GHz, and 6GHz channels.

Each new API performs the same function as its old counterpart.
For example reg_set_5g_channel_params() and
reg_set_5g_channel_params_for_freq perform the same operation. The
difference in the latter, is that the channel center frequency is given
as an input parameter instead of IEEE channel number, and the function
body is modified to suit channel center frequency.

The new channel frequency based APIs are placed under the macro
"CONFIG_CHAN_FREQ_API" and the existing channel number based APIs are
placed under the macro "CONFIG_CHAN_NUM_API". The APIs under the macro
CONFIG_CHAN_NUM_API can be removed, when when all the references to
the APIs are removed.

Change-Id: I0347e8d31c25e2c3a406aafe1360c7c7b602fda2
CRs-Fixed: 2463009
2019-09-16 15:14:35 -07:00
Hariharan Basuthkar
2082a4c585 qcacmn: Remove channel_map_old and CONFIG_LEGACY_CHAN_ENUM
Remove channel_map_old and and remove the instances of
CONFIG_LEGACY_CHAN_ENUM in the dfs and regulatory component.

Change-Id: I3e30dba72c28c9c356648595ad96720ab0cd789a
CRs-Fixed: 2463009
2019-09-16 15:14:30 -07:00
Mohit Khanna
cd9abacf18 qcacmn: Mark DP interrupts wakeable
This is needed, because in SAP mode wlan_wake_irq is not used to wake up
the APPS when it goes to suspend, and each SRNG interrupt needs to
wakeup the APPS when needed. Hence mark DP interrupts with
IRQF_NO_SUSPEND flag.

Change-Id: I0138c94ad82da7cdef5856c15c5f4089a835bc22
CRs-Fixed: 2512383
2019-09-16 09:25:20 -07:00
Abhinav Kumar
e288a93d22 qcacmn: Documentation enhancement for wake_lock_in_user_scan
Update kernel doc for wake_lock_in_user_scan to improve
code readability.

Change-Id: I5a7a0fd8cb18d97d293e9896ed58b40a52e06e0c
CRs-Fixed: 2520906
2019-09-16 03:13:38 -07:00
Wu Gao
d45d248743 qcacmn: Register to direct buffer rx with QCA6390
Register spectral to direct buffer rx with QCA6390.

Change-Id: Ib07fc36faf6ba4cc5aff9203d70aef732bb703e3
CRs-Fixed: 2497826
2019-09-16 00:38:24 -07:00
Subhranil Choudhury
4ee1b5e28d qcacmn: Add cache-set-num in HKv2 Tx path
Add the infrastructure to add cache-set-num field in
tx descriptor of HKv2.

Change-Id: Iec9423c3c90f868341b56ced795cd0bb73c9766a
2019-09-15 22:48:47 -07:00
Chaithanya Garrepalli
09837d28a2 qcacmn: Do not add AST entry when PEER exist
Do not add WDS AST entry when peer exists with
same mac address

Change-Id: I533f431bb8c137d484c21fe8e411b1da7fe0d0cb
CRs-fixed: 2514962
2019-09-15 22:48:42 -07:00
Tiger Yu
720673fd7a qcacmn: Fix the regression issue for pktlog failure with ROME module
The pktlog will fail with ROME module due to the change IDs:
I24776caa3b78ec38d94421f243ec72d81ee3102d
Ifb70ac0993f2402201f88758845f730cf677b1a0

Define new macro PKTLOG_LEGACY for HELIUM/ROME to avoid the ROME PKTLOG
failure.

Change-Id: Ibaa20b7af208a261e0fd8682de45ad8eb4a69212
CRs-Fixed: 2523511
2019-09-15 22:48:36 -07:00
Ajit Pal Singh
71bf52b242 qcacmn: qcn7605: usb: Do not call put/get dev and usb_disable_lpm
*For QCN7605 do not call usb_get_dev/usb_put_dev as its already called
in CNSS.

*Also for QCN7605 do not disable lpm in hif_usb_disable_bus().
This was a workaround done for Rome/Naples which is not needed for
QCN7605.

Change-Id: Ibb151390590f85a96ad83395420b08aee1be15ef
CRs-Fixed: 2516667
2019-09-15 20:41:03 -07:00
Radha krishna Simha Jiguru
65c212da2d qcacmn: Disable PN Error handling in the REO
Disable PN error handling in REO Queue descriptor setup.
This is different from pn check enable.
When PN error handling is enabled, if a PN check fails
REO queue descriptor sets pn_error_detected,
All the subsequent packets will  be exceptioned with REO error code 13
till SW resets the pn_error_detected.

SW is not doing any special handling when PN error handling is enabled
Hence disabling flag in setup time instead of resetting/updating
reo queue descriptor as update is an uncessary overhead.

Change-Id: I21e40b6f685e50630fcc4413f6cd27e5ed9ff66d
2019-09-14 11:19:17 -07:00
Jinwei Chen
b02de7ed1c qcacmn: Degrade log level in dp_get_vdevid
Degrade log level from INFO to INFO_HIGH in function dp_get_vdevid,
this is to prevent console log output which may impact spinlock lock
/unlock time.

Change-Id: Ic1ecb2f0e2c5fcf5d15766921326a8cd80e67103
CRs-Fixed: 2522041
2019-09-13 20:21:58 -07:00
Yue Ma
a720310823 qcacmn: Log runtime PM wake source in debug level
Since callers who log runtime PM resume source may be invoked within
spinlocks or in other atomic contexts, log using info level will log
to console as well which may result overhead. Log using debug level
which will be logged to buffer only to avoid such issues.

Change-Id: I0497c7b7528200af9a34d816865e9bbbfd8bacf2
CRs-fixed: 2518800
2019-09-13 17:37:17 -07:00
Shashikala Prabhu
fdf5499a36 qcacmn: Update the peer rssi for entire packet bandwidth
Peer rssi is updated with the rssi measured on primary 20 and
not on the entire bandwidth.
Scale the peer rssi value by packet bandwidth offset.
Packet bandwidth offset for packet bandwidth of 20/40/80/160 is
0/3/6/9 dB.

Change-Id: I13eb8c17ec9828c0025d6b3a92a8b26b971268a1
CRs-Fixed: 2518598
2019-09-12 08:43:16 -07:00
Chaithanya Garrepalli
11b7ea2bc5 qcacmn: pass client mac address also to nac rssi API
Add client MAC address while calling upper layers to
configure NAC RSSI

Change-Id: Ib7b0140ee4d194fe86c37d862fc6024b61481011
2019-09-12 01:46:32 -07:00
Edayilliam Jayadev
499d29e713 qcacmn: Add API to get center frequency of sec80 seg
Add helper API to get the center frequency of secondary 80 MHz
segment. Make this API available to Spectral target if layer
via rxops.

CRs-Fixed: 2523690
Change-Id: If1cad90d9b27d1461e802b921aecda07031b1e0b
2019-09-11 18:40:28 -07:00
Alan Chen
7a0394d444 qcacmn: Move wakelock outside of spin lock
Wake lock acquire and release API is doing console logging, which has
side effects and hence move wake lock APIs outside spin lock.

Change-Id: Ib697c5fc1b1c44dbeafd94a72cb79e63640cb0d7
CRs-Fixed: 2521000
2019-09-11 17:27:50 -07:00
Tiger Yu
f28f88bcdd qcacmn: Add protection for type_specific_data in ath_pktlog_hdr
The member of type_specific_data is not valid for ROME module. Add macro
protection for type_specific_data in the ath_pktlog_hdr to avoid offset
error when getting the msdu id info during  processing pktlog TX info.

Change-Id: Icb8b95cef9a32732116522e4fc3b39067ff36037
CRs-Fixed: 2518400
2019-09-11 01:33:02 -07:00
Pragaspathi Thilagaraj
5a962e6c4c qcacmn: Fix pmk_info null pointer dereference
In send_set_del_pmkid_cache_cmd_tlv(), pmk_info is
dereferenced to copy vdev_id, flush flag and other
parameters. Add null pointer validation for pmk_info before
dereferencing pmk_info.

Change-Id: If44acc76d7e0e5d4387f089f8ec5684fc4648665
CRs-Fixed: 2520041
2019-09-10 19:03:33 -07:00
Subrat Mishra
3645c34060 qcacmn: Smart Antenna Multi radio support
Smart Antenna WMI cganges to extract pdev_id from
WMI_PEER_RATECODE_LIST_EVENT data.

Change-Id: I726d7615c7c624b20c5bfd5ae3e82bcdc1a9ad28
CRs-Fixed: 2514500
2019-09-10 12:23:03 -07:00
Ashok Kumar
39c0fea7c7 qcacmn: Prevent FILS delkey from calling CRYPTO_OPS
Prevent delkey to call crypto_ops for FILS cipher
type, as this keys are not present in FW.

Change-Id: Ica13a62b6822ee3cee40acffa98b7cc1cb122120
CRs-Fixed: 2520517
2019-09-10 09:04:06 -07:00
Priyadarshnee S
e0440bc502 qcacmn: Find proper radar-found secondary frequency when preCAC is running
Bring up a Hawkeye AP in ETSI domain in HT80_80 mode and enable preCAC
(preCACEn). When preCAC timer is running, if radar gets detected in the
secondary segment (which is DFS), dfs_get_bonding_channels() gets invoked
to find the radar affected channels's IEEE. The radar-found channel's IEEE
gets computed from "dfs_precac_secondary_freq" variable which does not get
populated for Lithium chipsets as "dfs_precac_secondary_freq" is specific
to legacy preCAC.

Since the secondary 80 channel's IEEE gets assigned as 0, radar-found
frequency gets computed wrongly and channels are not added to NOL.
Ensure that "dfs_precac_secondary_freq" is used for secondary frequency
computation only for legacy chips. For chips that have a separate agile
radar detector engine, use "dfs_ch_vhtop_ch_freq_seg2" variable to
compute the secondary frequency.

CRs-Fixed: 2521686
Change-Id: I50e1c496ce81d532408d61d21bac568c8d755b2c
2019-09-10 02:47:02 -07:00