Commit Graph

686 Commits

Author SHA1 Message Date
Jeff Johnson
40d289ec79 qcacld-3.0: Remove macro HTT_TX_DESC_PADDR()
Macro HTT_TX_DESC_PADDR() is unused. Furthermore, it references
tx_descs fields which do not exist. Since it couldn't possibly be
used in its current form, remove the macro.

Change-Id: I62b2d7bc3291ba6c2dc486196076827cfc22d8ec
CRs-Fixed: 2375421
2019-01-07 08:47:15 -08:00
Sravan Kumar Kairam
f48210cb66 qcacld-3.0: Add cdp api for dp tx desc availability
Add cdp api to check if tx desc pool available descriptor
threshold has reached.

Change-Id: I12cc38b56a68ca7ee8f4560677fcdabccb38928b
CRs-Fixed: 2369244
2019-01-07 00:07:14 -08:00
hangtian
06a41355e6 qcacld-3.0: Discard msdu and do not try to access vdev and vdev->pdev
Discard msdu and do not try to access vdev and vdev->pdev, because in
some cases, vdev or vdev->pdev is already freed, but some packet just
received right after wmi vdev delete command is sent.

Change-Id: Ia38768d800da97e361ffa1688ce53c25be6cd597
CRs-Fixed: 2372557
2019-01-01 23:28:20 -08:00
Rakshith Suresh Patkar
c107967468 qcacld-3.0: Use new accessor macro for map_index in qdf_nbuf_cb
The existing accessor macro NBUF_MAP_ID is obsoleted due to
restructuring of qdf_nbuf_cb.

Use new macro QDF_NBUF_CB_RX_MAP_IDX to access map_index.

Change-Id: I23650781cdd770f25b72a0a5fe55acc12d71cb64
CRs-Fixed: 2370724
2018-12-23 21:58:36 -08:00
Alok Kumar
6f20e30949 qcacld-3.0: Avoid rx_ring.refill_debt count to become negative
Here rx_ring.refill_debt can become negative if filled count
returned from htt_rx_ring_fill_n() exceeds the rx_ring.refill_debt.

This is possible because inside htt_rx_ring_fill_n() we always refill
num = qdf_atomic_read(&pdev->rx_ring.refill_debt). Here we do not take
care of already served debt.

Taken care of above by subtracting debt_served from refill debt.

Change-Id: I0c154c978b711da2d8497c50f730619767787188
CRs-Fixed: 2365566
2018-12-21 02:40:32 -08:00
Mohit Khanna
8141877926 qcacld-3.0: changes for GRO for TCP packets
Add support for GRO functionality for TCP packets.

CRs-Fixed: 2346997
Change-Id: I9d38c926af4114e90427f5b5c632cd02b9eb3160
2018-12-18 00:07:46 -08:00
Jeff Johnson
ba0773ae95 qcacld-3.0: Remove ol_params.h
Change Ifbb38adba434aa19fade4838e30d39884b6e4615 ("qcacld-3.0: Remove
unnecessary includes from ol_if_athvar.h") removed the only place
where ol_params.h was referenced. Since this file is unused, remove
it.

Change-Id: I8c0e5335f30a0307e7ebac5d33828db41bb8156d
CRs-Fixed: 2366966
2018-12-17 13:12:01 -08:00
Jeff Johnson
c44540a879 qcacld-3.0: Remove unused htt_fw_stats macro ROUND_UP_TO_4
Macro ROUND_UP_TO_4 in htt_fw_stats.c is unused, so remove it.

Change-Id: I2aea830bee4d9e40546a02ee8715995e662cbeb2
CRs-Fixed: 2366962
2018-12-17 13:12:01 -08:00
Chaoli Zhou
50bc9ad9e8 qcacld-3.0: Fix build error at SDX24.le.1.7 platform
Fix 'for' loop initial declarations are only allowed in C99 or C11 mode
build error at SDX24.le.1.7 platform.

Change-Id: I08cc4ee7558f0b390a8c848828272497f517ef08
CRs-Fixed: 2365266
2018-12-14 12:48:29 -08:00
Rakshith Suresh Patkar
9c46af1764 qcacld-3.0: Add support to dump last n dpt stat records
Add an argument to dump only last n dpt records of debug fs
dump_set_dpt_logs file.

Change-Id: I6ce96d1e57db773386e8ebc29436b33b2211a94f
CRs-Fixed: 2362507
2018-12-14 07:15:02 -08:00
chenguo
2201c0ae46 qcacld-3.0: Fix NULL VDEV pointer during register in monitor mode
After gerrit#2436786(which the Change-ID is
Ie64a05d795660d557d928cb9b874fa5e702f4f55), vdev in monitor mode
is removed from vdev list of pdev. So it is needed to use the new
cdp api, which is cdp_get_mon_vdev_from_pdev instead of
cdp_get_vdev_from_vdev_id in monitor mode to register vdev.

