Commit Graph

805 Commits

Author SHA1 Message Date
Himanshu Agarwal
740f30f614 qcacmn: Do netif_rx_ni() for frames received before peer assoc
While processing of frames received before peer is registered in process
context, tcp_v4_rcv() is called which takes a spinlock and in between the
processing before spinlock can be released, it is getting preempted by
hif_napi_poll() as it gets executed in softirq context. It tries to take
the same spinlock in tcp_v4_rcv() resulting in deadlock.

Do netif_rx_ni() for frames received before peer is registered.

Change-Id: I563ba5bccb94ea4084ecfd5d31045a5715bbfef4
CRs-Fixed: 2034991
2017-08-10 01:49:23 -07:00
Yun Park
fde6b9e551 qcacmn: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I07f7592d547bb796a3c12bbc4745cee22e2c0022
CRs-Fixed: 2064810
2017-08-07 17:47:38 -07:00
Manjunathappa Prakash
8804f978eb qcacmn: Do not LRO aggregate if peer is not connected
We have race condition between lro flush of hif_napi_poll and MC thread
lro flush while flushing the ol_txrx_cached_bufq packets for peer. Avoid
the situation by simply marking the all the Rx packets as LRO ineligible
while enqueuing packets to ol_rx_cached_buf.

Change-Id: Ief0d7dd6c25cf45912820f0e237fd1179a57a5c7
CRs-Fixed: 2032674
2017-08-03 19:48:40 -07:00
Srinivas Girigowda
2cde14e687 qcacmn: 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: Ib6d9e863d6355746138c4b087a0cb19f12404f75
CRs-Fixed: 2055513
2017-08-03 19:48:35 -07:00
Srinivas Girigowda
3188f98125 qcacmn: Fix recursive memory allocation failure
On low memory conditions, qdf_mem_malloc_debug() fails and
on failure it triggers a host diag event to user space
which again tries to allocate memory using qdf_mem_malloc_debug()
which fails and this loop continues and might have caused
workqueue to get stuck.

Fix this by not sending the host diag event to user space on
low memory conditions.

Change-Id: I5bd302dfa372d40c570eaa830ed82a0bbaddc51f
CRs-Fixed: 2026975
2017-08-03 19:48:33 -07:00
Srinivas Girigowda
bc4a19290d qcacmn: Fix clang warning: redefinition of typedef 'qdf_mutex_t'
drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/qdf/linux/src/qdf_lock.c:42:23:
warning: redefinition of typedef 'qdf_mutex_t' is a C11 feature [-Wtypedef-redefinition]
typedef __qdf_mutex_t qdf_mutex_t;
                      ^
drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/qdf/inc/qdf_lock.h:240:23:
note: previous definition is here
typedef __qdf_mutex_t qdf_mutex_t;

Change-Id: Ib8a66843e22595d5ba07a38606032679c3c1b46d
CRs-Fixed: 2055513
2017-08-03 19:48:31 -07:00
Srinivas Girigowda
f6b3aacb2e qcacmn: Add qdf_driver_type
Add qdf_driver_type.

Change-Id: Ib5c1d71ed43ea09cea8d65ed9aef0937391b6d09
CRs-Fixed: 2055513
2017-08-03 19:48:29 -07:00
Dustin Brown
bac753d968 qcacmn: Avoid WD panic during scheduler shutdown
Avoid scheduler watchdog panic during scheduler shutdown to avoid
interfering with recovery mechanisms.

Change-Id: If32cc77a9725fdb61fc09c4065fc2603f2e8e00b
CRs-Fixed: 2069429
2017-08-01 12:46:21 -07:00
Chaithanya Garrepalli
cdc307f70b qcacmn: Replace SKB CB vdev_ctx member with vdev_id
Removed submit_ts and replaced vdev_ctx with vdev_id
in qdf_nbuf_cb

