Commit Graph

166 Commits

Author SHA1 Message Date
Poddar, Siddarth
b904759184 qcacld-3.0: Add debug logs for FW_RX_REFILL failure
Add debug logs to capture htt rx_ring info during data stall
detection for FW_RX_REFILL failure reason.

Change-Id: I6733a37677ebccfef5096ac38858c4505e8665b6
CRs-Fixed: 2121686
2017-10-12 13:58:58 -07:00
Yun Park
cc720f0729 Revert "qcacld-3.0: Reset to NULL after freeing the memory"
This reverts commit If6a1b2857d14f5fff2f47e541156ce2c27fb33a3

Fix build error caused by missing SMMU change propagation,
where changed tx_comp_base to tx_comp_ring.

Change-Id: Ie845b9da0fa6272dfe95abaaf587a583fb4710b3
CRs-Fixed: 2119811
2017-10-12 13:57:45 -07:00
Sravan Kumar Kairam
8ea5ee2120 qcacld-3.0: Add net buff pop fail counter
Add net buff pop fail counter which helps to debug issues
related to scenario when RX ring fill count exceeds the fill
level.

Change-Id: I00f4a4e245e0732ef04518e4c1db95999edc6687
CRs-Fixed: 2106523
2017-10-03 07:46:18 -07:00
jiad
04f402117b qcacld-3.0: Restore RX ring fill level for Rome
HTT_RX_HOST_LATENCY_WORST_LIKELY_MS is changed from 10 to 20
for Helium support. But 20 is aggressive for Rome and traffic
hang is seen.

Fix is to define HTT_RX_HOST_LATENCY_WORST_LIKELY_MS as 10
for Rome support.

Change-Id: Iaaa86ed70d145ac9898300e9b678008781215617
CRs-Fixed: 2050912
2017-09-28 05:40:03 -07:00
Houston Hoffman
b10ec496b6 qcacld-3.0: Use qdf_dbg instead of qdf_print for non-error logs
Stats printing with excessive loops should not go to the console.
Avoids watch-dog bites.

Change-Id: I2ff67827d8bb975bc4ddbb4d70c88283e8ea231e
CRs-Fixed: 2088027
2017-09-27 17:30:39 -07:00
Sravan Kumar Kairam
5662358b2e qcacld-3.0: Reset to NULL after freeing the memory
At IPA UC detach after free IPA TX resource TX comp
ring and TX CE index pointers reset them to NULL.

Change-Id: If6a1b2857d14f5fff2f47e541156ce2c27fb33a3
CRs-Fixed: 2111959
2017-09-26 17:52:54 -07:00
Govind Singh
64228921f2 qcacld-3.0: Fix ring refill retry logic
When system is under low memory condition and skb allocation fails,
RX ring msdu is not attached in ring replenish logic and Ring refill retry
timer refills the ring debt at the interval of 50 ms.

If refill retry fails to allocate the memory,  refill debt is not updated and
this is resulting in retry logic failure.

Update refill debt when retry allocation fails to allocate
rx ring msdu.

Change-Id: I4d2230e4984e26b44db663e7e7f20c73ae90b0f0
2017-09-26 17:52:38 -07:00
Himanshu Agarwal
8d4cf47ffb qcacld-3.0: Add logic to mark first wakeup packet without offload bit set
Add logic to mark first wakeup packet even if offload bit is not set in
the htt rx indication message sent by fw.

Change-Id: Ide50dcfcf88ecd0c71b32b0e746742dc49d08567
CRs-Fixed: 2110627
2017-09-26 17:52:24 -07:00
Jeff Johnson
c13bfe08ca qcacld-3.0: dp: Replace instances of unadorned %p
Replace instances of unadorned %p in core/dp.

Change-Id: I7baa3ecc4f9964c47261dafa26116447fc7611b5
CRs-Fixed: 2100997
2017-09-25 21:56:58 -07:00
Mohit Khanna
31776f8b90 qcacld-3.0: Fix data rate for beacon frames
Currently, in monitor mode, beacon frames are showing an incorrect phy
rate (0). This is because the values in the RX descriptor for
interpreting the legacy rates have changed in ihelium.

Make changes in host to interpret the new values into data rates correctly.

