Commit Graph

417 Commits

Author SHA1 Message Date
Nirav Shah
d21a2e3d6c qcacld-3.0: Featurize dp trace
Featurize dp trace to compile out cleanly.

Change-Id: I23b86459af605baa257af4ef62497f010b864215
CRs-Fixed: 2228465
2018-05-18 12:14:39 -07:00
Nirav Shah
a3cc7195ef qcacld-3.0: Flow control Resize implementation
Flow control resize implementaion as part of
Genoa enhancements to reduce total desc requirement
from 3600 to 2000.

Change-Id: Iee5d3ff08dcea13c11632cd29e6edba0dc3e979f
CRs-Fixed: 2223553
2018-05-18 12:14:33 -07:00
Jeff Johnson
3dca222e0b qcacld-3.0: dp: Fix misspellings
Address the following issues in the core/dp folder:
CHECK: 'accomodate' may be misspelled - perhaps 'accommodate'?
CHECK: 'acess' may be misspelled - perhaps 'access'?
CHECK: 'bahavior' may be misspelled - perhaps 'behavior'?
CHECK: 'catagory' may be misspelled - perhaps 'category'?
CHECK: 'continous' may be misspelled - perhaps 'continuous'?
CHECK: 'controler' may be misspelled - perhaps 'controller'?
CHECK: 'curently' may be misspelled - perhaps 'currently'?
CHECK: 'defintion' may be misspelled - perhaps 'definition'?
CHECK: 'Defintions' may be misspelled - perhaps 'Definitions'?
CHECK: 'desriptor' may be misspelled - perhaps 'descriptor'?
CHECK: 'extention' may be misspelled - perhaps 'extension'?
CHECK: 'informations' may be misspelled - perhaps 'information'?
CHECK: 'lenght' may be misspelled - perhaps 'length'?
CHECK: 'managment' may be misspelled - perhaps 'management'?
CHECK: 'messsage' may be misspelled - perhaps 'message'?
CHECK: 'neccessary' may be misspelled - perhaps 'necessary'?
CHECK: 'recieved' may be misspelled - perhaps 'received'?
CHECK: 'Recieve' may be misspelled - perhaps 'Receive'?

Change-Id: Ib8c1b94b5bb3bb5798e41dbb4c1461be80fd1398
CRs-Fixed: 2241941
2018-05-16 18:01:38 -07:00
Jeff Johnson
bd16f9df6b qcacld-3.0: Fix misspelling of 'request'
Fix misspelling 'reuqest' => 'request'

Change-Id: I6ad1d3d45922bba6362304bd28bb1239eeb0c5e1
CRs-Fixed: 2241934
2018-05-16 18:01:03 -07:00
Jeff Johnson
37df7c3d8f qcacld-3.0: Fix misspelling of 'want'
Fix misspelling 'wnat' => 'want'

Change-Id: I05468a6203c482b71ab0dba3e6d4177ddf66686d
CRs-Fixed: 2240067
2018-05-16 18:00:00 -07:00
Sravan Kumar Kairam
adbff87a09 qcacld-3.0: Fix possible OOB access in ol_rx_reorder_detect_hole
Currently tid is extracted from HTT message and it is used without
check. This may cause possible OOB array read. To address this add
check for valid tid.

Change-Id: Idb03236e05fe43326f9ab46ae8368adc9a92d92a
CRs-Fixed: 2225497
2018-05-16 10:26:17 -07:00
Sravan Kumar Kairam
2be2792e2e qcacld-3.0: Fix possible OOB issue in ol_tx_desc_update_group_credit
Currently tx desc id is extracted from HTT message and it is used
without check. This may cause possible OOB array read. To address
this add check for valid tx desc id.

Change-Id: I121fc4d550aa587f00ec315e3a20dfb136f4d7af
CRs-Fixed: 2225461
2018-05-16 06:46:13 -07:00
Manjunathappa Prakash
7ed5ef5d16 qcacld-3.0: Get txrx_pdev context from global cds_context
__hdd_tx_timeout passes cdp_soc context dump_flow_pool_info callback
function. Lithium_dp interchangeably use cdp_soc and dp_soc as cdp_soc is
first element of dp_soc.
Same is not valid for iHelium datapath, do not expect caller to pass
the txrx_pdev context, instead get it from global cds_context.

Change-Id: I64932fefd1294275608258df49544135d3a0562c
CRs-Fixed: 2240099
2018-05-15 13:54:12 -07:00
Rakesh Pillai
33942c4344 qcacld-3.0: Fix Use-After-Free in ol_txrx_pdev_detach
The use TAILQ_FOREACH for freeing the fw_stats list during
pdev detach causes a use-after-free condition, which can lead
to unexpected behavior during the driver load or unload.

