Commit Graph

381 Commits

Author SHA1 Message Date
Nachiket Kukade
a48fd7791b qcacld-3.0: Do not BUG_ON during peer unmap timeout if FW is down
During peer detach, driver starts a timer to track unmap events
when the sta peer gets deleted. During this duration SSR occurs
and BUG_ON or cds recovery is triggered. This should only happen
in non-recoverable situation, so this scenario should be avoided.

Allow driver to recover from the SSR by checking FW_DOWN bit.

Change-Id: Ieca407e5c9c30f3c4716b7d158a903add46b8bd6
CRs-Fixed: 2078395
2017-07-30 13:02:31 -07:00
Mohit Khanna
78cb6bbbcc qcacld-3.0: drop excess rx pkts if peer not registered
Currently if the peer is not registered, we add packets to a cached_bufq
(within a peer). In case the peer is not registered for quite a long
time, or if the  vdev->rx pointer is somehow not set (when the vdev is
associated), this will lead to large number of nbufs from the FW being
added to this list. Eventually, we will run out of memory trying to add
nbufs to this list.
Keep an upper threshold on the number of elements in the cached_bufq.
Drop elements once the threshold is reached.

Change-Id: I02db9347addd77976f1d84897eee20d1e6f9c4ec
CRs-Fixed: 2026991
2017-07-27 16:59:52 -07:00
Govind Singh
98b6255df6 qcacld-3.0: Remove QCA_WIFI_3_0_EMU flag from Kbuild
QCA_WIFI_3_0_EMU flag is introduced for IHelium emulation
platform, where wait/error timeouts are kept for larger values.
Remove this flag for production target.
Increase tx completion drain delay to 1sec from 500ms to avoid
unwanted suspend abort.

Change-Id: Ie0633b3a2bbc9e2237039311af7417952961aada
CRs-Fixed: 2047750
2017-07-27 16:59:14 -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
CNSS_WLAN Service
db56436b78 Merge changes I98019171,I69fb67a4 into wlan-cld3.driver.lnx.2.0-dev
* changes:
  Release 5.2.0.35O
  qcacld-3.0: Fix peer poison overwritten issue
2017-07-25 21:20:46 -07:00
Mohit Khanna
babadb8bee qcacld-3.0: Fix peer poison overwritten issue
In the existing impementation, once wma_is_pkt_drop_candidate gets a
peer from ol_txrx_find_peer_by_addr, the peer can be deleted in the
SOFTIRQ path from the unmap handler. This would make the peer pointer
'stale' resulting in access to already freed memory.

- Use standard API OL_TXRX_PEER_UNREF_DELETE to decrement peer->ref_cnt
  instead of directly referencing it.
- Add a new API - ol_txrx_find_peer_by_addr_inc_ref which does not
  decrement the peer->ref_cnt until the usage of peer in the caller
  function is finished. The existing API ol_txrx_find_peer_by_addr
  can be replaced by the new API as and when the issues are seen.

Sample usage:
    {
	peer = ol_txrx_find_peer_by_addr_inc_ref
	/* This API gets the peer and increments its ref_cnt */
	...
	...
	/* Once peer usage is done */
	OL_TXRX_PEER_UNREF_DELETE(peer);
	/*
	 * This API deletes the reference to the peer or the peer itself
	 * if the peer->ref_cnt is 0. This way we no longer depend on
	 * peer unmaps to delete the peer.
	 */

    }

Change-Id: I69fb67a4b4c9e26344d2ed1a72c383be7ac62414
CRs-Fixed: 2008583
2017-07-25 03:45:26 -07:00
Linux Build Service Account
ec1af2c219 Merge "qcacld-3.0: time stamp msdu with precise rx/tx time" 2017-07-20 20:44:49 -07:00
Deepak Dhamdhere
64bfe97415 qcacld-3.0: Schedule work for peer_unmap_timer_handler actions
Mutex cannot be used when peer_unmap_timer_handler() calls
cds_trigger_recover() because it runs in soft_irq. Schedule work
to perform the recovery instead.