Change-Id: Ib478aa69ee8069d1c5ff5de29ee0431c238f4b7d
CRs-Fixed: 2065367
2017-08-01 10:02:46 -07:00
Yingying Tang
96b8cea9be qcacmn: Fix "__aeabi_uldivmod" symbol error
There is an unknown symbol error "__aeabi_uldivmod" due to
a division operation between uint64 value in wlan driver.
Add qdf API to use do_div to avoid "__aeabi_uldivmod" symbol
error.

Change-Id: I24e51990ff9e0ecea327ad9c71266fd768d62a6c
CRs-Fixed: 2013952
2017-07-24 07:52:42 -07:00
Ashish Kumar Dhanotiya
1c5d902876 qcacmn: Add proper api for ktime_get_boot_ns for kernel 3.10
Kernel api ktime_get_boot_ns is not supported in kernel version 3.10
so add correct api for kernel 3.10.

Change-Id: Id78d50d759db90a9c6edf4114f8af1a925dfb9bb
CRs-Fixed: 2076538
2017-07-24 02:37:31 -07:00
Rajeev Kumar
fd40df4bbc qcacmn: Log leaked SKB counts before calling QDF_BUG
If SKBs are leaked then 1st log number of SKBs leaked
and then trigger QDF_BUG.

Change-Id: I355e33727b7772af7bd58b9eabbd109bfa3ea2f0
CRs-Fixed: 2065760
2017-07-18 23:35:10 -07:00
Srinivas Girigowda
ad612a2371 qcacmn: Update MODULE_LICENSE to "Dual BSD/GPL"
Update MODULE_LICENSE to "Dual BSD/GPL".

Change-Id: I8ee3bbc9881d97b771ad61fd43b7b0ca0d00dc73
CRs-Fixed: 2077923
2017-07-18 23:35:09 -07:00
Nandha Kishore Easwaran
403b085d0a qcacmn: Change trace level of dp_trace to debug
Changing the trace level of dp_trace from none to debug so that
packets are visible in live mode when debbug is enabled

Change-Id: I6e5de90292580006690c03021f0e5e837dbcefbf
CRs-fixed: 2076734
2017-07-15 11:38:58 -07:00
Pratik Gandhi
26f45f7b0b qcacmn: nbuf cb optimization
Rearranged qdf_nbuf_cb to avoid padding bytes

Change-Id: I597ffdfee49896eda0302a8448845568f3678afb
CRs-Fixed: 2065367
2017-07-14 20:15:21 -07:00
Rajeev Kumar
bc19894820 qcacmn: Add QDF debug capability to track total SKB allocation
Enhance existing SKB leak debug capability to track total
SKB allocation by driver in SLUB debug enabled builds.

Change-Id: I6bb19ab482961febd8bb5adebe8f71e732ff60dd
CRs-Fixed: 2066205
2017-07-12 21:44:29 -07:00
Srinivas Girigowda
7dacc4efe3 qcacmn: Fix clang warnings implicit enum qdf_dma_data_direction
warning: implicit conversion from enumeration type 'enum
 qdf_dma_data_direction' to different enumeration type 'enum
 dma_data_direction' [-Wenum-conversion]

Change-Id: I181a448c48e8975025e67c2fc5ef44d3022ff1a0
CRs-Fixed: 2055513
2017-07-12 20:12:52 -07:00
Srinivas Girigowda
43977f7e6d qcacmn: Fix kernel checkpatch warnings in QDF
Fix kernel checkpatch warnings in QDF.

Change-Id: Id2f54c6c436bde55b040012fbbe9922cb177461e
CRs-Fixed: 2028128
2017-07-12 20:12:49 -07:00
Srinivas Girigowda
4831049768 qcacmn: Fix clang compilation warnings
Fix clang compilation warnings.

Change-Id: If7d2d148f4d478d151640ee1a85ca64a9096cdd2
CRs-Fixed: 2055513
2017-07-12 20:12:48 -07:00
Mohit Khanna
ed31227496 qcacmn: TSO - Fix ip_len for ipv6 packets
IP length is being calculated incorrectly for ipv6 packets during TSO.

Fix IP len to exclude IP header and include only the payload length
(TCP header + application payload).