Fix the possible Use-after-free condition in pdev detach, by
using TAILQ_FOREACH_SAFE instead of TAILQ_FOREACH for freeing
the fw_stats list.

CRs-Fixed: 2214520
Change-Id: I5dfcc5e3f0d2e77a5f6226eca06bc6ab1af4e643
2018-05-15 03:21:22 -07:00
Rakshith Suresh Patkar
83871f7a7d qcacld-3.0: Define DPT_DEBUGFS_PERMS outside ifdef
DPT_DEBUGFS_PERMS macro has been defined inside
ifdef QCA_SUPPORT_TXRX_LOCAL_PEER_ID. Since this can cause problems
when the above config is not set, defining it outside.

Change-Id: Ibf02f692ddaf0b5de17d647cce27a6e093f7b7df
CRs-Fixed: 2238106
2018-05-14 11:39:08 -07:00
Jeff Johnson
f2cf659cc2 qcacld-3.0: Fix typo "diable"
Replace typo "diable" with correct spelling "disable".

Change-Id: Ifb0d0086c1356a92fd868a22c2f1e1693f66066a
CRs-Fixed: 2238297
2018-05-12 04:30:06 -07:00
Jeff Johnson
4ceed38fbf qcacld-3.0: Fix typo "recieve"
Replace typo "recieve" with correct spelling "receive".

Change-Id: I16de4aedcd0f401da8b11fa0ea4989ad1e73bf57
CRs-Fixed: 2238297
2018-05-12 04:30:02 -07:00
Jeff Johnson
fa7d9601ef qcacld-3.0: Fix typo "seperate"
Replace typo "seperate" with correct spelling "separate".

Change-Id: Ic2e69d5a15366c0c2fe57d2f378cac0e11228f8e
CRs-Fixed: 2238297
2018-05-12 04:28:53 -07:00
Jeff Johnson
118a4a05af qcacld-3.0: Fix typo "capabilites"
Replace typo "capabilites" with correct spelling "capabilities".

Change-Id: I1c84c401fd732227d63a159bea7f7f3cefacf153
CRs-Fixed: 2237725
2018-05-09 16:31:19 -07:00
Jeff Johnson
5ead5ab10f qcacld-3.0: Fix typos "sucess" and "sucessful"
Replace typos "sucess" and "sucessful" with correct spellings
"success" and "successful"

Change-Id: I30746cbab4533da9b052261fa9bb87214188138b
CRs-Fixed: 2237724
2018-05-09 16:31:15 -07:00
Manjunathappa Prakash
fb5f25b24a qcacld-3.0: Add GRO support to NAPI+Rx_thread processing model
GRO aggregations are hanging out of NAPI instance and We cannot use the
hif NAPI instance in Rx thread as gro_list inside NAPI is flushed out
at the start and end of NAPI poll, this will corrupt the gro_list on
which rx_thread is working. Address this concern by creating dummy
NAPI instances mapping to each hif NAPI and not scheduling them.

Change-Id: I6e1de57a669c56206a7863e86c3840bd0a9eabc1
CRs-Fixed: 2128450
2018-05-04 20:42:58 -07:00
Mohit Khanna
02281da645 qcacld-3.0: add DPTRACE Enhancements - Phase 2
Change data packets printing to one line
Add msdu-id to TX packets
Increase data packets size to include the complete IP packets
Indication/print when the throttling occurs

Change-Id: I4831c517b41f81003b8d28448a3093d911ac978c
CRs-Fixed: 2157768
2018-05-03 04:43:30 -07:00
Sravan Kumar Kairam
fbc87b7230 qcacld-3.0: Fix wlan_ipa_set_perf_level failure for UNIFIED_WDI_API
Add Unified WDI API support for ol_txrx_ipa_set_perf_level and fix
client parameter for ipa_wdi_set_perf_profile.

Change-Id: Ieaaf7cf5231f74cd6ba358c02032ae173d9618f0
CRs-Fixed: 2211504
2018-05-02 19:47:55 -07:00
Jeff Johnson
1896fdcb30 qcacld-3.0: dp: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Id790fa94c7b6feb91db5f3d91630bf0cd5264192
CRs-Fixed: 2229655
2018-04-24 14:48:38 -07:00
Rakshith Suresh Patkar
44f6a8f1d9 qcacld-3.0: Debugfs Implementation for dp trace collection
Implement debugfs interface to dump DP trace buffer
to a debugfs file.

