提交線圖

10030 次程式碼提交

作者 SHA1 備註 日期
Shwetha G K
d11c7baf48 qcacmn: Update the cfr_metadata_len of cfr header
Update the cfr_metadata_len of cfr header

Change-Id: I85f0d4c1637b93608cebb77d6e8ea41b3d1cb713
2021-01-07 08:17:48 -08:00
Pragaspapthi Thilagaraj
d5cfa3829a qcacmn: Reduce excessive kmsg logging in roaming path
Reduce excessive data path logging to kmsg during roaming and
change the logging level for such prints to debug/info
high.

Change-Id: I1e6506de83e59a31304234905a3dd38f6d8b03f3
CRs-Fixed: 2848624
2021-01-07 08:17:44 -08:00
Karthik Kantamneni
dcba7b8baf qcacmn: Maintain counter for nbuf tracker nodes memory allocation failures
During nbuf free if entry is not found in debug tracker list
it is treated as double free or unallocated buffer free
which is not correct because there is possibility of nbuf
entry not being present in debug tracker list due to memory
allocation failures for tracker nodes in system low memory state.

Maintaian counter for nbuf debug tracker node memory
allocation failures, during nbuf free if entry is not found
in debug tracker list and tracker memory allocation failures
are present then don't raise issue for nbuf free.

Change-Id: I770cfc23bad35af7e7dbec34852a31cc68300ca5
CRs-Fixed: 2844059
2021-01-06 21:55:11 -08:00
Rakesh Pillai
f1aa992998 qcacmn: Pre-alloc rx rings history when feature is enabled
Currently the rx rings history is allocated dynamically
on load time. The memory requirement for saving these
history are more than a page (order 5 to 6 allocations).
Such big memory allocation can fail due to various
reasons, one of them being memory fragmentation.

Fix this by pre-allocating the rx ring history memory.
Also allocate the rx reinject history memory when the
HW accelerated path is used.

Change-Id: Id957cd5df91a2ca7f182dea691a0557b4e386f55
CRs-Fixed: 2844388
2021-01-06 21:55:07 -08:00
Jyoti Kumari
a7cc077a26 qcacmn: Fix out of bound read issue in util_scan_parse_rnr_ie()
During ie parse from beacon/probe response, the variable
tbtt_count and tbtt_length in util_scan_parse_rnr_ie() getting
read from ie and the value is not checked before using it which
may cause out of bound read issue

Validate tbtt_count and tbtt_length before using it

Change-Id: I51cfb2356fb16feda8a70c4b76c7f76c90b1393b
CRs-Fixed: 2836205
2021-01-06 21:55:03 -08:00
Liangwei Dong
22151e9f26 qcacmn: Iterate vdev with "Create" state check
Use safe API - wlan_objmgr_iterate_obj_list to enumerate
vdev. It will check vdev in "create" state by
wlan_objmgr_vdev_try_get_ref.

Change-Id: I650801c07846e22f1863925ed4316c0a24bd9cae
CRs-Fixed: 2849177
2021-01-06 21:54:59 -08:00
Wu Gao
f9ead26a48 qcacmn: Add dfs macros to avoid compilation issue
There is compilation issue since dfs macros only defined with
WLAN_COMP_CHAN_MODE. So adds related definitions for the case without
WLAN_COMP_CHAN_MODE.

Change-Id: I4b9f16b5000304157067be565864cc79c510770f
CRs-Fixed: 2848979
2021-01-06 17:58:05 -08:00
Edayilliam Jayadev
8c199ecfc5 qcacmn: Fix compilation error when Spectral is disabled
Fix the compilation error which occurs when Spectral
feature is disabled.

CRs-Fixed: 2847001
Change-Id: I133aff14cc069864ca5b4ce3bc9c5a225c2b0c05
2021-01-06 17:58:01 -08:00
Adil Saeed Musthafa
13f9b12f6a qcacmn: ini setting for strict-channel-mode
Introduce ini setting to enable or disable strict_channel_mode. When
this mode is enabled, driver will no longer implicitly select a
different channel (or phymode) if the user configures a phymode (or
channel) which the existing channel (or phymode) does not support. Also
with this mode, the user cannot change country at runtime, if the existing
channel/phymode combination is not supported in the new country.

