Commit grafiek

7021 Commits

Auteur SHA1 Bericht Datum
Vevek Venkatesan
02c9164668 qcacmn: featurize PKTLOG send cmd under feature flag in WMI layer
Featurize PKTLOG cmd handle under feature flag FEATURE_PKTLOG
as part of CONFIG_MCL cleanup.

Change-Id: Iae8c7e7caad001d7d37a8e17c1eb892f96009066
CRs-Fixed: 2467198
2019-06-20 08:45:46 -07:00
Vevek Venkatesan
735d9fedfc qcacmn: CONFIG_MCL cleanup in HAL layer
CONFIG_MCL cleanup in cmn driver HAL layer.

Change-Id: I1fa4657a8ffa87d571157e635ecedf8e8af0bf07
CRs-Fixed: 2467203
2019-06-20 08:45:43 -07:00
Ashish Kumar Dhanotiya
bf9d06fab1 qcacmn: Use vzalloc instead of vmalloc
Currently driver is using vmalloc to allocate the memory
inside dbglog_block_read api and this buffer is copied to
userspace buffer which may lead to use of uninitialized
buffer.

To avoid above issue use vzalloc to allocated the buffer
which initializes the memory to zero.

Change-Id: Iebc530b000c908231ef8718e79054801d294dd8f
CRs-Fixed: 2470385
2019-06-19 10:33:09 -07:00
Jinwei Chen
e1ffcf089e qcacmn: fix monitor packets radiotap channel incorrect issue
The channel number is always 0 from HAL RX PPDU TLV, then monitor
mode frames radiotap channel frequency is always 2407, get the
correct channel number that we saved when set monitor channel.

Change-Id: Ib927fe9aca3a4c1f98845fe37c9b1d37d1d6cf5a
CRs-Fixed: 2471161
2019-06-19 10:33:06 -07:00
Ashish Kumar Dhanotiya
4600ab56ad qcacmn: Remove multiple definitions of __qdf_nbuf_free api
There are multiple definitions of __qdf_nbuf_free api based
on CONFIG_MCL feature flag.
As a part of cleanup activity remove multiple definitions
of __qdf_nbuf_free api.

Change-Id: Ib7fce54353561a45a4662c05d56d3af187a269e1
CRs-Fixed: 2472016
2019-06-19 00:42:45 -07:00
hangtian
04f0ad4935 qcacmn: Set stop_th and start_th for QCA_LL_PDEV_TX_FLOW_CONTROL
Use same stop_th and start_th as QCA_LL_TX_FLOW_CONTROL_V2 for
QCA_LL_PDEV_TX_FLOW_CONTROL which allows pausing/unpausing
netif queues to avoid frame drop in driver.

Change-Id: Ifa649e31a41d1bf89eadc8cc7e9520f0e27b9fe4
CRs-Fixed: 2466999
2019-06-18 22:27:45 -07:00
Ashish Kumar Dhanotiya
f8ddbe1707 qcacmn: Remove unused QDF_DEFAULT_TRACE_LEVEL macro
QDF_DEFAULT_TRACE_LEVEL macro is not getting used in case of
MCL, as part of cleanup of CONFIG_MCL macro dependency,
move this macro definition to correct WIN specific
feature flag.

Change-Id: I75cbfd856308f0027ecb805a41c15966528f314e
CRs-Fixed: 2468286
2019-06-18 22:27:42 -07:00
Vivek
030ffadb08 qcacmn: Free srng buffer only when allocation is successful
In srng setup, we set srng alloc size, and allocate memory
for srng buffers.
Even if allocation fails, srng alloc size is set,
which is done even before the allocation is attempted.

In srng clean up path, we attempt to free the memory,
since srng alloc size is set,
but for which allocation had failed,

Instead, when freeing srng buffers, check if we have
a valid address also for srng buffer and then free,
instead of checking srng alloc size only.

Change-Id: I1f2de526e27b7b8d97535bf4c2235c82ffd3ce5f
CRs-Fixed: 2452219
2019-06-18 12:25:57 -07:00
Varun Reddy Yeturu
f31e44d8dc qcacmn: Fix memory allocation failure for nbuf pointers
Fix memory allocation failure for nbuf pointers array in
dp_pdev_rx_buffers_attach(), by allocating a single page
of memory for the pointers and re-using them by iterating
in a loop until the total required nbuf's are traversed,
instead of allocating a huge contiguous memory for pointers
to store the address locations of all the nbuf's.