Change-Id: I51ac3acbfc404b87cacc8a247f85cc4ee9971b61
CRs-Fixed: 2180977
2018-04-23 07:50:50 -07:00
Manjunathappa Prakash
fa2754cce5 qcacld-3.0: Dont access msdu after it is transmitted
Tx context is holding on to reference to msdu, meanwhile Tx completion
freed the msdu, remove redundent qdf_nbuf_reset_num_frags(msdu)

Change-Id: I4c51f6e61c19147d2d4dafbd19bdfc3029a872ab
CRs-Fixed: 2222024
2018-04-19 19:25:57 -07:00
jiad
80055eb33c qcacld-3.0: Add frag_header to support pre-wdi2.0 platform
wdi2.0 feature adds extra 2 bytes to frag_header and thus hdr_len
to IPA HW also adds 2 bytes. This change breaks pre-wdi2.0 platform
with WiFi FW discarding all TX traffic since packet payload is
with an extra 2-byte offset.

Fix is to add frag_header structure with pre-wdi2.0 pattern.

Change-Id: I467a05bab4111a305ae23250c61cecc050821611
CRs-Fixed: 2047714
2018-04-18 22:03:28 -07:00
Orhan K AKYILDIZ
15e2d83d23 qcacld-3.0: Fix a race btw tx and tx-compl
While handling a multi-segment TSO packet, there is a race condition
where, if tx complete arrives fast enough, the un-sent TSO segments
may be lost forever and a previously sent segment would be attempted
to be sent over.

Fix the race condition. Dont use the segment after send to go to the
next one.

Change-Id: I4abd9d26f50c749141925894a8845cf82df4d222
CRs-Fixed: 2168778
2018-04-14 07:37:26 -07:00
Alok Kumar
ddd457e4a3 qcacld-3.0: Fix usage of PDEV pointer after free
Currently pdev pointer is freed prematurely in ol_txrx_pdev_pre_detach
but the same pointer is used when ol_txrx_pdev_detach is called. This
may lead to invalid pointer dereference issue.

To fix this issue, free pdev pointer in ol_txrx_pdev_detach after
ol_txrx_pdev_pre_detach is called.

Change-Id: I089d70842b90b568ee8a38c6ed56f5418df7303d
CRs-Fixed: 2207417
2018-04-10 08:52:35 -07:00
Manjunathappa Prakash
7a4ecb2281 qcacld-3.0: Fix argument type for ol_txrx_stats_callback
ol_txrx_stats_callback is not implemented as it is not required, fix
the calling function argument type to match the prototype.

Change-Id: I8a976737af8f226a1774950170f445c93ebf683b
CRs-Fixed: 2216859
2018-04-04 17:47:15 -07:00
jitiphil
8ad8a6f9b2 qcacld-3.0: Fix invalid use of %p in ol_txrx_peer_release_ref
Currently %p is used in ol_txrx_peer_release_ref function in
ol_txrx.c which violates security guidelines

To address this issue change %p to %pK.

Change-Id: I06fd9eb260d1c53e4de235b710cd0ea05125b976
CRs-Fixed: 2170905
2018-04-03 01:42:50 -07:00
chenguo
861751bafa qcacld-3.0: Add target credit info in TX_QUEUE_STATS
When debug traffic stall issues, target credit number is also one
key point to trace beside status of TX queues. So add such info
in TX_QUEUE_STATS.

Change-Id: I2615545c1e041af920a4d0d6d0a8e3990768b762
CRs-Fixed: 2060945
2018-04-02 20:41:43 -07:00
Yun Park
302bdcce10 qcacld-3.0: Remove redundant typedef 'ipa_uc_op_cb_type'
Remove a redundant typedef 'ipa_uc_op_cb_type' from ol_txrx_type.h.

Change-Id: Id3cd82b846e85a0aed39a530c0510faa5572ca61
CRs-Fixed: 2213103
2018-04-02 19:39:31 -07:00
Alok Kumar
75355aa8f3 qcacld-3.0: Add support for Tx OTA Ack stats
Add stats in vdev for Tx OTA success and failure count

Change-Id: I6849dfc1d11351f5cc63acf3a22bf72a1ef8109c
CRs-Fixed: 2211898
2018-03-28 14:44:27 -07:00
Alok Kumar
504230b163 qcacld-3.0: Fix buffer overflow in process_tx_info and process_rx_info
Currently data in "pl_tgt_hdr" is used directly from firmware without
any length check which may cause buffer over-read.

To address this issue add length check before accessing data offset