Change-Id: I577e3da77e4cbfba0b76c0e5bce3700be2b70c19
CRs-Fixed: 2057055
2017-07-12 19:26:09 -07:00
Ravi Joshi
1eaf7b5b82 qcacmn: Update radiotap header to include HE parameters
Add/extend radiotap header to include high-efficiency (11ax)
parameters.

CRs-Fixed: 2071602
Change-Id: I8bfbed16edca42eb38256bccc2efff8f21e50f15
2017-07-06 21:55:15 -07:00
Kapil Gupta
7401104431 qcacmn: Add support for AES ctr mode for kernel 3.18
Add changes to support AES CTR modes for FILS encryption and
decryption.

Change-Id: I418e85987bfa96efb7b9dc10e9b2125290299c89
CRs-Fixed: 2039626
2017-07-06 08:29:27 -07:00
Ashish Kumar Dhanotiya
c846868cd8 qcacmn: Add correct api call to get proper boot time
Propagation from qcacld-2.0 to qcacmn

Currently to get clock boottime, qdf_get_monotonic_boottime_ns
api is getting used which does not include the suspend time.

To include the system suspend time also in clock boottime, use
qdf_get_bootbased_boottime_ns api which uses ktime_get_boot_ns
kernel api.

Change-Id: Ibcc628c315201fa3ced7e1ad96753772d91707b2
CRs-Fixed: 2069085
2017-07-05 03:40:50 -07:00
Kapil Gupta
041087bfe8 qcacmn: Resolve compilation errors in lower version kernels
symmetric key cipher APIs are present in linux kernel version 4.3
and above only.

Add changes to protect symmetric key cipher APIs invoke in lower
version kernels.

Change-Id: I512d0d98886c887a242a834763b46b2ec0cd4751
CRs-Fixed: 2034502
2017-06-28 12:47:42 -07:00
Kapil Gupta
830881389a qcacmn: Add changes to support crypto API
Add support for hash, hmac-hash calculation and
aead encryption and decryption.

Change-Id: Idddcfaa2ec4c5689c997559551230bc8f59df032
CRs-Fixed: 2029962
2017-06-28 12:47:14 -07:00
Rajeev Kumar
fdcab13767 qcacmn: Do not free leaked memory if halt on kmem leak is enabled
If halt on memory leak is enabled then do not free the leaked memory
because when leaked memory gets freed kernel poisons it with 0x6Bs
and all useful data from leaked memory gets lost. In addition add the
leaked memory in a global trash list such that leaked memory can be
extracted for offline debugging.

Change-Id: Ie37fd810199e845831c3c3f325ef1e9ff60c5f37
CRs-Fixed: 2055470
2017-06-27 20:02:00 -07:00
Tallapragada Kalyan
0cd1793ba5 qcacmn: fix skb cb corruption issue
the ftype in skb->cb is overshooting allocated 48 bytes
causing kernel crash

Change-Id: Ie33508c462a032b28624de5270ce91a93d0b067d
2017-06-27 10:32:46 -07:00
Rakesh Pillai
847482ff8e qcacmn: Fix buffer overflow when radiotap header is larger than available headroom
The condition which detects if the length of the radiotap header is
greater than the available headroom in the skb is incorrect.

Correction to check if sufficient headroom is available
for updating the radiotap header.

Change-Id: I71c140c6af415678efe66cff2f16b8cabc62697a
CRs-Fixed: 2047909
2017-06-23 07:42:02 -07:00
Zhu Jianmin
af3420af93 qcacmn: Add icmp dptrace for latency issue debug
Ping latency is a key performance KPI for some customers,
need log in debug mode

Change-Id: I96eebf3f249668dd220aa1062fb339f940d36975
CRs-Fixed: 2039646
2017-06-22 04:38:28 -07:00
Sravan Kumar Kairam
a46056182a qcacmn: Add support to log IP addr of the wow wakeup packet
Add support to log the IP header source and destination address
for the first Rx packet received after host wakeup.