CRs-Fixed: 2350720
Change-Id: Idd36cdb09666783db2042f77708be4dcc6b9d82b
2018-12-14 05:34:50 -08:00
Jeff Johnson
e2e0e337eb qcacld-3.0: Remove ol_ctrl_addba_api.h
The definitions in file ol_ctrl_addba_api.h are unused, so remove the
file and remove the #include directive in the one place it appears.

Change-Id: I9056791b1a21dc8c8e113db2d49468e3abafab34
CRs-Fixed: 2364105
2018-12-11 10:18:26 -08:00
Alok Kumar
8df4c76c58 qcacld-3.0: Set self_peer to NULL in monitor mode if ref cnt is 0
In monitor mode, pdev->self_peer is not updated before deleting the
peer in ol_txrx_peer_release_ref when peer ref_cnt becomes 0. This
leads the stale peer stored in pdev->self_peer. The pdev->self_peer
is not updated during peer creation due to this stale peer.

Update the pdev->self_peer to NULL when peer ref cnt becomes 0

Change-Id: Id09771a1a7c5a363cf3251af829ac8ff50d38a5b
CRs-Fixed: 2356492
2018-12-11 01:42:56 -08:00
Jeff Johnson
58894a1df3 qcacld-3.0: Remove PERE_IP_HDR_ALIGNMENT_WAR feature
The PERE_IP_HDR_ALIGNMENT_WAR feature does not apply to hardware
supported by this driver, and the code would not build correctly
if the feature was enabled, so completely remove the feature.

Change-Id: I4697e798dc57ab7e51c88d40e4d0f9a26a98de6d
CRs-Fixed: 2363232
2018-12-10 20:20:47 -08:00
Jeff Johnson
8feaa63728 qcacld-3.0: Remove obsolete txrx.h
Almost all of the definitions in txrx.h are obsolete. Rather than
remove the obsolete definitions and leave behind a file containing
only the two definitions that are used, move those useful definitions
to ol_txrx_types.h and completely remove txrx.h.

A side effect of this change is that a couple of unrelated files no
longer build because some of their dependencies were being met as a
side effect by txrx.h including other files. To solve the build issues
explicitly include the necessary header files where they are needed.

Change-Id: Ic3e3b36939e4ab04831d41a1e230bfab3da086a2
CRs-Fixed: 2363231
2018-12-10 20:20:45 -08:00
Rakshith Suresh Patkar
0f6375c2b7 qcacld-3.0: Enable use of new htt header format
If FW supports new htt format include only payload length in
the header length.

Change-Id: Ia668d73dcae3eb4adc1a4cfb0498b34d8c38f522
CRs-Fixed: 2361564
2018-12-10 05:36:45 -08:00
Alok Kumar
e197744efb qcacld-3.0: Send peer unmap confirmation cmd to FW
Send WMI_PEER_UNMAP_CONF_CMDID to FW after getting all
UNMAPs for the peer. This will ensure synchronization
between MAP/UNMAP and same peer_id won't be used for
different MAC address until all UNMAPs are processed.