CRs-Fixed: 2060775
Change-Id: I9a9554ef0aa9288bf5abe22cd2513d8cc41c29d4
2017-07-17 17:38:55 -07:00
Manjunathappa Prakash
6c54736903 qcacld-3.0: Add changes for Napier flow control
Adds support for flow control on convergence branch.
We will have global pool and each vdev coming up will have the
descriptors allocated from global pool. Tx queue is paused and unpaused
internally in host based on the stop and start thresholds.
Changes are added under compilation flag QCA_LL_TX_FLOW_CONTROL_V2.

Change-Id: I0ccb80b0099f39efad52ccd7d47f2709fdee2a93
CRs-Fixed: 2040457
2017-07-16 07:01:28 -07:00
Mohit Khanna
b04dfcd09a qcacld-3.0: Add macros to inc/dec peer->ref_cnt
Currently peer ref_cnt increments and decrements are done by the caller
function. Wrap peer->ref_cnt increment and decrement into MACRO calls so
they can be tracked.

Change-Id: I64d8b85d5898545bbc5a4b81101d1fd306de3fc9
CRs-Fixed: 2005652
2017-07-12 14:44:27 -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
Sravan Kumar Kairam
3d5c118ec6 qcacld-3.0: At TSO segment free set owner TX desc to NULL
Currently at TSO segment free it's debug information is not
cleared. TSO segment TX descriptor owner is part of the debug
information. As a result even after segment free still its
point to stale TX descriptor as it's owner. In this change at
TSO segment free set TX desc owner to NULL.

Change-Id: I09f927d78c7b3aa4691aa69acbd4cef5002cf11d
CRs-Fixed: 2063433
2017-07-11 03:51:58 -07:00
Deepak Dhamdhere
be72e80caa qcacld-3.0: Fix error handling in peer creation
Return error instead of QDF_BUG(0) in ol_txrx_peer_attach() when it
times out on duplicate peer detection. Peer unmap events from firmware
may take more than 500 ms timeout observed by this routine.
wma_create_peer() should return error status on failure to create peer.

CRs-Fixed: 2004665
Change-Id: I8368c6320139f97584bd1647f1806a695d4a5929
2017-07-05 11:50:53 -07: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
jge
35cba62d45 qcacld-3.0: Correct NULL check when using ol_tx_dest_addr_find
Fix static analyze issues. add NULL pointer check.

Change-Id: Icc80211b945d1eaabfb6015ba93e0c3114f2c589
CRs-Fixed: 2059683
2017-07-04 04:29:56 -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
Kapil Gupta
53d9b575c5 qcacld-3.0: Remove unwanted error msgs
Add changes to remove unwanted error messages from peer create/
delete events.

Change-Id: Ic511b1799db36d1da4bda491792889db881de233
CRs-Fixed: 2040800
2017-06-30 04:50:24 -07:00
Abhishek Singh
217d978511 qcacld-3.0: Wait for all peer unmap events
Currently even though all peer unmaps events of last associated peer are
not received, driver still goes ahead for new connection with a diffrent peer.
Now if firmware uses same peer id for new peer also this causes synchronization
issue of peer ref counts and will eventually lead of kernel panic.

Add changes to wait for last peer's all unmap events before proceeding with
new connection

CRs-Fixed: 2040627
Change-Id: I30e74d9bebe66fec55d7682d3cec581a078f5e75
2017-06-30 04:50:23 -07:00
jge
9bd51dd66b qcacld-3.0: Correct NULL check in ol_tx_bad_peer_update_tx_limit
Fix static analyze issues. add NULL pointer check.

Change-Id: If1380a23a87a50d50458d10f87a512fa87613b27
CRs-Fixed: 2059753
2017-06-29 20:30:39 -07:00
Varun Reddy Yeturu
dd51e8d67b qcacld-3.0: Fix logging levels - Part 2
Move the log messages to appropriate log levels so that
the console does not get a huge spam of unnecessary logs

Change-Id: Ie58b45078ad8b4732d7b84bfb77261396bd5862a
CRs-Fixed: 2043741
2017-06-29 20:30:36 -07:00
hqu
c7f560cb21 qcacld-3.0: Translate the AC enums defined in htt
The AC values used by htt and txrx module are mismatch. Assertion
is also added to confirm that the values are matching.

The change is also to sync with CLD2.0.