Change-Id: Ibf845666943fd718b657c0128758dabfb64a38ef
CRs-Fixed: 2082456
2017-09-22 18:36:09 -07:00
Mohit Khanna
f8f9682e02 qcacld-3.0: Dptrace enhancements
* Log EAPOL, ARP, DHCP, MGMT, ROAM Events, ICMP, Data packets,
  TX-Completions by default.
* Set default verbosity as low (existing is high)
* Throttle ICMP and Data packets if threshold exceeds.
* Enable live mode by default. Added ini entry to disable
  it and configure high throughput thresh - gDptraceConfig
* Log only SA and DA for proto packets (and not 32 bytes)
* Format prints to fit in 1 line.

CRs-Fixed: 2051134
Change-Id: Ia94732e49023950f458a7402650d4b8f5e1d5563
2017-09-12 03:38:02 -07:00
Yun Park
d1c7647684 qcacld-3.0: Fix possible NULL pointer dereference in ol_rx.c
Pointer head_buf returned from call to function
htt_rx_offload_paddr_msdu_pop_ll may be NULL and will be
dereferenced

Change-Id: I6e1db520d525a42d59ebfb675325e37c4097ad71
CRs-Fixed: 2085696
2017-09-07 15:32:13 -07:00
Govind Singh
d062a9e434 qcacld-3.0: Unlock rx hash lock in error cases
RX hash lock is not unlocked in case hash_table is
NULL and context is returned immediately without
unlocking the rx hash lock.

Unlock the rx hash lock before returning from the context.

Change-Id: I4ec2c272ac92cf5c0e93c64e34ce96cafe5cc11c
CRs-Fixed: 2104297
2017-09-07 03:21:36 -07:00
Paul Zhang
87251ccfa6 qcacld-3.0: Don't check MIC fail if SA is self MAC
When DUT connects to specific AP, it receives the frame whose
SA is self MAC and MIC failure flag is set at the same time.
This will cause disconnection with the AP because MIC failure.

To fix this unexpected disconnection issue, do not check MIC
failure if discard flag is set by fw.

Change-Id: I9029da9d329679bf0fd61be234690c764cceb57c
CRs-Fixed: 2090575
2017-08-31 11:00:40 -07:00
Houston Hoffman
fa60ff5562 qcacld-3.0: Try to recover from htc_connect_service failure
In the case of low memory allocation failures, the system should be able to
continue functioning after the connect_service failure.

Change-Id: Icd054d541aa95dbf4099426cf73f3dfe6c2c4565
CRs-Fixed: 2097391
2017-08-30 10:45:35 -07:00
Orhan K AKYILDIZ
a4f58e9824 qcacld-3.0: Add logs for target attach procedure
During target attach procedure, there are a number of messages sent
to the FW. Some of these sends did not check return codes. Add
return code checks and treat the codes accordingly.

Change-Id: Ib515e040b6c7e2ecc23d2d422bb359e83342fcfa
CRs-Fixed: 2064904
2017-08-30 10:42:45 -07:00
Govind Singh
c701c4d9d2 qcacld-3.0: Add mb before updating the write index of remote ring
When replenishing Rx buffers driver updates the address of the
buffer and the index of rx buffer in rx ring to the firmware.

Make sure alloc index write is reflected in the memory before
FW polls the remote ring write index as compiler can reorder
the instructions based on optimizations.

Disable compile time reorder by adding a write memory barrier.

Change-Id: Icb37598e6c36b4a128b1bcd91bfb9d643bf083e2
CRs-Fixed: 2084210
2017-08-16 17:36:59 -07:00
Chris Guo
9e293a9667 qcacld-3.0: Fix synchronization issue of credit number
The target_delta and bus_delta combined with target_tx_credit
to fulfil the credit function of host.
A global lock is needed to ensure reenterable.

Change-Id: I71c006ccfe05b442706283490cd7bba4cc8a6f5f
CRs-Fixed: 964530
2017-08-09 19:37:05 -07:00
Yun Park
b4f591d8aa qcacld-3.0: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I80e8f609587d0df85d2da9fb0f41cb49e02a9d2f
CRs-Fixed: 2033368
2017-08-07 17:47:45 -07:00
Lin Bai
dc00fb8fa5 qcacld-3.0: Kernel crash as incorrect DMA buffer size
When HTT attached, driver allocates DMA buffer to record each RX ring
entry, with element size - target_paddr_t, which is bus size, and may be
different from kernel's physical address size.
While in htt_rx_detach, size of qdf_dma_addr_t used for buffer free.
In case kernel built as 64-bit, and bus size as default 32-bit,
it will crash when free.

