Grafico dei commit

8631 Commit

Autore SHA1 Messaggio Data
Priyadarshnee S
28216f27e4 qcacmn: Add HT40 channel 140 and 144 to us_op_class
According to Annex E of 802.11 specification (Table E-1—Operating classes
in the United States) add opclass support for HT40 channel 140 and
144 in us_op_class map. Currently for HT40 channels 140 and 144,
us_op_class map does not have a valid entry and hence opclass is
fetched as 0.

CRs-Fixed: 2626714
Change-Id: I848d6266c829c363f353de9911359349c379126b
2020-03-23 06:03:38 -07:00
Ashish Kumar Dhanotiya
dc6a3bab24 qcacmn: Allocate vdev private data along with vdev
Currently vdev private data osif_priv gets allocation
separately and requires to be de-alloc separately.
This de-alloc needs to be taken care at different places
based on the vdev create failure or whenever vdev is freed.
As vdev private data is associated to the vdev and needs to
be freed if vdev is not there, it is good to allocate this
private data along with vdev so that there is no need
to maintain allocation and de-allocation of vdev priv data
separately.
As part of this change alloc the vdev priv data along with
the vdev allocation as a single memory and free of the vdev priv
data will be taken care as part of vdev free.

Change-Id: Ib442958c2d8684706830782d339c589c5f5daddf
CRs-Fixed: 2636222
2020-03-23 04:10:40 -07:00
Wu Gao
63dd1b61be qcacmn: Process PPDU status TLVs and parse CFR information
Channel Frequency Response(CFR) feature requires PPDU information
for correlation with CFR data. Host subscribes for the relevant PPDU
status TLVs via the Host RX monitor status ring. During monitor status
ring reap, all information needed for CFR correlation is accumulated
in a HAL PPDU structure and delivered to WDI event subscribers. Add
this change for HSP.

Change-Id: If3060271cf2923171487d30f99f2ab5c55370601
CRs-Fixed: 2634766
2020-03-23 02:25:29 -07:00
Wu Gao
20380e9491 qcacmn: Set max rings of DIR_BUF_RX_DMA_SRC to 2
In HSP platform, ring index 0 is for spectral scan, and ring idex 1 is
for CFR capture. Extend max rings to 2 and support CFR capture.

Change-Id: I02b39dd626b67172123bc5e77173d50a132fc735
CRs-Fixed: 2634636
2020-03-23 02:25:14 -07:00
Rongjing Liao
2905808346 qcacmn: add argument '_len' sanity check before use
When argument '_len' is equal to 0 or less than 0, 'ascii'
array element will be used uninitialized. To fix this case,
add arguemnt sanity check before use.

Change-Id: I2e2a4c199fac72466f831bb4261a6a03ac116e11
CRs-Fixed: 2643354
2020-03-21 21:56:26 -07:00
Rongjing Liao
cff463564e qcacmn: fix null pointer 'err' reference issue
When 'err' is null pointer, QDF_ASSERT(0) will not return
directly, then null pointer reference will occur. To fix this
issue, return failure when 'err' is null pointer.

Change-Id: I5912571795ae55c6729ae06d5e06496598c21fbb
CRs-Fixed: 2642581
2020-03-21 21:56:10 -07:00
Vinay Gannevaram
7ccc84acb3 qcacmn: Add support for NLA type OEM_DATA REQ-RESP in LOWI
Host driver processes cld80211 vendor subcmd
CLD80211_VENDOR_SUB_CMD_OEM_DATA and send
response in NLA format. Peer status indication
is also sent in nla format

CRs-Fixed: 2597282
Change-Id: I94f1fb7939141952ef92dbb7d3a130ba20d31608
2020-03-21 12:35:42 -07:00
Vinay Gannevaram
8fd2d1abbf qcacmn: Add support for NLA type CH_INFO_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CH_INFO and respond with
NLA type CH_INFO response

CRs-Fixed: 2595374
Change-Id: Ibe6f2431ac1cae6e4560ec11424434b4f1cf8b76
2020-03-21 12:35:24 -07:00
Vinay Gannevaram
23a3603951 qcacmn: Add support for NLA type CAP_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CAPS and respond with
NLA type CAP response