Change-Id: I011a6f2b78a6954863c99f9d3875b2c88d2b78b1
CRs-Fixed: 2065390
2017-06-29 03:44:37 -07:00
hqu
fd227fe3f8 qcacld-3.0: Initialize mapping from TIDs to category table
Add initialization for mapping from TIDs including extension TIDs
to category table.

The change is also to sync with CLD2.0.

Change-Id: Ie79e5420cc22f4cb3e34ceeb020f3fde8f170d4d
CRs-Fixed: 2065379
2017-06-29 01:49:50 -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
Deepak Dhamdhere
d42ab7c3dc qcacld-3.0: Ignore peer_unmap_timer_handler during recovery
If the driver recovery is in progress, unmap events may not come
from firmware. Ignore the peer_unmap timeout in such case.

CRs-Fixed: 2033452
Change-Id: I284c57530a477953247ad325dfaddff72767aecf
2017-06-18 16:11:04 -07:00
Deepak Dhamdhere
2b283c6543 qcacld-3.0: Use qdf_timer_sync_cancel to stop peer_unmap_timer
Peer may get deleted between the time peer_unmap_timer fires and
the handler gets executed in mc thread context, causing memory
access error. Use qdf_timer_sync_cancel() to wait for the handler
to finish its job before freeing the peer object.

CRs-Fixed: 2026393
Change-Id: Ie60b5c300be529d529f7e836adc0e3be917fe2e8
2017-06-18 16:11:03 -07:00
Deepak Dhamdhere
fe55836608 qcacld-3.0: Initialize peer_unmap_timer during peer attach
Initialize peer_unmap_timer during peer attach instead of at the
time of peer detach. Then ol_txrx_unref_delete can destroy
the timer without peer detach getting called earlier.

CRs-Fixed: 2014183
Change-Id: Icebec27d5562350871a89b5cf71ae99f096feee8
2017-06-18 16:11:01 -07:00
Deepak Dhamdhere
e1c2e21a3d qcacld-3.0: Add peer unmap timeout handler
Add a timeout handler that fires off 6000 ms after peer detach
operation is initiated. Used for debugging the scenario of missing
peer unmap events after deleting a STA type peer.

CRs-Fixed: 1109867
Change-Id: Iad18f374ba3c1458c5214befd1d5c1517a7bdedf
2017-06-18 16:10:59 -07:00
Yun Park
641304c513 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_internal.h
Fix Datapath kernel checkpatch warnings in ol_txrx_internal.h

Change-Id: I4be2823e6179322bcbf26f1c2f1120a238434c06
CRs-Fixed: 2032874
2017-06-14 08:25:24 -07:00
Yun Park
4a2be57d53 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_types.h
Fix Datapath kernel checkpatch warnings in ol_txrx_types.h

Change-Id: Ia18c899500f5162ad4a6e283db161350d5faea16
CRs-Fixed: 2032874
2017-06-14 08:25:23 -07:00
Yun Park
eaea863f3f qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx.c
Fix Datapath kernel checkpatch warnings in ol_txrx.c

Change-Id: I9a11c8a61524e91d9df6357cf0994b261dcc3d04
CRs-Fixed: 2032874
2017-06-14 08:25:21 -07:00
Yun Park
ba9b617e9c qcacld-3.0: Fix Datapath kernel checkpatch warnings in ipv6_defs.h
Fix Datapath kernel checkpatch warnings in ipv6_defs.h

Change-Id: Id64667f9b7d80104187f715a8ede6095ee69ef88
CRs-Fixed: 2032874
2017-06-14 08:25:19 -07:00
Yun Park
0b3741c555 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_rx_fwd.h
Fix Datapath kernel checkpatch warnings in ol_rx_fwd.h

Change-Id: I50e2a892ae70143a393bdefe409d9bfbc2d48e79
CRs-Fixed: 2032874
2017-06-14 08:25:17 -07:00
Yun Park
f9677156d7 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_tx_send.c
Fix Datapath kernel checkpatch warnings in ol_tx_send.c

Change-Id: I94b3e093eac8d51524a689151028ef296cc4da82
CRs-Fixed: 2032874
2017-06-14 08:25:15 -07:00
Yun Park
34adb051ad qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_rx.h
Fix Datapath kernel checkpatch warnings in ol_rx.h