Use same element size to avoid it.

CRs-Fixed: 2087592
Change-Id: Iabe95f92ea82b736213a8b81453163229b2a3a3b
2017-08-06 11:48:34 -07:00
Srinivas Girigowda
0517bfc356 qcacld-3.0: Fix clang warnings enum 'qdf_nbuf_l4_rx_cksum_result_t'
warning: implicit conversion from enumeration type
'qdf_nbuf_l4_rx_cksum_result_t' to different enumeration
type 'qdf_nbuf_l4_rx_cksum_type_t

Change-Id: If2b7ee179fa260c14cde450cc72272c41a9f4adb
CRs-Fixed: 2055487
2017-08-03 19:49:00 -07:00
Govind Singh
9ad8414613 qcacld-3.0: Prevent rx hashlist access after rx hash deinit
Rx hash deinit sets hash_table to NULL, at the same time
there can be active tasklet context accessing the rx hash list.
Prevent rx hashlist access after rx hash deinit and set the netbuf
to NULL once netbuff is popped out of the list.

Change-Id: I4e30dd69ece33c3cc768842274d5307c0bf29a37
CRs-Fixed: 2049121
2017-07-27 16:58:57 -07:00
Mohit Khanna
c19888f4c5 qcacld-3.0: Fix compilation error due to htt_display_rx_buf_debug
The function is not present as inline in the non debug build, which will
cause a compilation error.
Fix issue by having an empty inline function in the header file.
Some counters need to be defined outside of DEBUG_RX_RING_BUFFER.

Change-Id: I755616aa55c2f38bca017137e91cc469de7fbdcf
CRs-Fixed: 2004927
2017-07-27 16:58:47 -07:00
Yu Wang
ceb357b964 qcacld-3.0: time stamp msdu with precise rx/tx time
Get tx/rx tsf time for each msdu, and then
time stamp the msdu with the corresponding
host time.

Change-Id: I7af80318b60c28d53e95fbe545e82da4191544b6
CRs-Fixed: 2057693
2017-07-12 15:21:47 +08:00
Wu Gao
5f107a05ad qcacld-3.0: Free ipa uc tx buffer pool with adaptive method
If do not define QCA_WIFI_3_0, it alloc ipa uc tx buffer by
qdf_nbuf_alloc, but free by qdf_mem_free_consistent, which cause
memory leak. Solution is freeing with corresponding method.

Change-Id: I407712e545acfe5aeef8c8afa58785e42556ca02
CRs-Fixed: 2061922
2017-07-04 05:40:42 -07:00
Rakesh Pillai
7fb7a1f850 qcacld-3.0: Fix CLANG warnings in Data path
implicit conversion from enumeration type 'QDF_STATUS' to different enumeration type 'A_STATUS'
implicit conversion from enumeration type 'A_STATUS' to different enumeration type 'QDF_STATUS'

CRs-Fixed: 2063339
Change-Id: Ib96a49f40ea581127405560087354e7fa9bf46ec
2017-06-30 22:50:40 -07:00
Poddar, Siddarth
37a302d35e qcacld-3.0: Make the packet LRO ineligible when tcp udp checksum fail
Send the packet to network stack with lro non-eligible
whenever tcp_udp_checksum fail.

Change-Id: I1c4d71fbc4cf7ce2e13d4e6c8dafbafdf76b0c2f
CRs-Fixed: 2068442
2017-06-30 08:19:57 -07:00
wadesong
1885d2c685 qcacld-3.0: Add ipa_uc_rx_ring_elem_t for 32-bit platform
ipa_uc_rx_ring_elem_t structure is platform specific and current
definition cannot be used on 32-bit ARM platform where IPA 3.5
is attached. Add IPA 3.5 and 32-bit ARM compatible structure to
avoid IPA crash when data traffic is running

Change-Id: Ia5c141c9405675a64f59ba4c09f1ffd911158c9b
CRs-Fixed: 2046905
2017-06-20 19:36:16 -07:00
Manjunathappa Prakash
70ea728fe9 qcacld-3.0: iHelium: Increase RX_HTT_HDR_STATUS_LEN from 64 to 256bytes
Increase packet header bytes to 256, HL1.0 target offload features on
iHelium FW requires header bytes to be increased from 64 to 256bytes.
And round up the HTT_RX_BUF_SIZE to CACHE_LINE_SZ.