Change-Id: Ie8cf71c8ce913378687ad2c79ab9d5f46c0c2419
CRs-Fixed: 1106593
2017-06-21 19:40:49 -07:00
Mahesh Kumar Kalikot Veetil
6eaefc4bf9 qcacmn: Fix qdf_timer_init/free implementation
With DEBUG_OBJECTS_TIMERS enabled, cds_mc_thread prints warning
"ODEBUG: object is on stack, but not annotated". Since the wd_timer
is on the stack, we should rightly use set_timer API's.

Change-Id: I38061ff6c1b706484cd5d4532954cfa24c7ac0d6
CRs-Fixed: 2052484
2017-06-20 19:36:12 -07:00
Manjunathappa Prakash
86287dcf2e qcacmn: Define platform CACHE_LINE_SZ
Add platform CACHE_LINE_SZ so that it can be used to roundup the data
structures.

Change-Id: Iec45f5747956d0797411f76c2fec1368a13e7d6d
CRs-Fixed: 2046852
2017-06-19 12:43:31 -07:00
Tallapragada Kalyan
274eb9e76b qcacmn: Temporary WAR for Multicast echo check in host
This is a temporary WAR in host for multicast loopback check
until we finalize on exact design, and host or firmware will
take care of this

Change-Id: I4d2d1b0f5d2a78d4c8716740b74c4fee22c28e96
CRs-Fixed: 2039038
2017-06-16 17:12:15 -07:00
Karunakar Dasineni
4055568bad qcacmn: Monitor status ring handling
Changes to process PHY TLVs from monitor status ring and extract
information required for radiotap header.

Change-Id: I99d642e7506ea797b26dbfac89fd223d1a4c0a55
CRs-Fixed: 2048006
2017-06-16 17:12:13 -07:00
Anurag Chouhan
656ec600ac qcacmn: Fix Operands size in a bitwise operation
Bitwise operation on different operands size may lead
to unexpected results, Typecast the constant to
the size of the variable while performing the bitwise
operation.

Change-Id: Ifd9939905cc9df22bb249fa9b1a6a9670cf5f113
CRs-fixed: 2047880
2017-06-14 00:58:30 -07:00
Himanshu Agarwal
26cfe7eb28 qcacmn: Reduce log level of DPTRACE prints to DEBUG
Presently log level of DPTRACE prints is INFO due to
which they are coming in kmsg and causing watchdog bite.

Reduce log level of DPTRACE prints from INFO to DEBUG.

Change-Id: I0124dcc461d3e05541267c8310a43ea3ce0de9af
CRs-Fixed: 2043719
2017-06-14 00:58:27 -07:00
Nandha Kishore Easwaran
7249f0df2c qcacmn: Export qdf_trace_hex_dump
Export qdf_trace_hex_dump to make it available in other module.

Change-Id: Ib59439d64ad31dc23e46caf068914dd0601aa248
CRs-fixed: 2058321
2017-06-08 14:23:07 -07:00
Ravi Joshi
52569e2a83 qcacmn: Extend radiotap header to include HE parameters
Extending monitor/radiotap header structure to include
high-efficiency (HE) headers.

CRs-Fixed: 1113187
Change-Id: I841dcdff3a91f1c70c3b0aac0a555c2f4b40aed7
2017-06-08 11:34:39 -07:00
Vivek
2c86b213c6 qcacmn: Replacing qdf_print with QDF_TRACE
Replace all object manager qdf_prints with obj_mgr_err/obj_mgr_info
based on QDF_TRACE with the right log levels.

Added additional debug information like
Pdev_id
Vdev id
Peer MAC address

Change-Id: I96d96182176d332b9fbdb202305d29c08ddc0d18
CRs-Fixed: 2026537
2017-06-06 01:26:00 -07:00
Nandha Kishore Easwaran
e43583f3c1 qcacmn: Dptrace changes to take per pdev stats
Initial changes for adding dp trace in common framework. Modified dp_trace
record sturcture to include pdev_id as a member to take per_pdev stats.
Dump command has been modified to dump stats per pdev.