Change-Id: I8e6246530df5d125a91068d513b436fe71f68e5a
CRs-Fixed: 2842892
2021-01-06 13:52:49 -08:00
Yeshwanth Sriram Guntuka
871c29e8f2 qcacmn: Set IPA WBM2SW ring HP to DDR addr on disable pipes
WLAN HW can still access the IPA tx doorbell address post
disable pipes if there are any pending tx completions which
could result in a NOC error.

Fix is to reset the WBM2SW ring HP addr to shadow addr in
DDR before pipes are disabled.

Change-Id: I52900eb34530388487923a887354ef8839d8c728
CRs-Fixed: 2846421
2021-01-06 13:52:45 -08:00
Chaoli Zhou
4096046a47 qcacmn: Fix OOB issue for bwnss oui
If is_bwnss_oui return true in util_scan_parse_vendor_ie,
and it will run into below logical:
scan_params->ie_list.bwnss_map = (((uint8_t *)ie) + 8)
But in fact if ie->ie_len < 6, it will casue read out
of boundary issue. So add the length chekcing before
reading it

Change-Id: I0cdf723154eb808f8062efd897f9d67d54d4573b
CRs-Fixed: 2838849
2021-01-06 11:44:29 -08:00
Abhishek Singh
a945925ad3 qcacmn: Add APIs to check roam substate state in connection manager
Add APIs to check roam substate state in connection manager.

Change-Id: I1c91e4e0bcb971d66bdf5d44af96d4049f991dfd
CRs-Fixed: 2847369
2021-01-05 22:34:30 -08:00
Shashikala Prabhu
3a7cf8ca4a qcacmn: Move WIN only wmi structures to qca-wifi-oss repo
Move WIN only WMI structures from cmndev repo to oss repo.

Change-Id: I1d11f5573385e687a4ec25531cb87432e198f4af
CRs-Fixed: 2847337
2021-01-05 20:28:27 -08:00
Kai Liu
d7c8cf6738 qcacmn: Fix wrongly used wmi hang data event/cmd log buffer
WMI cmd and event use different log buffer, when trace the hang
data, proper wmi buffer should be used according to API's parameter.

Change-Id: Ic87482e92600b2bb579347447388a791dc2ca563
CRs-Fixed: 2847223
2021-01-05 18:14:44 -08:00
Manikanta Pubbisetty
a5c11aabcb qcacmn: avoid FSE cache flush messages during runtime suspend
When runtime power management is enabled, until the system is fully
resumed, we do not post any message to CE, instead they will be queued
in HTC. Once the device is fully resumed, all HTT messages in the queues
will be downloaded to CE at once. In some corner cases, it is found that
too many FSE caches flush messages getting queued during the runtime
resume; once the device is fully resumed, all these would be downloaded
to the FW/HW at once causing unintended crashes.

Avoid posting FSE cache flush messages until the device is fully resumed
to fix the issue.

Change-Id: I2be21406e8c7a9dcd86df3e93c2568797defcad0
CRs-Fixed: 2843541
2021-01-05 18:14:39 -08:00
Jinwei Chen
f3a732ed1c qcacmn: Add function to get gso_segs from skb
Add qdf function to get gso_segs from skb.

Change-Id: I92eca7fb4adf6d08454f27469a62f4d16ff1072c
CRs-Fixed: 2846442
2021-01-05 16:13:19 -08:00
Linux Build Service Account
76e56576b2 Merge "qcacmn: Modify logs for QDF_MODULE_ID_MON_FILTER" 2021-01-05 03:37:18 -08:00
Linux Build Service Account
d8eea7c043 Merge "qcacmn: Reorder and optimize channel mode macros" 2021-01-05 03:37:17 -08:00
Shikha Bakshi
71477431f3 qcacmn: Modify logs for QDF_MODULE_ID_MON_FILTER
Add macros like dp_mon_filter_err, dp_mon_filter_debug,
dp_mon_filter_info, etc. to define logs.

Change-Id: I57ab964334fc079bbe9f9b57784be548eabd9aa1
2021-01-05 02:59:34 -08:00
Surya Prakash Raajen
21e219fe2f qcacmn: Reorder and optimize channel mode macros
Reorder channel mode macros to have macros in logical
order, and to optimize the channel modes to use
bit specific enums instead of single bit to reduce
the usage of number of bits. The changes are specific
to host

Example for Channel mode: IEEE80211_CHAN_HE20
Channel modes represents only the information regarding
to channel such as band, width, passive, DFS, blocked
40MHz_intolerant and so. It doesn't have information
regarding hwmode like 11ac,11ax.