Change-Id: I3a83d4ed95a004fee57af674c385c8eb2d519d23
CRs-Fixed: 2032874
2017-06-14 08:25:13 -07:00
Yun Park
a13ef65af1 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_rx_reorder.h
Fix Datapath kernel checkpatch warnings in ol_rx_reorder.h

Change-Id: I0a7b214a2a81c3f8d4db7efa8c47d8ab97878db6
CRs-Fixed: 2032874
2017-06-14 08:25:12 -07:00
Yun Park
02355f4da8 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_rx.c
Fix Datapath kernel checkpatch warnings in ol_rx.c

Change-Id: I75477a2ed36394fd0d1cbdc6b6cbbd96e044a9b3
CRs-Fixed: 2032874
2017-06-14 08:25:10 -07:00
Yun Park
512f3a145d qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_peer_find.c
Fix Datapath kernel checkpatch warnings in ol_txrx_peer_find.c

Change-Id: Ie0416390bfd4c1f6a50c70747a9fc5b87daa7959
CRs-Fixed: 2032874
2017-06-14 08:25:09 -07:00
Yun Park
863014df56 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx.h
Fix Datapath kernel checkpatch warnings in ol_txrx.h

Change-Id: I8123dc787b9e26882fbe01aada3b9dcc698d86ed
CRs-Fixed: 2032874
2017-06-14 08:25:06 -07:00
Yun Park
a7217756a3 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_peer_find.h
Fix Datapath kernel checkpatch warnings in ol_txrx_peer_find.h

Change-Id: Ia21408c855a8cc729a9075b36eed4ce753f8cece
CRs-Fixed: 2032874
2017-06-14 08:25:05 -07:00
Yun Park
28e92985a9 qcacld-3.0: Fix Datapath kernel checkpatch warnings in wdi_event_api.h
Fix Datapath kernel checkpatch warnings in wdi_event_api.h

Change-Id: Iec1119b62d0aa9efbc55121b84afc7e93ad98ee1
CRs-Fixed: 2032874
2017-06-14 08:25:03 -07:00
Yun Park
577335799a qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_tx_queue.c
Fix Datapath kernel checkpatch warnings in ol_tx_queue.c

Change-Id: Icc186d67922d810b84ca11049a6282ad952c5da8
CRs-Fixed: 2032874
2017-06-14 08:25:02 -07:00
Yun Park
1239b22f93 qcacld-3.0: Fix Datapath kernel checkpatch warnings in txrx.h
Fix Datapath kernel checkpatch warnings in txrx.h

Change-Id: Ia58e1014120fcdf314927d0d3680ca27d16621f3
CRs-Fixed: 2032874
2017-06-14 08:25:00 -07:00
Yun Park
196641d7b9 qcacld-3.0: Fix Datapath kernel checkpatch warnings in wdi_event.h
Fix Datapath kernel checkpatch warnings in wdi_event.h

Change-Id: I15295af3c6711b5b477739ec5741ba2b4e36b6d3
CRs-Fixed: 2032874
2017-06-14 08:24:59 -07:00
Yun Park
cb0bb18ba3 qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_tx_desc.h
Fix Datapath kernel checkpatch warnings in ol_tx_desc.h

Change-Id: I00647231116da840dd3e49e54fee6c1c5826982d
CRs-Fixed: 2032874
2017-06-14 08:24:57 -07:00
Yun Park
d79331a15f qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_tx_queue.h
Fix Datapath kernel checkpatch warnings in ol_tx_queue.h

Change-Id: I2b44744e7021b877554dd08d9f5a01e611ff457d
CRs-Fixed: 2032874
2017-06-14 08:24:55 -07:00
Yun Park
89f62d6c3a qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_txrx_encap.c
Fix Datapath kernel checkpatch warnings in ol_txrx_encap.c

Change-Id: Ib1af9f38ab4fb13fa11b1fcc8c21d1b6bb8a614d
CRs-Fixed: 2032874
2017-06-14 08:24:54 -07:00
Yun Park
b539ea38bf qcacld-3.0: Fix Datapath kernel checkpatch warnings in ol_rx_pn.c
Fix Datapath kernel checkpatch warnings in ol_rx_pn.c

Change-Id: I68d52e0dfcf2521b34e4a396528b9bfb8a0058fb
CRs-Fixed: 2032874
2017-06-14 08:24:52 -07:00