Change-Id: I8aede0bd8ab6f381c7fa0542d077bdd8bf66b3d2
CRs-fixed: 2038944
2017-06-05 22:52:34 -07:00
Manjunathappa Prakash
ad866513f5 qcacmn: Do not free the src buffer in __qdf_nbuf_cat()
It is callers reponsibilty to free the src nbuf if concat succeeds.

Change-Id: Iaf83524924e312bf819483de38603241f45170a5
CRs-Fixed: 2047585
2017-06-02 14:47:28 -07:00
Houston Hoffman
4a4623c7c7 qcacmn: Let qdf_lock_stats_cookie_create failure be dbg level
qdf_lock_stats_cookie_create is a debug feature.  Its failure should be dbg
level since it fails gracefully.  This avoids watch dogs in cases where
all the cookies have been leaked.

Change-Id: I99c751e6153964d00f2fc0b7dbf174a0e50e7fb9
CRs-Fixed: 2045394
2017-06-01 12:32:21 -07:00
Rajeev Kumar
a86e46fee9 qcacmn: Relax spin lock abuse detection thresholds
Increase irq save spin lock abuse detection threshold to 10 ms
and spin lock bh abuse detection threshold to 1 second such that
very obvious spin lock abuse cases by WLAN driver are detected
and fixed.

Change-Id: I8ca751404dc05e3fc3b6aa5db8538cb98c710260
CRs-Fixed: 2047464
2017-05-30 17:31:21 -07:00
Dhanashri Atre
991ee4defc qcacmn: Modify legacy LRO implementation to use QDF
Modify the legacy LRO implementation to use the implementation
in QDF instead. This is to avoid code duplication and to unify
the LRO implementations for Napier and Helium.

CRs-Fixed: 2042812
Change-Id: I38e9da3b54392a1c5781133916361aac3875d43d
2017-05-26 16:11:22 -07:00
Mahesh Kumar Kalikot Veetil
6d5917ad22 qcacmn: Fix a function redefinition
Remove redefinition of the function 'qdf_mem_debug_debugfs_init' when
WLAN_DEBUGFS is not enabled.

Change-Id: Id35865edda7e41cbc073cfca6099c56e7455165d
CRs-Fixed: 2048039
2017-05-25 18:21:31 -07:00
Mahesh Kumar Kalikot Veetil
5b321ba16e qcacmn: Restrict debugfs file mode
Disable write permission to qdf mem debugfs entries.

Change-Id: I428f2018018cf8edacdbbb9011ed55a8894511d4
CRs-Fixed: 2047311
2017-05-25 18:21:30 -07:00
Mahesh Kumar Kalikot Veetil
e4f8f0e015 qcacmn: Add mem stats for perf builds
Add memory allocation statistics for perf builds where MEMORY_DEBUG is
not enabled. Part of this effort, re-structure some of the QDF memory
APIs. Memory stats shows real size allocated.

Change-Id: I1e8fe0f4080ea186b8bfa0ce0438b4a06dde5a66
CRs-Fixed: 2045476
2017-05-25 18:21:27 -07:00
Dustin Brown
c7e0c63260 qcacmn: Create QDF timer multiplier get/set APIs
In order to provide greater flexibility on emulation platforms, replace
the current hard-coded QDF_TIMER_MULTIPLIER with a pair of get/set
methods, configurable at runtime.

Change-Id: I0757da6c2129db08459411eaef75b6183f1aa557
CRs-Fixed: 2049309
2017-05-24 23:56:53 -07:00
Ishank Jain
6290a3c543 qcacmn: Add APIs to enable HTT FW Stats
Adding support to parse stream of HTT TLV's recieved as response
to the HTT EXT stats request message

Change-Id: I44c990a1ed91c2381b89811de33c0717bd24be7d
CRs-Fixed: 1114641
2017-05-24 02:41:10 -07:00
Dustin Brown
a4c33f01bc qcacmn: Define new qdf_cpu_to_be*() macros
Add a set of OS agnostic CPU-to-Big-Endian byte order macros to QDF.

Change-Id: I8315dd55cf909abb871f7e7eb73684ed794fb134
CRs-Fixed: 2041099
2017-05-23 23:24:48 -07:00