CRs-Fixed: 2595140
Change-Id: I5a6aa1fac537ca618404520b81c541a20dafd6fb
2020-03-21 12:35:02 -07:00
gaurank kathpalia
644413b274 qcacmn: Do a full scan if no candidate found
Sometimes if the user changes his location in the
connected state it may happen that the scan does not
happen and thus the AP cache channel map would not be
updated.
Now if partial scan happens due to a roaming trigger then
the candidate would not be found and thus would effect
roaming.
To avoid this set a full scan in roam invoke if the APs
are not found in the partial scan.

Change-Id: I2d2fd94760de78eaf495effc9caf8cca66c50ff6
CRs-Fixed: 2636431
2020-03-21 05:32:23 -07:00
Wu Gao
51bac7676d qcacmn: Add stream file system support
Stream file system is wrapper for Relayfs - a Linux specific feature,
which provides efficient method to indicate data to user space. It
depends on qdf debugfs APIs. This feature is protected with
compilation flags WLAN_STREAMFS and WLAN_DEBUGFS.

Change-Id: I1401112ece290e6d0560623cf10faaf498ebb1b7
CRs-Fixed: 2635481
2020-03-21 03:55:27 -07:00
Edayilliam Jayadev
01106d6458 qcacmn: Enable 165 MHz Spectral scan
QCN9000 has the capability to Spectral scan in 165 MHz/
restricted 80p80 mode of operation. Host filters the FFT bins
corresponding to the additional 5 MHz and exports to the
user space via SMAP message.

CRs-Fixed: 2630960
Change-Id: I54ec36968cb0c8d5a68ff39029004b08936cb91e
2020-03-21 02:03:45 -07:00
Basamma Yakkanahalli
9def5df14a qcacmn: device ID and target type checks for ipq5018 target
Initial changes for ipq5018 compilation.
Added device ID and target type checks for ipq5018 traget.

Change-Id: Ib86a371fbe66749fcb6d114e7a4a9931b684e03d
2020-03-20 23:45:43 -07:00
Amir Patel
925a7d389c qcacmn: Add full monitor mode changes
Add following changes:
	a. Add CDP API to config full monitor mode
	b. HTT configuration changes
	c. Init/Deinit changes for full monitor mode resources

CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
2020-03-20 22:16:00 -07:00
Sravan Goud
35b8f761f9 qcacmn: Return correct rx refill buf ring
In dp_rxdma_get_mon_buf_ring returns mac id index of
rx_refill_buf_ring array. But for targets with only one
pdev only the zeroth index is initialized. This will lead
to replenish failures in case of monitor mode when mon dest
process of lmac ring with mac id 1. So return only index 0 of
rx refill buf ring.

Change-Id: I03a7e19ea8d976e19fe6482aff0080dfa4d5ec45
CRs-Fixed: 2638655
2020-03-20 20:37:05 -07:00
Srinivas Pitla
cd32eed2af qcacmn: Drop mgmt nbuf in tx_capture disabled case
If tx_capture is disabled, the frames notified to tx_capture
module needs to be freed.

This change frees mgmt frames in tx capture module, if the feature
is disabled

Change-Id: I5f9ced69246c2b712d76f2f3cc61b5c386b703ec
CRs-Fixed: 2644025
2020-03-20 20:36:47 -07:00
Rhythm Patwa
623955bd83 qcacmn: Add Rx Ops to update the FD template
Add RX Op function to update the FD template in case of
any updates to the FD frame parameters.

CRs-fixed: 2637082
Change-Id: I1d7b488d177a32ddc57129f227df26d5774aa9e1
2020-03-20 20:36:31 -07:00
Alan Chen
23af24db1f qcacmn: Add null check in qdf_runtime_lock_deinit()
qdf_runtime_lock_deinit() is currently using the lock blindly without
checking if it is null. Add a null check to prevent it from using a
null pointer.

Change-Id: I3aa13c436f3668de7b1070c2c40bc69c7a4cc9fc
CRs-Fixed: 2642914
2020-03-20 06:03:08 -07:00
Srinivas Dasari
069884fe62 qcacmn: cleanup NAN/NDP logging
Few NAN/NDP logs are redundant in the current logging infra.
Optimize the same and add few necessary logs.