Change-Id: Iec45f5747956d0797411f76c2fec1368a13e7d6d
CRs-Fixed: 1039073
2017-06-19 12:43:47 -07:00
Yun Park
4afce84bee qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_internal.h
Fix Datapath kernel checkpatch warnings in htt_internal.h

Change-Id: Ided3e682646abd68909b9af7ba62e59f541fe892
CRs-Fixed: 2032874
2017-06-14 08:24:09 -07:00
Yun Park
56e32d9063 qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt.c
Fix Datapath kernel checkpatch warnings in htt.c

Change-Id: I65db694e92a3194a15c6ce5c0e928b4957e6357a
CRs-Fixed: 2032874
2017-06-14 08:24:08 -07:00
Yun Park
39ea12aec5 qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_types.h
Fix Datapath kernel checkpatch warnings in htt_types.h

Change-Id: Id94b240612fcde52e6a4f3d5534b411e24fdc92d
CRs-Fixed: 2032874
2017-06-14 08:24:06 -07:00
Yun Park
a9319801ae qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_t2h.c
Fix Datapath kernel checkpatch warnings in htt_t2h.c

Change-Id: Ib8d870309ff534c2c658006df3598e559eb5fa41
CRs-Fixed: 2032874
2017-06-14 08:24:04 -07:00
Yun Park
f387e617ca qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_fw_stats.c
Fix Datapath kernel checkpatch warnings in htt_fw_stats.c

Change-Id: Ia6b62719abe9186af2e0a581d7d9a26552b7bba1
CRs-Fixed: 2032874
2017-06-14 08:24:03 -07:00
Yun Park
a63df43b92 qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_h2t.c
Fix Datapath kernel checkpatch warnings in htt_h2t.c

Change-Id: If590589ca3fdd0dde238ee540dc3435042665fce
CRs-Fixed: 2032874
2017-06-14 08:24:01 -07:00
Yun Park
bd259aec9c qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_tx.c
Fix Datapath kernel checkpatch warnings in htt_tx.c

Change-Id: I8c1b967feb742ce3a1acec437822720421e1b333
CRs-Fixed: 2032874
2017-06-14 08:24:00 -07:00
Yun Park
16cf32a688 qcacld-3.0: Fix Datapath kernel checkpatch warnings in htt_rx.c
Fix Datapath kernel checkpatch warnings in htt_rx.c

Change-Id: I922f58728c5b28afa147d6f6781356f4f5f37dc4
CRs-Fixed: 2032874
2017-06-14 08:23:58 -07:00
Nachiket Kukade
8003d257b9 qcacld-3.0: Add and use API to check FW Down indication bit during probe
When commands to Firmware fail during probe due to Firmware being down, in
most cases QDF_BUGs are hit, not allowing re-probing to take place. A new
API is defined to check if the failure is due to Firmware being down or not.
If so, return error gracefully allowing re-probing to take place

Change-Id: Ib2f21a6f1ced1c16e9d2bdbda810b160ff63e2c6
CRs-fixed: 2027444
2017-06-12 17:19:28 -07:00
Himanshu Agarwal
5f5e16692d qcacld-3.0: Fix buf replenish logic and handle error pkts
Fix replenishing logic by taking care of fragments as well
in monitor mode. Also drop the packets with mpdu_length_err
bit set in rx attention desc and don't send those packets to
upper layers.

Change-Id: Iaeeb0e40e4988ca5a2d4c5e7c98ed3f82dfca533
CRs-Fixed: 2037633
2017-06-10 23:30:56 -07:00
Venkata Sharath Chandra Manchala
1676defe7e qcacld-3.0: Enable TSO
Add FEATURE_TSO flag in Kbuild to enable the
TSO feature for Lithium based chipsets

Change-Id: Ie26b2b9a191828b3ce833000a7abbb09dd492713
CRs-Fixed: 2042950
2017-06-07 12:14:46 -07:00
Venkata Sharath Chandra Manchala
0b9fc63dd1 qcacld-3.0: Support for DPTRACE
1. Add an extra parameter pdev id to
   qdf_trace signatures to avoid compilation break.
2. This variable allows to collect records per pdev
   for Lithium based chipsets.