Change-Id: I47ca8f94405e44d6bdbc43129012df1b65b14ba6
CRs-Fixed: 2464598
2019-06-18 12:25:53 -07:00
Tallapragada Kalyan
ae7baa998f qcacmn: disable cached descriptor support if NSS is enabled
disable cached descriptor support if NSS is enabled

Change-Id: If0eee42dc07947944e39ef6d98de271ce79419ac
2019-06-17 18:24:34 -07:00
tinlin
6aa719f513 qcacmn: Correct state in reg_populate_band_channels
Regulatory channel state is mistaken as chan_flags.
Set regulatory channel state to CHANNEL_STATE_DISABLE.

Change-Id: I72dd40bb3a7690e0156f72008ad29d209e93ce29
CRs-Fixed: 2461403
2019-06-17 13:00:57 -07:00
Jeff Johnson
23e26381c0 qcacmn: Rename OSIF logging macros
The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.

Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
2019-06-17 13:00:54 -07:00
sheenam monga
d897403241 qcacmn: Fix null scan object dereference in ucfg
Currently, ucfg_scan_register_pno_cb and ucfg_scan_get_scan_id
do not do null validation for scan object which can lead to null
pointer dereference. wlan_psoc_get_scan_obj_fl returns null in case
of invalid component id or null psoc and that null scan object is
dereferenced due to missing null validation.

Add null pointer check for scan object in ucfg_scan_register_pno_cb
and ucfg_scan_get_scan_id. Return zero scan id from ucfg_scan_get_scan_id
in case of null scan object.

Change-Id: I1aa1bdee001cace34e22ca11014455a0c7bcc462
CRs-Fixed: 2468518
2019-06-17 13:00:51 -07:00
sandeep puligilla
370e41c760 qcacmn: Create vdev rsp wakelock api in target if
Currently, wakelock apis are in wma. Create vdev resp wakelock apis
in target_if. Plan is to remove it latter from wma.

Change-Id: Ib410ee2404751544db2f291b466ff0d6ff248e8f
CRs-Fixed: 2441245
2019-06-17 11:45:04 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
jiad
a833f30506 qcacmn: Properly map RX buffer pool to IPA SMMU domain
Currently for WDI 3.0, IPA runtime enablement is done in the
way that dp_ipa_enable_pipes API is first invoked and followed
by dp_ipa_enable_autonomy API. With SMMU S1 enabled, RX buffers
are mapped to IPA domain in dp_ipa_enable_autonomy. However RX
buffers could be provided to IPA once after dp_ipa_enable_pipes
and this could lead to possible SMMU fault.

Fix is to map RX buffers to IPA domain before dp_ipa_enable_pipes
API.

Change-Id: Ifdad2db6fa26da06a91b84de8f8603cbc779dd67
CRs-Fixed: 2467966
2019-06-17 06:23:28 -07:00
Bala Venkatesh
3b0dee841a qcacmn: Add a QCA vendor attr to disable auto resume beacon reporting
The driver automatically starts beacon reporting if it pauses the beacon
reporting for any reason other than disconnection. In specific cases,
userspace may not want the beacon reporting to be automatically resumed
after a pause. Add interface support for userspace to specify driver not
to start beacon reporting automatically after a pause.

Change-Id: Ia649bc7c7bd7dfe2ae106daecfaf96368151f89b
CRs-Fixed: 2471641
2019-06-17 02:18:28 -07:00
Tallapragada Kalyan
cea9c935f9 qcacmn: Do not check for msdu Done bit for raw packets
Do not check for msdu Done bit for raw packets as HW
does not set this bit for msdus spread across nbufs.

Change-Id: I9c2af01c6b55600511abeec9ab6fc185fcc6ef36
2019-06-17 02:18:25 -07:00
Mohit Khanna
3ba9372a50 qcacmn: Fix invalid sa_da_idx condition in RX path
Currenly this function, is_sa_da_idx_valid(), called from dp_rx_process
does not take MC/BC packets into account. For broadcast packets e.g.
DHCP offer packets from some APs, this check may fail (incorrectly).
Thus dropping the broadcast packet, when it should have been passed
on to the stack.

Fix is_sa_da_idx_valid function by taking MC/BC packets into account.