CRs-Fixed: 2846331
Change-Id: I197de032a4d677a27b46028fa090a6eabe0c6086
2021-01-05 02:59:30 -08:00
Rajasekaran Kalidoss
9fc1e5f34b qcacmn: Add wake time absolute tsf value field in nudge command
In nudge response, FW sends wake TSF value. Implement changes
to handle wake TSF values.

Change-Id: I941f1dbab3ba83bba1f0b8e03b83d1b81365c7dd
CRs-Fixed: 2847181
2021-01-04 22:47:21 -08:00
Ashish Kumar Dhanotiya
48dee39efb qcacmn: Rate limit invalid channel number messages
Channel number can be invalid when finding out the enumeration for the
channel. Rate limit the messages for the same.

Change-Id: Ie6cf178482647547d58d4d9555763332d6598846
CRs-Fixed: 2843978
2021-01-04 18:46:29 -08:00
Ruben Columbus
60e9a2d116 qcacmn: add extra stats pdev and vdev lvl
stats added for descriptor alloc fail and tx outstanding too many

Change-Id: Ie2c676979f21e8f0ab217e8c666a8cdf3efbf7f1
2021-01-04 13:51:41 -08:00
Vevek Venkatesan
86f4aa6017 qcacmn: add sync between suspend and wow resume in runtime pm
In moselle, once wow enabled there is a possibility that wow wake
interrupt can be fired from FW during runtime suspend in-progress
in host, this will introduce a race between runtime suspend and
resume, so adding a synchronization between runtime suspend and
wow triggered runtime resume.

Change-Id: I38d6a24e4421697cc2d0090ba8d19884885596cb
CRs-Fixed: 2845672
2021-01-04 05:08:47 -08:00
Srinivas Dasari
82acedd149 qcacmn: Copy flags also when the 6g channels are sorted
Currently, 6g channels are sorted based on the weightage of each
channel. Frequencies are sorted but the flags associated to each
channel are not updated properly. So, channels carry invalid
flags to firmware and firmware may miss to scan few 6g channels
based on these flags and may scan few 6g channels unnecessarily.
Copy flags also while sorting frequencies to maintain the flags
of each channel as it is.
Also, change the type of phymode to enum scan_phy_mode
from uint32_t.

Change-Id: I0a2330faab1b738f2d7eff3d39ccbfffd51dfde0
CRs-Fixed: 2840029
2020-12-31 10:37:37 -08:00
Srinivas Dasari
865573d455 qcacmn: Possible buffer overflow while copying rnr info
A temporary variable "temp" is declared to use it while sorting
the channels based on the weightage/rnr info. This is declared
as a pointer to hold the reference of struct rnr_chan_weight but
memcpy is done to this without allocating memory.
Declare this as a variable instead of pointer to use it as an
intermediate variable for sorting.

Change-Id: If619f5fa462d5400f0a77e57317ac3c8debb34a5
CRs-Fixed: 2842819
2020-12-31 10:37:32 -08:00
Abhishek Ambure
2f21a68e2a qcacmn: Update bssid in cm request from cm_get_active_disconnect_req
To get active disconnect request host uses cm_get_active_disconnect_req
API. Update missed field BSSID into connection request from
cm_get_active_disconnect_req API.

Change-Id: I94fa3e14b4584b95b1d918390e5572fa8f112571
CRs-Fixed: 2846679
2020-12-30 11:24:50 -08:00
Karthik Kantamneni
c4845219dc qcacmn: Enhance debug info in rx descriptor
Add previously freed nbuf and buffer start address info in rx descriptor.
This helps in debugging use after free access of rx buffers.

Change-Id: I1c883bf049ce75dd0413b85946fe2982648d8004
CRs-Fixed: 2827151
2020-12-30 09:20:57 -08:00
Edayilliam Jayadev
9b98e19b51 qcacmn: Add Spectral disabled checks in some APIs
Add Spectral feature disable checks in some APIs
used by other modules.

CRs-Fixed: 2845252
Change-Id: I74d66da2aa85ab0f116ad1a6d2e859f3ee8eeeb9
2020-12-30 07:06:41 -08:00
Edayilliam Jayadev
c89f5e524d qcacmn: Fix return value of Spectral ucfg API
Return type of "ucfg_spectral_control" is QDF_STATUS.
Wrong return values are send for this APIs in case of errors.