Change-Id: Ic2930fdf7168b79a8522be282b0e1cd19214742a
CRs-Fixed: 2148631
2018-03-20 14:33:54 -07:00
Poddar, Siddarth
3906e17e74 qcacld-3.0: track connectivity stats for rx packets
Track connectivity stats for data rx packets through a
callback function hdd_tx_rx_collect_connectivity_stats_info().

Change-Id: I045ba694495876273691373a9d0a8995d4aa9c34
CRs-Fixed: 2161889
2018-03-19 15:33:00 -07:00
Poddar, Siddarth
31797fa6a8 qcacld-3.0: Extend debug stats
Extend to collect connectivity check stats other
than ARP such as DNS, TCP SYN/SYN-ACK/ACK, and Ipv4.
Add extra attributes in existing vendor command(set/reset
and get NUD debug stats) for above  connectvitiy stats.

CRs-Fixed: 2161889
Change-Id: I037c4ec29b181a0b3117ae2abbc7a2229b373ac2
2018-03-19 15:32:58 -07:00
Sravan Kumar Kairam
b664b6c61b qcacld-3.0: Add support for WLAN-IPA WDI 2 SMMU S1 translation
Update WLAN-IPA WDI-2 datapath buffer sharing for SMMU Stage 1
translation support. When SMMU Stage 1 translation is enabled
DMA APIs return IO virtual address(IOVA) instead of physical
address. This IOVA need to mapped to physical address by IPA
module before accessing them

Change-Id: I969ad020d5b423c785539f346286b212ea5830a1
CRS-Fixed: 2072960
2018-03-19 09:34:26 -07:00
Tiger Yu
757f448a04 qcacld-3.0: Remove unmap for packets in the vdev ll_pause queue
The packets in the vdev ll_pause queue hasn't been doing the qdf_nbuf_map,
or they might be mapped by other module like ipa. So do not unmap in the
ol_txrx_vdev_detach to avoid the mis-match operation.

Change-Id: I498c09152be95464bc6343f2a48d63e13d621a82
CRs-Fixed: 2198903
2018-03-05 20:48:39 -08:00
Nirav Shah
eb017befbd qcacld-3.0: Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I2de81794cd16521097ffa6956a18b4b0fe981d36
CRs-Fixed: 2196757
2018-02-28 05:29:39 -08:00
Venkata Sharath Chandra Manchala
2996517bbc qcacld-3.0: Enable pktlog for Helium
Add Support to enable pktlog through INI
for helium based devices.

Change-Id: I0acfcf1db8c007c5e2ce81fcb1775fd1b7a50570
CRs-Fixed: 2185210
2018-02-28 00:31:24 -08:00
Krunal Soni
3cf1f1cef6 qcacld-3.0: Initialize save_peer_id_ref_cnt array with default value
One of the arrays defined in data-path's API is not initialized
and this API assumes that subsequent loop will fill up the array to
correct default value. This assumption is wrong.

Intialize the array "save_peer_id_ref_cnt" in API
"ol_txrx_peer_remove_obj_map_entries" to default value "0" to avoid
any issue.

CRs-Fixed: 2196084
Change-Id: If0080708662fc44e6583823717798a9f505ec1d0
2018-02-27 20:17:49 -08:00
jiad
af1b76efa5 qcacld-3.0: skip dma unmap for IPA owned skb
In MCC tx path, skb is owned by IPA driver, where IPA driver provides
wlan driver directly DMA mapped address. Doing dma unmap of the skb
will lead to skb dma map check failure.

Fix is to skip dma unmap for IPA owned skb and let IPA driver handle
dma unmap.

Change-Id: Ib38ca949ba915785e460c05172b70088a3564b1c
CRs-Fixed: 2189889
2018-02-27 01:57:25 -08:00
Sravan Kumar Kairam
c1ae71c4cd qcacld-3.0: Add ARP debug stats
Change to collect arp packet stats along with
existing hdd stats to debug arp packet related
issues.

Change-Id: Idce70799bd3698dc8a8ecd8cfc8ef7d9bf1f5764
CRs-Fixed: 2019787
2018-02-26 04:07:10 -08:00
Hanumanth Reddy Pothula
855f7ef72f qcacld-3.0: Add txrx_get_pldev API to get packetlog object
Packetlog initialization is failing as txrx_get_pldev API is missing,
which returns paketlog object from the given pdev.

Add txrx_get_pldev API to get packet log object for the given pdev.

Change-Id: I2219a5c0964e76637ff8dbef92661b98cd22fb28
CRs-Fixed: 2189211
2018-02-15 10:15:11 -08:00
Yun Park
84c0cebe87 qcacld-3.0: Add IPA WDI Unified API support
Support for WDI2 in the Unified IPA WDI APIs.