Change-Id: Ibbb34134e997e0d5394dfa654be84b9fa43434a3
CRs-Fixed: 2466839
2019-06-15 20:55:03 -07:00
Tallapragada Kalyan
f3af8bb319 qcacmn: unmap raw mode nbufs in failure cases
currently we are not unmapping the nbuf which was
already mapped in dp_tx_raw_prepare in failure cases
We always need to unmap and free the nbuf if its mapped.

Change-Id: Ia5e6a31a7aac356a934ff2496d0542039bc3ece7
CRs-Fixed: 2462518
2019-06-14 18:19:45 -07:00
Kai Chen
e0dd94dd4c qcacmn: Add user id range check to prevent out of range access
A random crash may be caused by out of range access. Add MU
user id check to prevent out of range access.

Change-Id: I531d6c03024c4a6af4e0db97ea00d0874aaef387
2019-06-14 16:23:38 -07:00
Ashish Kumar Dhanotiya
034a01be32 qcacmn: Fill valid channels on oem caps user request
Currently when user request comes to populate oem
capabilities, driver is populating all the channels which
includes disabled channels also and the logic to populate
the  channels is incorrect. This is resulting in invalid
channel configuration for user space command.

To avoid above issue, use correct api which returns only valid
channels and valid number of channels and populate the channels
correctly in the output buffer.

Change-Id: Ib239d5d869ca9d010c85f444b83751d2e121625d
CRs-fixed: 2470193
2019-06-14 14:20:58 -07:00
Rakesh Pillai
56320c1e4d qcacmn: Fix calculation of getting head/tail pointer
The current calculation of head/tail pointer for
srng gives an index in the array by skipping
entry_size dwords.
The head/tail pointers are preffered to be the
index values like in the srng registers, which
brings them in alignment with the other usage of
head/tail pointers.

Fix the calculation of head/tail pointers for srng
by avoiding the division by srng entry size.

CRs-Fixed: 2469332
Change-Id: If9a167f3fac3cb39ebe59618e9ad2224d9e54bcc
2019-06-14 12:58:31 -07:00
Edayilliam Jayadev
7c72252ec8 qcacmn: Free outstanding skbs on Spectral detach
While detach if there are any outstanding skbs free them.

CRs-Fixed: 2470780
Change-Id: Ic9ee568a1af96b2535cc2a30747ac8e5190e1be6
2019-06-14 12:58:27 -07:00
gaurank kathpalia
543c9b4909 qcacmn: Filter the channel list according to acs cfg
Currently the driver checks whether the DFS channel is
in the range of acs channel list given, i.e the start
and end channel, which is not always correct as the channel
range does not imply that all channels in that range are present.

Fix is to explicitly check for the number of channels, and
compare each channel in the acs channel list with the DFS
channel.

Change-Id: Ib17c5e549a2c62652a6333d5d13ca8ff5a7b1674
CRs-Fixed: 2466228
2019-06-14 12:58:24 -07:00
Shashikala Prabhu
5d8eb1544a qcacmn: Increase the number of entries in CE2 ring from 32 to 512
Target assert seen due to host was not reaping the buffers. Therefore,
increase the CE2 entries from 32 to 512 for regular profile build.

Change-Id: I6160ecb070bb98dba0d858f2bef3522ad0b60aa3
CRs-Fixed: 2462117
2019-06-14 10:21:13 -07:00
Mainak Sen
7258660417 qcacmn: Disable print FW Dropped byte in offload
Disable printing TX FW remove byte counter for NSS offload mode

Change-Id: I44cd80a4d07082f91cfdbfff9a9bc94d4c31bb86
2019-06-14 10:21:10 -07:00
Shashikala Prabhu
f7b7f5e929 Revert "qcacmn: Reduce WMI max message size on low mem profile"
This reverts commit Change-Id: Icb25be0f4ce60112ef6293f39f9dcc57ebc0288c.

CE2 pipe source ring size is configured as 1700 bytes in LM build where
2048 bytes in regular build. WMI msg size is always hard coded in FW to
2048 bytes in both build. WMI/QMI Pipe configuration is not matching.

Revert CE2 pipe configuration to 2k in the LM build temporarily till FW
updates wmi msg size based ring size configuration.