Change-Id: I2c7793b527d5dbab0f9571185e6c16e0c6b7fcc3
CRs-Fixed: 2357245
2018-12-07 15:53:01 -08:00
Alok Kumar
3f3000fd73 qcacld-3.0: Add INI parameter for PEER UNMAP CONF SUPPORT
Add INI parameter "gEnablePeerUnmapConfSupport" to enable/disable
peer unmap confirmation support. When enabled Host will send
this support to the FW only if FW support is also enabled.
Default Value: False

Change-Id: Id368e61b5a99354e25a1fa2a0ff61b1262217521
CRs-Fixed: 2358126
2018-12-04 04:04:03 -08:00
Mohit Khanna
4079b4b464 qcacld-3.0: Remove un-initialized lock from DP thread
DP RX thread is using an un-initialized lock during suspend/resume
routine. This lock is not needed as the code is executed only by a
single execution context.

Remove usage of un-initialized lock.

CRs-Fixed: 2351010
Change-Id: I656562fe3ca73a5044163008a44ffae416a6a7fa
2018-11-29 18:11:58 -08:00
jiad
391c528b3e qcacld-3.0: Properly featurize mobile router
When CONFIG_MOBILE_ROUTER is enabled there are build failures
due to improper featurization of mobile router, so fix the
featurization.

Change-Id: Ic9e1f608bc631409fbb5bcf84fc3f4520d69a7c9
CRs-Fixed: 2355786
2018-11-29 18:10:55 -08:00
Lin Bai
6abb0f08e5 qcacld-3.0: Typecast DMA address properly when printing
Change Icdcfcdd10400aa2fad64441aa863087cc1c3766e use %llx to print
qdf_dma_addr_t. While qdf_dma_addr_t defined as 'unsigned long',
if without definition from kernel header.
Typecast DMA address to 'unsigned long long', before using %llx to
print DMA address directly.

Change-Id: Ic9527b494ac1aa2d47567a7dab5f0786913f4921
CRs-Fixed: 2355624
2018-11-28 01:36:43 -08:00
jitiphil
8e15ea6d1e qcacld-3.0: Relocate legacy DP INI items
Relocate below legacy  DP ini items as per
converged infrastructure.

1. maxMSDUsPerRxInd
2. gEnableTxSchedWrrVO
3. gEnableTxSchedWrrVI
4. gEnableTxSchedWrrBE
5. gEnableTxSchedWrrBK

Change-Id: Iebded11869c55c1797f0521af05585284f46f544
CRs-Fixed: 2351663
2018-11-23 03:38:20 -08:00
jitiphil
ebf3a9204f qcacld-3.0: New HTT H2T msg support
Current HTT_H2T messages from host driver does not have
consistency in message length set by host driver. Some
message types include HTC header length also within the
message length, while other types have message length
itself only.

Fix the same by sending same message format based on
firmware capability.

Change-Id: I885a21530a2d8f852387ae54cf7ee0751aad2516
CRs-Fixed: 2145560
2018-11-22 16:38:32 -08:00
jiad
af210c01e9 Revert "qcacld-3.0: Fix WDI 1.0 MCC TX SMMU fault"
This reverts commit 2459533, which fixes WDI 1.0 MCC SMMU fault
but it's only a partial fix. And we also need 2490501 to be a
complete fix. But 2490501 has regressions and leads to NULL
dereference, and it's reverted in 2517642 until a new complete
fix is ready.

Based on above, revert 2459533 and WDI 1.0 MCC SMMU datapath
will be a known issue.

Change-Id: I6444bfd8552906d889531b7e77ca6aa6b6fa7d6d
CRs-Fixed: 2352927
2018-11-22 00:43:27 -08:00
Lin Bai
e8ce5c5744 qcacld-3.0: Fix format error when printing DMA address
Compiler threw error as -Werror=int-to-pointer-cast when casting
DMA address to void pointer.
Use %llx to print DMA address directly.