Change-Id: I9621416f7c9b17fe62db32bea48d4de0122ce17e
CRs-Fixed: 2644420
2020-03-20 00:16:13 -07:00
Hariharan Basuthkar
e10cc0fc38 qcacmn: Remove opmode check for WIN in vdev_mgr_start_param_update
When staDFSEn option is enabled in the UCI, radar detection fails on a
STA VAP.

In the function vdev_mgr_start_param_update,since there is a condition
check for QDF_SAP_MODE and QDF_P2P_GO_MODE, the
tgt_dfs_set_current_channel_for_freq function does not get calledin case
of STA opmode.

As a result, DFS flag does not get set for the dfs->dfs_curchan,
and DFS_RADAR_EN flag does not get set for dfs->dfs_proc_phyerr.
Therefore, within the function dfs_process_phyerr, the function returns
without processing the radar pulses.

To fix this issue, add a new function
vdev_mgr_check_opmode_and_des_chan_freq under a macro
QCA_MCL_DFS_SUPPORT. If QCA_MCL_DFS_SUPPORT is defined, check the opmode
of the vdev, and frequency band of des_chan_freq. If QCA_MCL_DFS_SUPPORT
is not defined, return true.

Change-Id: I66fe3d4ccc0b75b70652b04f9bf93b199268f1fa
CRs-Fixed: 2640208
2020-03-20 00:15:58 -07:00
Vevek Venkatesan
a62641c747 qcacmn: add synchronous timer stop to avoid race condition
Change the qdf_timer_stop to qdf_timer_sync_cancel (synchronized
timer stop), so it can wait till previous handler is completed
and then stop/delete the timer, to avoid race condition.
Also, call this qdf_timer_sync_cancel in dp_vdev_detach_wifi3,
to be symmetry with timer start in dp_vdev_attach_wifi3.

Change-Id: I3e975554b5492ccfc684ffe8b021c62ef39bf4d7
CRs-Fixed: 2644432
2020-03-19 22:25:27 -07:00
Vivek
d1bd5ce929 qcacmn: Provide valid range for dp_int_timer_threshold_tx INI
The default value provided for the INI item
dp_int_timer_threshold_tx for WIN is 1000 which is
beyond the specified INI range 8 and 100.

Changing the max value to 1000 to accommodate
the default value used by the INI and avoid
warning while parsing INI values.

CRs-Fixed: 2633718
Change-Id: I0aae0338798dab27d4ecb5d67e3b3fcfee983d92
2020-03-19 19:05:14 -07:00
Amruta Kulkarni
9b01e38405 qcacmn: Add support to handle assoc reject based on rssi
When AP rejects assoc request based on poor rssi
host will put the AP in blacklist mgr list, only when
rssi value improves by threshold value,should the
STA try to connect to AP.

Change-Id: Ie40d29cbb63f337f8560c08290300f575c0e2b72
CRs-Fixed: 2632022
2020-03-19 12:42:48 -07:00
Abhinav Kumar
3d4911dc92 qcacmn: Log enhancement for PNO scan
Enhance logs for PNO scan to remove duplicate
or unwanted prints and keep only useful logs to debug.

Change-Id: Ibe24714e925a00933911c801685528849e160480
CRs-Fixed: 2636641
2020-03-19 10:46:08 -07:00
Hariharan Basuthkar
cc9fb0cd68 qcacmn: Add frequency range check in reg_get_band_cap_from_op_class
When the operating class 82 is given as an input to the function
reg_get_band_cap_from_op_class, it is not found due to an
incorrect conditional logic that checks the starting frequency of a
band.

To address this problem, add a function
reg_get_band_cap_from_chan_set and call it within the function
reg_get_band_cap_from_op_class, to check if a channel in the channel
set, is within the frequency range of the band.