Change-Id: I2b66097ff9aa23c49fa77fa78b865828f244d108
CRs-Fixed: 2457381
2019-06-14 10:21:07 -07:00
Vivek
140070028c qcacmn: Avoid adding cmd to serialization queue if disabled
Add API to fetch the vdev queue status and avoid enqueueing command
to serialization queue if the vdev queue is found to be disabled

Change-Id: If615b07dceaeb3113592f24355f254c8e70ca8a2
CRs-Fixed: 2470208
2019-06-14 07:41:05 -07:00
Amir Patel
420a8d3c6d qcacmn: Add bss peer check for rate stats flush request
To avoid flushing bss peer rate stats, add bss peer check
for rate stats flush request

Change-Id: If69ec38efca2b447f3fafa080bafae75017e50fc
2019-06-14 06:15:33 -07:00
Min Liu
b218312e75 qcacmn: Fix interop VHT vendor IE parse error
Currently when parsing interop VHT vendor IE, it will have OOB
read when only VHT cap IE is present.

Try to read VHT op IE only when it is present.

Change-Id: Id1919a0ed1df56ecef54d6cb663c10cbcae5065f
CRs-Fixed: 2453071
2019-06-14 01:49:57 -07:00
guangde
ad4eded14b qcacmn: Get BT/WLAN isolation for mainline
Propagation from qcacld2.0 to qcacld3.0.
The WMI CMD and EVENT of "get antenna isolation" are already defined,
but not used before in qcacld3.0.
Now, The host driver uses vendor command to get this information
instead of iwpriv command in qcacld-2.0.
The attribution of this feature is already defined in file
"qca_vendor.h". The name is "QCA_WLAN_VENDOR_ATTR_ANTENNA_ISOLATION".
So host driver will use vendor command
"QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY" to get the information
from lower layer.
Change-Id: I915768f622ddc9a70a95ce4fe952f19917a8f901
CRs-Fixed: 2447363
2019-06-14 01:49:54 -07:00
Yue Ma
3c3406e67e qcacmn: Remove tagging DTIM related commands for runtime PM
DTIM related commands do not have to be sent with WOW sequence as
they are able to be sent from other paths during runtime PM suspend
or resume, hence remove their runtime PM tagging. Besides, also tag
HPLB WMI_HB_SET_ENABLE_CMDID command for runtime PM.

Change-Id: Ib6cc8a9b8296dbba4d9e9017cfa75856cc9a29c9
CRs-fixed: 2469489
2019-06-13 15:50:56 -07:00
Varun Reddy Yeturu
a0bb4d6ec1 qcacmn: Free the Rx descriptor pool in error case
Free the Rx descriptors pool if there is a failure
in allocating memory for nbuf during
dp_pdev_rx_buffers_attach()

Change-Id: If4fcfcfdc2fe70c8c4753518ca020a7d8b0bd2b5
CRs-Fixed: 2464596
2019-06-13 13:56:27 -07:00
Qun Zhang
15febb0d0e qcacmn: Update the LF copyright years as 2018-2019
Previous commit Ia767643b51ffc780258e1d2fd0cd6a8a9e222ae2 wrongly
updated LF copyright years to 2019, keep the LF copyright years
as 2018-2019.

Change-Id: I214555e7deeea2fa3ab3a55af4c868538d5dd72f
CRs-Fixed: 2464759
2019-06-12 23:16:57 -07:00
Shiva Krishna Pittala
efbe2e9b3e qcacmn: Add QCA vendor attributes for configuring Spectral DMA debug
Add the following vendor attributes under the enum
qca_wlan_vendor_attr_spectral_scan to support the configuration of
Spectral DMA debug.

1. QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_DMA_RING_DEBUG
	Enable/disable debug of the Spectral DMA ring
2. QCA_WLAN_VENDOR_ATTR_SPECTRAL_SCAN_CONFIG_DMA_BUFFER_DEBUG
	Enable/disable debug of the Spectral DMA buffers

CRs-Fixed: 2466432
Change-Id: If61ecb085534cbde5410c5a2b91aa1922579d902
2019-06-12 21:38:21 -07:00
Akshay Kosigi
38d66845c8 qcacmn: Add change to remove CONFIG_WIN macro
Add code to remove CONFIG_WIN macro from common UMAC's
DFS module