Change-Id: Icdcfcdd10400aa2fad64441aa863087cc1c3766e
CRs-Fixed: 2350605
2018-11-21 13:47:22 -08:00
Mohit Khanna
c908646fa9 Revert "qcacld-3.0: Fix WDI 1.0 MCC TX SMMU unmap"
This reverts change I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb

This patchset is causing wlan_ipa_nbuf_cb to be called even when ipa_ctx
is null. wlan_ipa_nbuf_cb should not be called for non-IPA packets. Also
there should be a NULL check for ipa_ctx in the function.

Reverting the change may lead to SMMU errors during AP-AP MCC mode.

CRs-Fixed: 2352812
Change-Id: I2f2382ca12a14a09ed124ccd18a7f450282c5975
2018-11-21 14:46:31 +08:00
Nirav Shah
7c8c171e05 qcacld-3.0: Remove unnecessary prints from data path
1. Remove error prints for qdf_mem_malloc APIs.
2. Remove unnecessary __func__ from data path prints.

Change-Id: I6c4b110f626d84da055821c5f210a3d000b6ff15
CRs-Fixed: 2317315
2018-11-16 05:08:30 -08:00
jiad
15fb83796a qcacld-3.0: Fix WDI 1.0 MCC TX SMMU unmap
For WDI 1.0 MCC TX, wlan driver is involved for TX and skb is
provided from IPA driver. With SMMU enabled, dma_addr is of
IPA domain. In such case, wlan driver needs to do DMA map
itself. After doing DMA map, an offset of frag_header
and ipa_header is added to the iova and skb->cb is updated
with the new iova. After TX completion, skb DMA unmap is done
but with the iova of the above offset included, which leads to
unmapped iova error.

Fix is to recalculate the iova and update skb->cb with new iova,
which has frag_header and ipa_header length removed.

Change-Id: I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb
CRs-Fixed: 2338049
2018-11-14 22:06:05 -08:00
Jingxiang Ge
7cdb955b0f qcacld-3.0: Fix tx queue is paused forever
Put flow control setting in the flow_pool_lock, which can avoid
race condition between ol_tx_desc_free and ol_tx_desc_alloc.
This is a refine based on Ib60139fd94a4fb88c92a7f8aaf886ae9d3ca4c75.

Change-Id: I8d89323b5631039d7ff5a141775cc5825389c18b
CRs-Fixed: 2297190
2018-11-13 04:20:48 -08:00
jiad
a244137e66 qcacld-3.0: Fix WDI 1.0 MCC TX SMMU fault
SMMU fault is observed for WDI 1.0 MCC TX when SMMU is enabled.
Issue is that dma_addr passed from IPA driver is iova of IPA
domain. WLAN driver directly uses the iova to do transmission.
Since iova is not mapped in WLAN domain, SMMU fault occurs.

Fix is to map skb to WLAN domain for TX when SMMU is enabled.

Change-Id: I4c029a1e4dfff149e2784f5b95fe1f3cf3e3719e
CRs-Fixed: 2318537
2018-11-12 18:28:03 -08:00
Venkata Sharath Chandra Manchala
cd660986d1 qcacld-3.0: Enable Rate events in pktlog
Support Rate control and rate control update events
for pktlog by enabling the events in
WMI_PDEV_PKTLOG_ENABLE_CMDID message.

Change-Id: I9281fcd7c632ba19a84a6eb2c0dff49a172fd70d
CRs-Fixed: 2340635
2018-11-11 09:27:20 -08:00
Rakshith Suresh Patkar
384a28ae48 qcacld-3.0: Add timestamp debug info in ol_tx_desc_t
Add descriptor timestamp debug info in ol_tx_desc_t and
add APIs to set these values.

Change-Id: I686fccff4268811474630dbea8369fabe82d1517
CRs-Fixed: 2333654
2018-11-10 04:02:04 -08:00
jitiphil
377bcc1227 qcacld-3.0: Add legacy DP CFG items and APIs
Add the basic infra for legacy DP CFG items and the APIs
to be used from other components.