CRs-Fixed: 2845251
Change-Id: I24f3beb44486753ad0eba706e9f2ac258067d82d
2020-12-30 07:06:37 -08:00
Edayilliam Jayadev
445c0a42c3 qcacmn: Fix return values of Spectral target APIs
Return type of "target_if_is_spectral_active" and
"target_if_is_spectral_enabled" is bool. Wrong return values
are send for this APIs in case of errors.

CRs-Fixed: 2845250
Change-Id: I2344676a1ada51e041bb5f7acac8aa22847bee5c
2020-12-30 07:06:33 -08:00
Edayilliam Jayadev
80a12b81ed qcacmn: Skip init/deinit/config if Spectral is disabled
If Spectral scan is disabled(agile and normal mode disabled)
skip init/deinit of Spectral module. Also avoid user requests
to configure/start/stop scan. If either agile or normal mode
is disabled block user requests for that mode alone.

CRs-Fixed: 2840335
Change-Id: I81148e5580fe4bf991b97cd086c8e3a9ca78e77d
2020-12-30 07:06:29 -08:00
Edayilliam Jayadev
b3affda43a qcacmn: Add APIs to check Spectral feature is disabled
Add utility APIs to check Spectral scan is disabled for
a given pdev/psoc/mode.

CRs-Fixed: 2840317
Change-Id: I6820cfc056c697434a138ddf9d8d93b5796a4722
2020-12-30 07:06:24 -08:00
Edayilliam Jayadev
3e679f9176 qcacmn: Add APIs to init Spectral feature caps in the upper layer
Add APIs to init Spectral feature caps in the upper layer of the
Spectral module.

CRs-Fixed: 2840249
Change-Id: Idfb34a9eec3a66c6d193be7bb828eeec30548ae7
2020-12-30 07:06:20 -08:00
Edayilliam Jayadev
19aaca7ff9 qcacmn: Add target if APIs to initialize spectral feature caps
Add target if APIs to initialize normal and agile Spectral
feature caps for a pdev.

CRs-Fixed: 2840247
Change-Id: I6c5385c2050007a5ff3f668ab3d6176328294549
2020-12-30 07:06:16 -08:00
Edayilliam Jayadev
dac2af9a3b qcacmn: Add APIs to get Spectral scan capability
Add APIs to check the agile and normal Spectral scan
capability of the target. This information is derived from
the advertisements from halphy via WMI events.

CRs-Fixed: 2840227
Change-Id: I2aae79b3342d8d74a1f4c00e813cae843a71106a
2020-12-30 07:06:12 -08:00
Edayilliam Jayadev
8f57245a44 qcacmn: Add Spectral feature capabilities
Add the following Spectral scan capabilities at the pdev level.
 a) Normal Spectral scan capability
 b) Agile Spectral scan capability for 20/40/80 MHz
 c) Agile Spectral scan capability for 160 MHz
 d) Agile Spectral scan capability for 80+80 MHz

Also change the definition of existing Spectral scan capability
at psoc level.

CRs-Fixed: 2840144
Change-Id: I18be48ec4095fa29b62800a9df58b72295747547
2020-12-30 07:06:08 -08:00
Edayilliam Jayadev
b3e677f722 qcacmn: Add WMI API to Spectral module's interface
Add WMI API "wmi_service_enabled" to Spectral module's
interface.

CRs-Fixed: 2840141
Change-Id: I2cb6363fd37c858f2a84ba1904c89033720d1a0a
2020-12-30 07:06:04 -08:00
Edayilliam Jayadev
962647ba6c qcacmn: Add "Spectral disable" WMI service bit
Add a new WMI service bit to indicate whether normal
Spectral scan is disabled.

CRs-Fixed: 2840128
Change-Id: I09314afeb5372f83b8356e06f245c83c7acbc85d
2020-12-30 07:06:00 -08:00
Bapiraju Alla
00678d250a qcacmn: Don't consider WMI_MIN_HEAD_ROOM in WMI msg length
Currently, Host driver assumes WMI_MIN_HEAD_ROOM is part of WMI
messages and Validations are done accordingly. But this
WMI_MIN_HEAD_ROOM is not considered in the firmware. Because of
this host may drop valid events.

To avoid this, Don't consider WMI_MIN_HEAD_ROOM while validating WMI
msg length.