3. Set this variable to a default value QDF_TRACE_DEFAULT_PDEV_ID
   for older chipsets.

Change-Id: I2f4c2e3525ac0d1d53f1af3db7e43acadf6ab835
CRs-Fixed: 2049412
2017-06-05 22:52:39 -07:00
Govind Singh
9785416998 qcacld-3.0: Handle HTT DATA2/DATA3 connect service failure
Handle error case if DATA2/DATA3 htt service connection
with fw fails.
DATA2/DATA3 connect service is done after FW ready indication.
Hence it's safe to handle the error scenarios.

Change-Id: If6f07f3c29cbc5f1486231a7897d1223ad1c24bb
CRs-Fixed: 2034843
2017-05-31 23:38:13 -07:00
Dhanashri Atre
1a6a4ce139 qcacld-3.0: Modify legacy LRO implementation to use QDF
Modify the legacy LRO implementation which is in HDD to
use the implementation in QDF instead. This is to avoid
code duplication and to unify the LRO implementations for
Napier and Helium.

Change-Id: Ie9d3bb6d3dcda5a7d1d5fda6e7cbdef92be30461
CRs-Fixed: 2042812
2017-05-26 16:11:27 -07:00
Dhanashri Atre
e08ba71363 qcacld-3.0: Do not typecast physical address to 32 bits
Do not typecast the physical address passed to hash list to
32 bits. The physical address maybe greater than 32 bits which
will lead to a mismatch during look-up.

Change-Id: I095e1e63c59da74bc8a2507273e7c6487d0b19e7
CRs-Fixed: 2044161
2017-05-08 15:41:34 -07:00
Manikandan Mohan
83c939c474 qcacld-3.0: Update for check patch refactoring
Host Target Communication module files are updated for check
patch warnings. Thus update dependent files.

Change-Id: Id37009ca13704beb0d8c4c28cc3eaff9cf930a0f
CRs-fixed: 2030824
2017-05-02 13:29:38 -07:00
Poddar, Siddarth
d63954e481 qcacld-3.0: Enable debug address marking only for 64 bit DMA address system
Limit the detection of non posted rx buffers from FW only to
64 bit DMA address system. For systems, where IPA has 32 bit
DMA address limitation, this debug feature should be disabled.

CRs-Fixed: 2010583
Change-Id: I9a26d0a423acedb068d99f39929029182f7c6fa1
2017-04-28 05:22:24 -07:00
Poddar, Siddarth
33faae85d7 qcacld-3.0: Fix memory leak in htt_tx_ipa_uc_attach
TX BUF POOL vaddr storage alloc is not freed in
htt_tx_ipa_uc_attach when paddr storage allocation fails.
Fix is to free memory in failure case.

CRs-Fixed: 2034943
Change-Id: Ifb26dfdcff19b3ab66f11a89b9c185777eeec535
2017-04-28 02:54:34 -07:00
Himanshu Agarwal
7c8ab88620 qcacld-3.0: Fill rate and bw info for HT/VHT frames in monitor mode
In monitor mode, while filling the radiotap header, rate and bw
info for HT and VHT frames was not filled correctly due to which
packets in tcpdump are showing incorrect rates and bw for HT/VHT
frames.

Fill rate and bw info for HT/VHT frames correctly in monitor mode.

Change-Id: If15708101ac123fbdba141b04aad881d988e6b43
CRs-Fixed: 2034455
2017-04-26 23:53:54 -07:00
Orhan K AKYILDIZ
4c878ed845 qcacld-3.0: Support > 32 bit paddrs in rx_hash
Currently, rx-hash calculation and hash look-up is performed only on
lower 32 bits. On some systems with a particular memory map, we have
observed that one could have buffers coming from memory map regions
that only differ at the higher (>32) bits.
For such systems, make sure that the hash entry storage and comparison
operations are done on the whole paddr range.

Change-Id: I279f673ee465a811d20606b260be084f984135d5
CRs-Fixed: 2024095
2017-04-21 18:48:39 -07:00
Orhan K AKYILDIZ
a652a60b37 qcacld-3.0: Add paddr support for 32-bit host arch
Add support for 32-bit host architecture where dma_addr_t
is 32 bits and  bus addresses are of 64 bits on MAC and IPA.

Change-Id: Id4a4763ed388973297c63df290b578effdc5b284
CRs-Fixed: 2006548
2017-04-21 18:48:37 -07:00