Change-Id: If7ad0e02c65e04ea13a308e680c9ba3b3d84ae25
CRs-Fixed: 2324099
2018-11-01 05:42:07 -07:00
Will Huang
a47dca3872 qcacld-3.0: Map as QDF_DMA_BIDIRECTIONAL for PMF tx frame
Some target which support sending mgmt frame based on htt would DMA
write this PMF tx frame buffer, it may cause smmu check permission
fault, set a flag to do special DMA map.

Change-Id: I3686be211374d2c316726fa3248dedce87c3faed
CRs-Fixed: 2332329
2018-10-30 01:46:01 -07:00
Tiger Yu
f1551cbacc qcacld-3.0: doing tx desc init earlier in ol_tx_hl_base
Doing the tx desc initialization earlier in ol_tx_hl_base to make sure
all msdu buffers have been mapped before msdu frame is freed if encouter
error.

Change-Id: Iefded014b4a179889e67fa7cc0e0c36e8218dd83
CRs-Fixed: 2337167
2018-10-26 10:39:20 -07:00
Venkata Sharath Chandra Manchala
598f503a01 qcacld-3.0: Change return status
Return QDF_STATUS as return status
over an integer value.

Change-Id: Ib6083de9b3581e6d92ec18f39ca552a5ae0cfc2d
CRs-Fixed: 2311561
2018-10-26 10:39:16 -07:00
Alok Kumar
9b13327cfb qcacld-3.0: Remove console logging for ol_txrx_peer_get_ref
In ol_txrx_peer_get_ref(), console logging is done after holding
spin lock which leads to spinlock lockup.

Avoid excess logging into console while holding spin lock.

Change-Id: Iae4fa6006358e26796ae2c262aca01bec7eacd21
CRs-Fixed: 2325704
2018-10-01 13:24:32 -07:00
Alok Kumar
0d1acac6bf qcacld-3.0: Unpause the Priority Queue for deficient pools
Priority Queue gets paused due to descriptor deficiency which
needs to be unpaused after distributing descriptors from a
source pool to deficient pool.

Unpause the Priority Queue of deficient pool when avail->desc
count is more than start_th.

Change-Id: Ia91fdd0ac39bf8a4ac42dafa42d346993bf6a38e
CRs-Fixed: 2318031
2018-09-28 09:06:20 -07:00
Jianmin Zhu
13921e9f1e qcacld-3.0: Fix compiling issue of __DP_RX_THREAD__H
error: '__DP_RX_THREAD__H' is used as a header guard here,
followed by #define of a different macro [-Werror,
-Wheader-guard]

Change-Id: I21beca14c8ea98a9a6c4a4acd5f3c7428fd56e01
CRs-Fixed: 2315965
2018-09-18 23:39:56 -07:00
Sravan Kumar Kairam
0512a84dba qcacld-3.0: Dequeue nbuf list from rx thread before continue
Currently in function dp_rx_thread_process_nbufq inside while
loop with nbuf list as condition if peer or vdev is not found
nbuf list is freed but not assigned to NULL and continue operation
is done. This leads to invalid freed nbuf list access in successive
loop iteration. In this change after nbuf list is freed assign it
to the next nbuf list which is in the rx thread queue.

Change-Id: I4b595a8708f91677645815105ad736926de91758
CRs-Fixed: 2309908
2018-09-18 01:02:59 -07:00
Manjunathappa Prakash
a4272ab881 qcacld-3.0: Fix locking order in ol_txrx_disp_peer_stats()
Fix the locking order of pdev->peer_ref_mutex and pdev->local_peer_ids.lock
spin_locks in ol_txrx_disp_peer_stats(), this was resulting in deadlock
with lock order in ol_txrx_peer_get_ref_by_local_id().

Change-Id: I51d39daed7f8fb04c30fd6a73e2f9ca388543620
CRs-Fixed: 2315808
2018-09-17 21:29:12 -07:00
Pramod Simha
7ee7b53e2c qcacld-3.0: Handle nbufs with ext list in RX thread
Check for nbufs which might already have an existing ext list
before appending to it.