Change-Id: I7cbd8decf3c19f80e60a3153529b622b144feac9
CRs-Fixed: 2636367
2020-03-19 05:48:10 -07:00
Amit Shukla
a700ecf10e qcacmn: Fix rate and PHY type for disassoc retry packets
In tx capture feature, the last retry packet has wrong rate.
This is because the peer is invalid at the time rate TLV is processed
for retries.

Change-Id: I0eb9a8c80f8ea0dde60fe819c7e667293630a379
CRs-Fixed: 2633669
2020-03-19 01:36:55 -07:00
Manjunathappa Prakash
c2fc9f7ba9 qcacmn: Remove unused dma-iommu.h inclusion
asm/dma-iommu.h file is removed in latest 5.4 kernel,
resulting in include failure. Remove as it is unused.

Change-Id: I9eac7bee5a9a8d5da21d15c2f7d8f3fc4fbe00df
CRs-Fixed: 2638583
2020-03-18 23:53:41 -07:00
Vivek
c27a6095e9 qcacmn: Provide valid range for gScanProbeRepeatTime INI
The default value provided for the INI item
gScanProbeRepeatTime for WIN is 50 which is
beyond the specified INI range 0 and 30.

Changing the max value to 50 to accommodate
the default value used by the INI and avoid
warning while parsing INI values.

CRs-Fixed: 2633733
Change-Id: I442d07de55813c930b77e7dfffcdebf5372c5c0e
2020-03-18 23:53:26 -07:00
Sravan Goud
e7eff14c56 qcacmn: Reduce excessive qdf update radiotap logs
For monitor mode update radiotap he flags logs are
flooding the driver logs as update of radio tap header
is done for each msdu. So rate limit the logs to reduce
excessive logging.

Change-Id: Ica75ccf98afc069b80fe6c75b3d9b04815c82ced
CRs-Fixed: 2644241
2020-03-18 23:53:12 -07:00
Vignesh Mohan
0bdf0bea6a qcacmn: Translate radar params for true 160Mhz devices
In chipsets that support true 160MHz (single synthesizer),
the radar parameters received from target are different from Hawkeye
based chipsets in which two synthesizers, each 80Mhz,
produce 160Mhz signal.

The segment ID received in true 160MHz chipsets is always 0 and the
frequency offset is with respect to the center of 160MHz; unlike in
Hawkeye where segment IDs can be 0 (primary) or 1 (secondary) and
the frequency offset received is with respect to the corresponding
frequency centers (of the segment ID received).

Hence, to be able to use the same radar found algorithm as used in
Hawkeye, add a translation/mapping API that will translate new
parameters to old equivalents.

CRs-Fixed: 2633062
Change-Id: I37ad1db4ca71231119cf547abb9a8a70577cc6a4
2020-03-18 15:38:58 -07:00
Vignesh Mohan
48c594436d qcacmn: Add API to identify true 160 and restricted 80p80 support
In a future product, 160MHz mode of operation is acheived through
a single detector, unlike Hawkeye and its variants where 160MHz mode
is acheived using two 80MHz detectors.

Because of this change, the maximum segment ID is 0 in the new chipset,
whereas 1 in Hawkeye and its variants. Also the Agile detector ID
is 1 in the new chipset, 2 in Hawkeye and its variants.

In light of these changes, to identify the true 160MHz capability,
add a new API that checks the target type and returns true 160MHz
capability based on the target type. Also introduce a new dfs
variable that maintains the agile detector ID (based on the
true 160MHz capability).

In the future product, there is a support of restricted-80p80MHz
(a.k.a 165Mhz) where channels 132,136,140,144,149,153,157,161 are
available for operation as an 80p80Mhz channel.
Add a DFS API to check if this support is enabled.

CRs-Fixed: 2623964
Change-Id: If813e9d6fc649ce99c7780c04fbcb61acbd1af86
2020-03-18 15:38:48 -07:00
Jingxiang Ge
84e83c24c0 qcacmn: Enhance log for usage_count mismatch debug
Add below change:
1 log level change from error to debug level in
  hif_pci_runtime_pm_warn.
2 Change warn_on to bug_on in hif_pci_runtime_pm_warn.
3 change pm_stats to atomic
4 record last 128 caller both for get/put