Change-Id: I5f1fe12cfae570e636defb8a4a46ec154f988195
CRs-Fixed: 2844982
2020-12-29 15:49:55 -08:00
Rakesh Pillai
4138c9b7d8 qcacmn: Add API to set dma mask for device
Currently DMA mask for the device is set during hif_enable_bus.
If the datapath memory prealloc feature is enabled, there are
a few dma memory allocation which is done before the DMA mask
is set for the device. This leads to the aforementioned dma
memory pre-allocation to be attempted at the default DMA mask.
Due to this the entire device capability of dma address might
not be used.

Add hif api to set dma mask before hif is initialized. This
is needed to set dma mask in case of datapath memory pre allocation.

Change-Id: I6fd25d9cb6ab3aaacd6f959abe4e060e23f37095
CRs-Fixed: 2845020
2020-12-29 11:05:45 -08:00
Jeevan Kukkalli
ab63a2735b qcacmn: Include ALD headers
Include ALD core headers

Change-Id: I1b1e074a1615597b1bf166f28be768e5d82510b5
CRs-Fixed: 2844914
2020-12-29 03:16:13 -08:00
Amir Patel
76b9febd3d qcacmn: Delay allocation of rings for monitor mode
In existing implementation, for monitor mode below allocation
are done at pdev attach and init time.

	a. 64 monitor buffer allocation for RxDMA monitor buffer ring
	b. Link descriptor memory allocation for monitor link descriptor ring

This memory is waste of memory for customers not using monitor mode and
low memory profile.

To optimize this memory, allocate all buffers and link descriptor memory
at monitor vdev creation time.

Change-Id: I873c76d2f625a782532a101037915b0353928a5b
CRs-Fixed: 2829402
2020-12-29 03:16:09 -08:00
Santosh Anbu
d36905a34a qcacmn: Add null check for connect request bssid
Add null check for connect request bssid before copying the previous
bssid.

Change-Id: I5b674d99923335673cbcc3ddcbbbc4a6940bad47
CRs-Fixed: 2845808
2020-12-28 23:00:47 -08:00
Vulupala Shashank Reddy
86566328a2 qcacmn: Add WDI event for offload tx data for packet capture mode
Add WDI event and call wdi event handler to deliver offload tx
packets to packet capture mode.

Change-Id: I064ffaaebd13bcf2060d91c58a07b93ec741b133
CRs-Fixed: 2844731
2020-12-28 17:17:45 -08:00
Shikha Bakshi
84bbeeedec qcacmn: Rectify MODULE ID in display for qdf_cv_lvl
Rectify dispaly module ID for QDF_MODULE_ID_DP_RX_MON_DEST

Change-Id: I6aee8c38d67aad1a6a97325d2e9f1a16e1f4fbdd
2020-12-28 15:13:22 -08:00
Shiva Krishna Pittala
8f4dceb4bc qcacmn: Direct Buf Rx changes to support big-endain platform
Use the hal_srng APIs that handle byte-order conversion of ring pointers
for big-endian platforms.

Change-Id: I2664636d5d2a1abfd7b643ea4c4d63d328a9880f
CRs-Fixed: 2845047
2020-12-28 13:07:06 -08:00
Shiva Krishna Pittala
d692460e35 qcacmn: Add HAL srng access APIs that handle endianness conversions
Current implementation of hal_srng_access_start() reads the ring pointer
in the same byte-order as it is written by the target. This results in
byte-order mismatch on a big-endian Host because the WLAN target is
little-endian based. For most of the srngs, the target already takes of
this by converting the ring pointer to the host-order before writing to the
DDR. But for other srngs, the Host needs to handle the endianness
conversions. Add HAL APIs to do the same.

CRs-Fixed: 2844519
Change-Id: Ieb47391ac0acc3724e854f433915dd5b1219bebe
2020-12-28 13:07:03 -08:00
Himanshu Batra
6df2698a64 qcacmn: Notify kernel if connect fails after cfg change
Notify kernel if connect fails after cfg change

Change-Id: I7cdf9adf5452204411566bd7ac52d67dcbe35481
2020-12-28 13:06:58 -08:00
Vignesh Mohan
d32051f608 qcacmn: Replace radar checks to use regulatory channel list
In DFS, to check if a channel is radar, we use the flags that
are filled from UMAC to check for radar. Since the channel list
in UMAC are dynamically calculated, the dynamic flags will not be
consistent over multiple channel pointers.

Use the radar information in regulatory for individual subchannels
to check for radar in a given channel. Define these new APIs
under a feature specific macro.

Change-Id: I7f86560c3d29d2366c6506ccf63204263cbc0ef1
CRs-Fixed: 2841168
2020-12-28 10:57:47 -08:00