Commit Graph

157 Commits

Author SHA1 Message Date
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
Orhan K AKYILDIZ
3d926d8698 qcacld-3.0: Allocate rx_buf_debug from BSS
As kernel was complaining an order-5 (2^5 * page-size(=8K)) allocation,
change the allocation of rx_buf_debug memory debug structure to be done
from BSS instead.

Change-Id: I78658f2f723d230cc6443c0897a6a4b31c753849
CRs-Fixed: 2011052
2017-04-21 18:48:35 -07:00
Mohit Khanna
c68622e61b qcacld-3.0: Enhance htt_rx_ring_fill_n processing
Enhance htt_rx_ring_fill_n by:
- Start timer in case the function is not able to find memory to fill rx
  buffers.
- Handle case where one stream can starve the other stream by constantly
  adding to the debt.

CRs-Fixed: 2001325
Change-Id: Idff33d9c28daaf7a00334134459a3633f5ccde7c
2017-04-21 18:48:33 -07:00
Orhan K AKYILDIZ
4900e1d357 qcacld-3.0: Fix 32-bit crash on markings
The offending code did not get the order of operations right.
It was: shift 16, cast 64,shift 16 and should have been:
cast, shift 16, shift 16.

CRs-Fixed: 2000844
Change-Id: I65cf4aaf0c20535070eb63b15d77b8c3c7dcb4e4
2017-04-21 18:48:30 -07:00
Orhan K AKYILDIZ
c8c27be649 qcacld-3.0: Add detection of non-posted rx buffers
Add detection of non posted RX buffers from FW (rx_in_order_ind msgs)
by marking the higher(16) unused bits of the 64-bit physical addresses.
On reception, if the paddr received does not have the markings, assert,
otherwise clean the markings and proceed.

Duplicate rx-buffers will be detected in the FW.

CRs-Fixed: 2000844
Change-Id: I9c50cce182a12f3edd3c5b2606836d62f684f816
2017-04-21 18:48:28 -07:00
Orhan K AKYILDIZ
fdd74de850 qcacld-3.0: Debug enhancements for rx_buffer history
Add the following:
- Global cumulative counters for posted and received.
- CPU for each individual records
- Counters for refill timer starts
- iwpriv support (dumpStats 10) to dump the counters

CRs-Fixed: 2001331
Change-Id: I66a8a818ffa0b2522358bab404c92a3cdaa603f7
2017-04-21 18:48:26 -07:00
Orhan K AKYILDIZ
adf0610a93 qcacld-3.0: Fix rx_starvation on multiple-rx case
In case of parallel rx execution, fill_count was being updated
by multiple threads and this was causing fill_count to be incorrect
in parallel rx execution cases. This was causing rx ring to be under
filled and in time was causing rx starvation (data stall).

Fix this by:
- making sure that we always fill the right number of buffers based
  on the msdu_count in the in_order_indication message.
- making sure that only one execution thread fills the ring
- making sure that the lock holder (filling the ring) does not
  run too long by introducing a max fill limit, in which case the
  filler will give up and the contender (the other rx execution
  thread) takes the lock and fills the ring itself.

CRs-Fixed: 1103851

Change-Id: I59ee2903d51877afc112a1a76b7a5529f1c6a5c0
2017-04-21 18:48:24 -07:00
Orhan K AKYILDIZ
ba81c51032 qcacld-3.0: Fix USR variant build error
There was a typo in USR variant of the DEBUG_RX_RING_BUFFER
featured code, which caused a symbol not defined in the header
file, triggering an implicit function definition warning/error.

Fixed typo.

CRs-Fixed: 1104718
Change-Id: I6573904add1453d8c3765f030349a214b058e2c0
2017-04-21 18:48:22 -07:00
Orhan K AKYILDIZ
0c1b6bfae8 qcacld-3.0: Enhance rx_ring buffer history
Enhance rx ring buffer history to include both post and recv
time-stamps. Add a new event for alloc-index updates.

Change-Id: I061afdcda5d2d41c016be9d3b12e5c4a1cda0c65
CRs-Fixed: 1098656
2017-04-21 18:48:18 -07:00
Dhanashri Atre
170855e137 qcacld-3.0: Lithium LRO Support
Add changes needed to support Receive Offload (LRO) on Lithium.

CRs-Fixed: 1107169
Change-Id: I2fb00fa83a52b039e6ad9aea9a98576f2c36d6fa
2017-04-17 14:52:24 -07:00