Change-Id: I2dae883dfaed22812445c5d50920fb363b9e0ea7
CRs-Fixed: 2638863
2020-03-17 16:09:28 -07:00
Alok Kumar
048c20096b qcacmn: Use platform driver APIs to enable/disable IRQ
Use pfrm_disable_irq_nosync/pfrm_enable_irq APIs inplace
of disable_irq_nosync/enable_irq to enable/disable IRQ.

Change-Id: I4002a0c8efddac7211ab0c7e8b92356b0c7bc7bf
CRs-Fixed: 2636512
2020-03-17 09:16:17 -07:00
Abhishek Singh
5cf1392709 qcacmn: Populate RNR info during scan req
Populate RNR info during scan req instead of beacon
add/delete to avoid loop while holding scan db spin lock.
With loop spin lock can take more than 5ms, which can results
in asserts.

Change-Id: I4ba346b8dcbaf7da844f97195dbdd3003bdb234b
CRs-Fixed: 2640889
2020-03-17 07:19:22 -07:00
Chaithanya Garrepalli
f9eb64de02 qcacmn: handle decrypt error on in case of peer invalid
In case of decrypt de-auth need to be sent in case of
invalid. In valid peer case no action needed

Change-Id: I355093734c20a113fc1df0306b426eeb4f92ac88
2020-03-17 05:15:09 -07:00
Arun Kumar Khandavalli
c36e48e3bc qcacmn: Set the default value of vdev rsp_timer_inuse to 1
In the qdf infrastructure the default value used during
the atomic variable initialization is 0, during the flushing
of the vdev response timer during the SSR vdev rsp_timer_inuse
is read to understand whether the timer is initialized or not.
Since the default value is 0 the vdev response timer is not
flushed resulting in different memory leaks.

To resolve this issue, increment the rsp_timer_inuse value
to 1 during the vdev response time initialization.

Change-Id: Ibe47d1175f19b4c62cd5a18cda8b56370b58128a
CRs-Fixed: 2642476
2020-03-17 05:14:52 -07:00
Pavankumar Nandeshwar
9b0c1271ed qcacmn: Initialized pdev id with default value 0xFF
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.

Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id

Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
2020-03-17 03:11:13 -07:00
Amruta Kulkarni
2eb8560c88 qcacmn: Set default active dwell 2g time to 40ms for SAP
For SAP related scan (ACS,OBSS), set the active dwell time in 2G to 40 ms.

Change-Id: I5a34fc207ac281f5616e6071c66594f61451a512
CRs-Fixed: 2636152
2020-03-17 03:10:52 -07:00
Pavankumar Nandeshwar
9afaef18bf qcacmn: Assign soc to dp_pdev soon after allocation
Assign soc to dp_pdev soon after allocation, since the
soc pointer is required during deinit if pdev attach fails.

Change-Id: I87789deb82efe9f554b3310a904dd340c5eb9f7a
CRs-fixed: 2638378
2020-03-17 01:06:23 -07:00
Saket Jha
42f305e423 qcacmn: Avoid accessing invalid cookie rx_descriptor
Remove debug dump call to dp_rx_desc_dump() as cookie rx_descriptor is
invalid.

Change-Id: I106ebc2f872e43079abd6e6e493c90022fd09c3b
CRs-Fixed: 2638059
2020-03-16 19:55:12 -07:00
Mohit Khanna
c58bf56dae qcacmn: Use QDF_MODULE_ID_HAL for HAL tracing APIs
Currently hal_info, hal_err etc are using QDF_MODULE_ID_TXRX to print.
Since HAL is a separte module, use QDF_MODULE_ID_HAL.

Change-Id: I2345e1b333ef1f7a4808f5417657ac58da071475
CRs-Fixed: 2636911
2020-03-16 17:23:59 -07:00
Rhythm Patwa
78ddddb141 qcacmn: Add WMI support to enable injector frame cmd
Add corresponding WMI host param for enabling the
injector frame on the AP.

CRs-fixed: 2640751
Change-Id: I00a634375e0eafbacfd505aa39dce9c8d90804c6
2020-03-16 13:52:34 -07:00
Chaithanya Garrepalli
1da6b755af qcacmn: drop nbufs in WBM error with sa_idx out of range
In some cases we are seeing sa as valid and sa_idx out of
range. Drop nbufs in this case