Change-Id: Iac24eaf8430d7f9280386f1449c567fce8aa52fb
CRs-Fixed: 2304742
2018-09-12 15:55:48 -07:00
Amar Singhal
7ef5909b64 qcacld-3.0: Make sure NULL vdev is not de-referenced
Do not access vdev_id from vdev structure if vdev ptr is NULL.

Change-Id: I1aafa5ce7398994d55805742e831ca8ee1ae6a21
CRs-Fixed: 2313397
2018-09-12 13:35:47 -07:00
Srinivas Girigowda
09625b0222 qcacld-3.0: Fix embedded function name checkpatch warnings
Logging macros already print function name by default,
there is no need to print the function name again as part of the log.

Hence, remove the function name or
wherever required use '"%s...", __func__'

Change-Id: Ib6dc6cc03ef148146b1c626271d5ac3b7345c4bb
CRs-Fixed: 2312593
2018-09-12 11:58:26 -07:00
Jianmin Zhu
58b641e8d3 qcacld-3.0: Fix LFR3 assert for wrong peer ref count debug id
For peer map, in ol_rx_peer_map_handler->ol_txrx_peer_find_add_id
->ol_txrx_peer_find_hash_find_get_ref, peer ref count debug id is
PEER_DEBUG_ID_OL_PEER_MAP.

After LFR3 complete, host need delete old peer in
wma_roam_synch_event_handler ->wma_delete_bss->wma_remove_peer->
ol_txrx_peer_detach_force_delete->ol_txrx_peer_release_ref,
but peer ref count debug id passed is PEER_DEBUG_ID_OL_INTERNAL,
so peer ref count is failed to be decreased, the peer is failed
to be detached and released, new peer of roaming target AP can't
be created and attached.

Change-Id: I18572a8a8a4429c10a4862bb188b43aefb830a14
CRs-Fixed: 2311751
2018-09-11 14:57:14 -07:00
gaurank kathpalia
9fb3f4b3cb qcacld-3.0: Add src, and dst id support in TX/RX
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: Ia79d1e8ceda97f956eadcef50524b8307fcc247b
CRs-Fixed: 2305993
2018-09-11 12:01:57 -07:00
Amar Singhal
ddd2cf98d2 qcacld-3.0: Unlock the rx_ring spin-lock appropriately
Unlock the rx_ring.rx_hash_lock spin-lock when returning due to
failure to do smmu map_unmap.

Change-Id: I1b905c0ad529c80f78807c030920121ee0909825
CRs-Fixed: 2299785
2018-09-06 10:05:27 -07:00
Alok Kumar
a13db78b09 qcacld-3.0: Add pre-allocated pool of SKBs for Rx ring
In low memory condition, RX ring may become empty when all
SKB buffers attached to the ring get consumed and kernel is
unable to allocate SKB buffer during replenish.

Create a pre-allocated pool of skbs during driver load time
and request the buffer from this pool in low memory case.

Change-Id: If8c6a4fe04f3c931dc60dcffe28e45166eab9835
CRs-Fixed: 2306861
2018-09-06 01:41:52 -07:00
Amar Singhal
4e855ade4c qcacld-3.0: Check for pdev being NULL
In function ol_txrx_offld_flush, check for pdev being
NULL, before de-referencing it.

Change-Id: I8999d894c74b6ef10cef91345370d859f5eee8ec
CRs-Fixed: 2299780
2018-09-05 22:14:44 -07:00
Mohit Khanna
13ea524aa3 qcacld-3.0: Donot de-init DP RX threads if not inited
In one of the tests, when the driver switches to FTM mode, DP RX threads
are not initialized as the necessary configuration is not passed down
from CDS. However, cds_dp_close tries to de-initialize the threads and a
spinlock un-initialized error is seen.

Donot de-initialize the DP RX thread module if it is not initialized.

Change-Id: I14a1dcb678c9d953abd3262e86408d12f4eb2617
CRs-Fixed: 2301398
2018-09-02 14:33:23 -07:00