Change-Id: Iaa1a5d17d202733003c4be943c0995795d8dc86e
CRs-Fixed: 2458658
2019-06-12 20:04:18 -07:00
Santosh Anbu
f7b253f5e2 qcacmn: Fix to release vdev reference on cmd dequeue
Add change to release vdev reference only on successful removal
of active cmd from serialization active queue.

Change-Id: I2e14f7f53dc38388cdd05f029edc9329f9dd86a7
CRs-Fixed: 2463724
2019-06-12 20:04:15 -07:00
Akshay Kosigi
fb0877f2d6 qcacmn: Use module specific kbuilds for config params
write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.

Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
2019-06-12 20:04:12 -07:00
Varun Reddy Yeturu
83a31a34b0 qcacmn: Add debug log in dp_tx_delete_flow_pool
Add debug log in dp_tx_delete_flow_pool() to know if
all available tx descriptors have been released to the
pool or not

Change-Id: Id0684effd5c5c0b531bb2d4b3f08d929aaa85b5c
CRs-Fixed: 2463632
2019-06-12 17:46:01 -07:00
Amir Patel
1d4ac98ffe qcacmn: Add rssi_chain support for lithium
Read rssi_chain per nss per bw and from rx status TLVs
and update to host data structures.

CRs-Fixed: 2445933
Change-Id: I275e9e502a0a724410fc189ac293cadc8f2981e0
2019-06-12 17:45:57 -07:00
Nirav Shah
dd382b0d49 qcacmn: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I7621603b925e0762ef474c92e7b5cce641ceeefe
CRs-Fixed: 2468439
2019-06-12 16:15:08 -07:00
Ajit Pal Singh
cd43faa16b qcacmn: Use highprio work queue
Use highprio system workqueue instead of normal work queue for
USB io_complete_work.
This is to avoid latency for receive and TX complete processing.

Change-Id: I34859a748b607d633b4905b3f06e3345029d4cba
CRs-Fixed: 2456887
2019-06-12 02:49:08 -07:00
Keyur Parekh
d9b917022c qcacmn: Added new WMI vdev param support
New WMI vdev param will be used to send
MAX MTU size to firmware.

CRs-Fixed: 2467047
Change-Id: Ib6d0fb4e6782247900d5338f182c4424ea183410
2019-06-12 00:41:38 -07:00
Tushnim Bhattacharyya
21169b7e07 qcacmn: Reduce log level for stats message
Reduce log level from error to debug because a stats event can be
received unsolicited.

Change-Id: I11f3800594c6d623e72a214d832caa29666565a8
CRs-Fixed: 2466944
2019-06-11 09:51:00 -07:00
Aditya Sathish
fa7c2ea97e qcacmn: Add 165MHz support to wmi_host_channel_width
Add 165MHz support to wmi_host_channel_width to keep in accordance
with the wmi_channel_width structure in wmi_unified.h

Change-Id: Ib8aea0bc725a1c43b8fb7510cf86da4633143f69
CRs-Fixed: 2463171
2019-06-10 09:15:52 -07:00
Vevek Venkatesan
f48333d03b qcacmn: Remove WCSS_VERSION macros used inside hif
Remove WCSS_VERSION macros which were used for emulation inside
HIF in cmn driver.

Change-Id: I3e7ea5fb795e0cb9dd8c2bc718d8b523e442109d
2019-06-10 09:15:48 -07:00
Amir Patel
70f3c3001b qcacmn: Update Access category stats only for data TIDs
Currently AC stats are getting updated for data tid as
well as non-data tid. Add check to update stats only for
data tids

CRs-Fixed: 2455781
Change-Id: I69d7a11f0101a5c3c6c7e5b0df3e190437990188
2019-06-10 07:28:19 -07:00
Surya Prakash Raajen
b5ff47a32a qcacmn: Clean up of CONFIG_MCL and memory optimisation
Clean up of CONFIG_MCL and optimise memory of peer_assoc_param
structure by use of bit fields instead of bool type

Change-Id: I4b06af69b7fd9af981a250c881d163ddb1f68fa7
CRs-Fixed: 2450763
2019-06-10 07:28:15 -07:00
Amir Patel
f0fa2f5beb qcacmn: Compute client inactive time from last one second tx/rx activity
If client is having non-zero tx/rx packets in last one second,
reset inactive time to zero, else increment inactive time.

Change-Id: Ie25fb43adec252e93ebc1bb1a7aa0fa207e7af1e
2019-06-10 04:11:34 -07:00