Change-Id: Ife42a6a96ce80070de51f994e29ded252b3dd980
CRs-Fixed: 2183498
2018-02-15 09:20:27 -08:00
Kabilan Kannan
fa16398e7a qcacld-3.0: Return the correct status in txrx clear peer
STA peer can be cleared from peer detach and HDD. If the
peer is cleared by peer detach, then return success to
HDD request.

Change-Id: I7aa564e7f2a1c9ce336ae96679d93a6e11703c37
CRs-Fixed: 2181163
2018-02-08 23:34:31 -08:00
Tiger Yu
2da63e421a qcacld-3.0: only unmap the mapped nbuf in the ol_txrx_vdev_flush
The TX buffers in the vdev->ll_pause pending queue, which haven't mapped
the physical address.

Adding nbuf physical address checking to avoid the mis-matching unmap
especially when the MEMORY_DEBUG is enabled.

Change-Id: I6b0fcd1c7d07ca358d07b9931dea321ee8c6169a
CRs-Fixed: 2183678
2018-02-08 13:13:41 -08:00
Naveen Rawat
17c42a8802 qcacld-3.0: Remove panic and enhance logging for peer_delete timeout
Remove panic after peer_delete timeout and fail corresponding peer
operation. Peer reference count can be taken by kworker thread which
may get pre-empted by other higher priority threads or stuck, leading
to delay in releasing reference. This delay cannot be completely
removed, hence rather than panic after timeout, enhance logging and
fail corresponding peer operation.

Change-Id: I42c379c0cf91d29d293c3c53c3a378421aef07f9
CRs-Fixed: 2181097
2018-02-08 06:58:27 -08:00
Jiachao Wu
641760eac6 qcacld-3.0: Free peers when SSR
Free peers without waiting for peer unmap event when SSR.

Change-Id: I6fa6c1b2df4919ad34ec931c4217bec0eefb2eac
CRs-Fixed: 2176132
2018-02-05 01:31:14 -08:00
Jingxiang Ge
190679b412 qcacld-3.0: Fix use-after-free for peer->access_list
In ol_txrx_peer_release_ref, it is possible that this function is
scheduled out when just unlock peer_ref_mutex, unmap event will
come to decrease ref_cnt and free peer object, when
ol_txrx_peer_release_ref is scheduled back and access peer info,
it will cause use-after-free.

Get peer info in the protection of peer_ref_mutex.

Change-Id: Ic442f53e0993a931c4411d9dbc85f04d6a85dc46
CRs-Fixed: 2180584
2018-01-31 21:49:26 -08:00
Yun Park
5dd9a120b7 qcacld-3.0: Protect peer info when getting vdev by sta_id
When getting vdev by sta_id, peer could be deleted after retrieved,
so garbage vdev is returned.
To protect peer info, increase ref_cnt and delete peer when the ref
count is 0.

Change-Id: I850d38166d7c16d7f5e580baf3e0d17db22583f8
CRs-Fixed: 2171619
2018-01-29 19:44:02 -08:00
Yun Park
6366101a84 qcacld-3.0: Fix NULL dereference of 'vdev' in txrx
Fix dereference of pointer 'vdev' before NULL check.

Change-Id: I3d0a71f4373ae83a8642e3f2b1907c4556b114cc
CRs-Fixed: 2162245
2018-01-26 15:32:04 -08:00
Frank Liu
4362e46c32 qcacld-3.0: Add protections for accessing peer
Add necessary protections for accessing ol txrx peer:
1. Add protection when increase peer reference count;
2. Add protection when update vdev last peer.

Change-Id: I93628d8d2e34aac7ac041877310e0f430b8238bc
CRs-Fixed: 2166668
2018-01-26 03:35:33 -08:00
Jingxiang Ge
9f297069f8 qcacld-3.0: Fix race condition for get peer
There is a very rare race condition between
ol_txrx_peer_find_by_local_id_inc_ref(running in OL RX
thread context) and ol_txrx_peer_detach(running in MC
thread context) where MC thread 1st got chance and cleared
the peer->valid flag before OL RX thread can increment the
ref count and this led to OL RX thread got a peer without
any ref count which was freed later while OL RX thread was
still using it.

Change:
1 Set peer to NULL if peer valid check fails in
  ol_txrx_peer_find_by_local_id_inc_ref
2 release peer ref cnt for error case in ol_rx_data_cb

Change-Id: Id21350933386464e5814babcb078d9719572af86
CRs-Fixed: 2176704
2018-01-26 01:39:27 -08:00