Change-Id: I17c4ff41817a77f0eb8fcdf77fa17d4d3197f97b
2020-03-16 08:05:48 -07:00
Edayilliam Jayadev
49de9e2d3c qcacmn: Handle 80p80 and 160 MHz separately
Currently 160 and 80+80 MHz modes are handled together in
Spectral module. Differentiate between 160 and 80+80 MHz
to support new features like restricted 80+80
which are applicable only with 80+80 MHz.

CRs-Fixed: 2630729
Change-Id: I3e9fdd0e2d22a0bca7d37445df7fb1f1bab023c8
2020-03-16 08:05:34 -07:00
Vignesh Mohan
1d4f7736d3 qcacmn: Use frequency ranges for copying NOL after mode switch
Current NOL conversion for dynamic mode switch is in such a way
that the NOL data is copied to the pdev ID entry for the targeted
mode. That is, the NOL data is split/merged before mode switch and
copied to a temporary structure before mode switch command is
sent to FW.
At this point, the target pdev's frequency range are still the old
values because of which, certain entries of the NOL data are missed.
Also in case of FW failures, the NOL entry cannot be added back
because they have been merged/split already.

To avoid the above, rearchitecture deinit and reinit NOL for
mode switch in such a way that the NOL data, as-it-is, is copied
before mode switch and is only split/merged after the frequency range
of the pdevs are properly mapped and the FW response is a success.

Change-Id: I4a073d1327ba182c40ced6089aa46d8f5f241d33
CRs-Fixed: 2632582
2020-03-16 06:08:43 -07:00
Rakesh Pillai
f2e0f22bf7 qcacmn: Fix stack frame overflow for dp_rx_process
dp_rx_process stack frame has grown to exceed the
stack frame size of 4096. dp_rx_deliver_to_stack_no_peer
is a big function which should not be inline. Calling it
in other function increases the stack size consumed by the
caller function a lot.

Since dp_rx_deliver_to_stack_no_peer is not called very
frequently from dp_rx_process, changing its type to non-inline
function does not hit the core rx datapath much. Hence
change dp_rx_deliver_to_stack_no_peer to a non-inline
function.

Change-Id: Ib042f74c1f5a9cbe5fd947a24f004bb2fecf1fb1
CRs-Fixed: 2636365
2020-03-16 03:47:48 -07:00
Amir
252b67e048 qcacmn: Add HAL layer changes for full monitor mode
Add HAL layer changes for full monitor mode.

Define HAL API and Data structures to read sw_monitor_ring
descriptor.

CRs-Fixed: 2630982
Change-Id: I015fa106d9da74222bef092d50e96fc70a117a4a
2020-03-15 23:45:58 -07:00
Edayilliam Jayadev
4e5b760643 qcacmn: Enable 160 MHz Spectral scan in QCN9000
Till IPQ8074/IPQ8074_V2 each Spectral detector was capable of
doing scan up to 80 MHz. But in QCN9000 each Spectral detector
is capable of doing scan up to 160 MHz. As a result there will
be only one Spectral report in 160/80p80 MHz. Modify Spectral
Rx path to support single Spectral report in 160 MHz.

Change-Id: I9639cdc6adc6ad80e2769571b06d2a2021d699bc
CRs-Fixed: 2619544
2020-03-14 18:16:25 -07:00
Abhishek Singh
171ac51c1a qcacmn: Fix uninitialized RNR list and OOB memory access
Fix the case where RNR list can be used uninitialized and
fixed the OOB memory write access in 6Ghz BSSID and SSID hints
in scan req.

Change-Id: Ifc6a5f65876cd3ace744031bf59a3640409b63da
CRs-Fixed: 2637039
2020-03-14 12:45:45 -07:00
Lincoln Tran
a329901cca qcacmn: Add regulatory API to get country code
Implement function to allow regulatory code to get country code and source

Change-Id: I2713913ba212509e778229b3041363a32ca6049e
CRs-fixed: 2634077
2020-03-14 12:45:29 -07:00