Commit Graph

765 Commits

Author SHA1 Message Date
Dustin Brown
2cd4bfb104 qcacmn: Include qdf_str.h
The qdf_str APIs have recently been moved from qdf_mem. Reference the
new qdf_str.h header file where appropriate.

Change-Id: If97c9c37a7d720a7b93e50ec228da67a8e980c2e
CRs-Fixed: 2196129
2018-03-01 11:39:20 -08:00
gaurank kathpalia
1435fba5e0 qcacmn: Add qdf time api to get time of the day in millisec
qcacld-2.0 to qcacmn propagation

Adds qdf time api to get time of the day in millisec

Also send host timestamp to firmware, so that firmware can print the
logs timestamp in sync with host via the wmi interface,with
api wmi_send_time_stamp_sync_cmd_tlv()

Change-Id: Id6acfc5227fdca2fbf8d266998fdfc4046adc5f4
CRs-Fixed: 2193978
2018-02-28 23:35:53 -08:00
Dustin Brown
d5ff73ebc7 qcacmn: Move existing qdf_str APIs to qdf_str
A set of files for string abstractions has recently been added to QDF.
Move any existing qdf_str_* APIs from qdf_mem to qdf_str.

Change-Id: I6e1e5d1edcdfae2af83a6497ebd872fba981cdec
CRs-Fixed: 2196098
2018-02-28 11:55:20 -08:00
Mohit Khanna
68c9a549cb qcacmn: Fix RSSI info in radiotap header
Currently, RSSI in radiotap header is being sourced from
RX_MSDU_START TLV. RSSI information is missing in the TLV.

Source RSSI from PHYRX_RSSI_LEGACY TLV (rssi_comb).

Change-Id: I8030d970ff300a957e5215157e5f6a3599e4b430
CRs-Fixed: 2190210
2018-02-28 04:17:16 -08:00
Nirav Shah
b432e7c080 qcacmn: [QDF] Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I50353d069e3b2edfb73c5421b73e18273bc243af
CRs-Fixed: 2181012
2018-02-27 21:17:15 -08:00
Dustin Brown
26e61b5928 qcacmn: Fix inappropriate use of qdf_str_lcopy()
A call into qdf_str_lcopy() is passing qdf_str_len(src) as the
destination buffer size parameter. Instead, pass the actual size
of the destination buffer.

Change-Id: I62ff473d9d45cfa53c5fc3df27743690586381c0
CRs-Fixed: 2196114
2018-02-26 21:44:52 -08:00
Sravan Kumar Kairam
68a824774c qcacmn: Add qdf utility functions for ARP debug stats
Implement QDF utility functions to operate on ARP data packet to
support ARP debug stats feature.

Change-Id: Idce70799bd3698dc8a8ecd8cfc8ef7d9bf1f5764
CRs-Fixed: 2019789
2018-02-26 04:07:21 -08:00
Kabilan Kannan
14e527f66a qcacmn: Fix X86 driver load problem
X86 driver is failed to load due to DMA malloc size
limitations.
Increase the maximum DMA malloc size for X86
driver.

Change-Id: I5d3a0138a61751e924183b7175a0b565cffd4eb4
CRs-Fixed: 2188749
2018-02-23 20:01:19 -08:00
Dustin Brown
61cabef5b6 qcacmn: Update qdf_trace for CONFIG module
QDF_MODULE_ID_CONFIG was previously defined for use by the configuration
component, but qdf_trace was not updated. Set the default logging level
for the configuration module in qdf_trace.

Change-Id: I8946b5473f03f3b85f8c2d6783039e03c9a49494
CRs-Fixed: 2194542
2018-02-23 15:33:18 -08:00
Dustin Brown
47452e942b qcacmn: Add QDF_DEBUG_PANIC API
A very common pattern in the Wlan driver is to test for a fatal
condition, and then call QDF_BUG with some falsy value. Add a sugar
API for these cases, which effectively does 'QDF_BUG(false)'.
Additionally, include 'debug' in the name to remind consumers that
the panic will not occur on end user devices.

Current syntax:

	if (fatal_condition)
		QDF_BUG(false);

New syntax:

	if (fatal_condition)
		QDF_DEBUG_PANIC();

Change-Id: Ifa03e9109be5efdbd061ca32363d5719fb91da0f
CRs-Fixed: 2191582
2018-02-23 15:33:16 -08:00
Sravan Kumar Kairam
8fb188fc9a qcacmn: Add qdf abstraction for byte order identifiers
Add qdf abstraction for Linux byte order type identifiers.

Change-Id: I4ff55ffcb92a86e7d067bcb78b404b8deb3ee0f0
CRs-Fixed: 2193638
2018-02-21 23:49:16 -08:00
Varun Reddy Yeturu
52c506d034 qcacmn: Add caller info to memory debug infrastructure
Currently, the detected memory leaks would not dump
the caller of the function which is leaking the memory.
Add an extra parameter to the table to store the caller
address and print the function during an assert.

Change-Id: I6dc31b55fd4e78dc69df9eb6166ebb63086891c1
CRs-Fixed: 2177486
2018-02-15 14:10:51 -08:00
Yun Park
1ba3ada3aa qcacmn: Add IPA WDI Unified API support
Support for WDI2 in the Unified IPA WDI APIs.

Change-Id: Ife42a6a96ce80070de51f994e29ded252b3dd980
CRs-Fixed: 2183501
2018-02-15 09:20:35 -08:00
Varsha Mishra
7ea1800145 qcacmn: Export __qdf_nbuf_is_bcast_pkt
Use of qdf_nbuf_is_bcast_pkt function in qca-wifi is causing
unknown symbol __qdf_nbuf_is_bcast_pkt runtime error. This
does not let wifi driver to load.

CRs-Fixed: 2125569
Change-Id: If91685ae7d72c6fe52427648e9f01cba92fee86e
2018-02-13 07:34:18 -08:00
Dustin Brown
2d237dde74 qcacmn: Avoid stack trace when PANIC_ON_BUG is off
PANIC_ON_BUG controls whether QDF_BUG panics the system on a failed
assertion. This config flag should be disabled for all end user
production builds. However, when PANIC_ON_BUG is disabled, QDF_BUG will
still print the call stack that resulted in the failed assertion. This
call stack can leak sensitive kernel address information, and should not
be printed for end user production builds.

When PANIC_ON_BUG is disabled, avoid printing the current stack trace to
dmesg.

Change-Id: I8c83d3690c606f8ffa91cf931e45543ed6e6437a
CRs-Fixed: 2186096
2018-02-12 11:22:41 -08:00
Dustin Brown
677a261213 qcacmn: Add qdf_file and qdf_parse files to QDF
Add an QDF abstraction for reading a file. Also, add the first consumer,
qdf_ini_parse(), as well. This is pure parsing logic, which offloads the
actual content handling to the caller via callback functions.

Change-Id: Idfca74c5543a5b0da7ddd1bdc6e2ad2be59ed36b
CRs-Fixed: 2184463
2018-02-10 07:15:00 -08:00
Dustin Brown
a4fd883481 qcacmn: Add qdf_str files to QDF
Add files for QDF string APIs. Existing qdf_str_* APIs will be moved as
part of a future change.

Change-Id: If98d41380b2f7f62bbe5de141b6827e9427944ab
CRs-Fixed: 2184462
2018-02-10 07:14:57 -08:00
Kabilan Kannan
56800ad9a5 qcacmn: Add debug support for DMA memory allocations
Add debug support to detect memory leaks and corruption
in DMA memory operations.

Change-Id: I1478973828ddc147367c4a579c97c3840c106f44
CRs-Fixed: 2155603
2018-02-09 12:18:40 -08:00
Tallapragada Kalyan
32e74e669d qcacmn: Linearize nbuf in intra-bss forwaring case
with fragmented pkts re-injected back to REO destination
ring as frag_list, we need to linearize these nbufs while
handling intra-bss forwarding cases.

Change-Id: Id692974ac5d80f369fafae39aec32e2066dffb0b
2018-02-09 01:51:24 -08:00
Paul Zhang
ca6152167b qcacmn: Support 11d for non-offload platform
Support 11d for non-offload platform by maintaining
count of beacons encountered for each country code
and choosing country code with max votes as device's
country code.

Change-Id: I83b66e980854eded17e254386561fa32b1f8c4ac
CRs-Fixed: 2154048
2018-02-08 21:37:37 -08:00
Varsha Mishra
d385dbe43d qcacmn: Add QDF API to find packet type
Add qdf API to know whether packet is broadcast or not

CRs-Fixed: 2125569
Change-Id: If91685ae7b72c6ce52426648e9e01cba92fee86e
2018-02-08 14:13:14 -08:00
Chaithanya Garrepalli
221c795fea qcacmn: Add nbuf count support
Add a global nbuf count variable and add support to update
this count.

Change-Id: I08a50b54cae25ab9f356cd05d7635f1ba3b6bf55
CRs-Fixed: 2008240
2018-02-07 05:43:53 -08:00
Venkateswara Swamy Bandaru
58c8085e21 Revert "Revert "qcacmn: Mesh throughput enhancements""
This reverts commit I7421f3572c46ed27a2d96724b2bbbe40c0704e5f.

Change-Id: I8c44b0e893f81aadf7aa4404538776f27a579d76
CRs-Fixed: 2180219
2018-02-06 07:44:57 -08:00
Srinivas Pitla
c4bdc7a1df qcacmn: Add target_if changes to QDF
1) Remove redundant members
2) Change the target_if debug level to info

Change-Id: I49d5e3f2af61a87097145e9214d84882ffd439ee
CRs-Fixed: 2177109
2018-02-03 15:10:53 -08:00
Srinivas Pitla
1ddc439f46 qcacmn: Add wait_timeout API in qdf
Introduces QDF API for wait_queue_timeout() to allow
driver to use. This API helps to wait for the event for
configured time

Change-Id: I9640368120fd09b19f64f028f1eb3aab46b7c97a
CRs-Fixed: 2177109
2018-02-03 15:10:48 -08:00
Manjunathappa Prakash
f9efb3d998 qcacmn: Check for TSO packet in release_skb
For TSO packets we get Tx completion for each segment,
whereas nbuf tracking code has only one entry. So remove
nbuf tracking record entry when nbuf->users is 1.

Change-Id: I7f66eb91d802c909ee0c9a0243be6415c82c211e
CRs-Fixed: 2179883
2018-02-02 05:45:49 -08:00
Manjunathappa Prakash
fa60a1a00b qcacmn: radiotap: Move HE flags to bit 23
Change HE flags in it_present from 22 to 23.
This expects corresponding change in wireshark also decode correctly.

Change-Id: I2fcbabd7156e8f836440c170e711b6f7f8f4f262
CRs-Fixed: 2177255
2018-02-02 05:45:47 -08:00
Akshay Kosigi
9e7f12f7da qcacmn: Fix Scatter-Gather and TSO
Fix SG and TSO for ftp data transfer

Change-Id: Ide7eec987436beea08711f31362c1fa61f5bf8c3
CRs-fixed: 2159610
2018-01-30 15:26:48 -08:00
Jiachao Wu
69a4679e57 qcacmn: Check NULL pointer before use it
Check NULL pointer before use it.

Change-Id: Id5b5d3ac38bffdbfee4463e93e3a586e9da1fac2
CRs-Fixed: 2177902
2018-01-29 02:17:49 -08:00
Venkateswara Swamy Bandaru
b2864fabe4 Revert "qcacmn: Mesh throughput enhancements"
This reverts commit I89ff27994477a5637979a9cd6a397286144b2535.

Change-Id: I7421f3572c46ed27a2d96724b2bbbe40c0704e5f
CRs-Fixed: 2177160
2018-01-26 09:20:39 -08:00
Dustin Brown
490d818d1d qcacmn: Replace QDF_MAC_ADDRESS_STR
QDF_MAC_ADDRESS_STR has been depreciated in favor of
QDF_MAC_ADDR_STR. Replace all usages with the new macro.

Change-Id: I534923783a32288f7861caf9ae52ca3aac965809
CRs-Fixed: 2179126
2018-01-25 23:39:30 -08:00
Zhang Qian
82377ce4dd qcacmn: ADD OCB module ID
Add module ID and trace log for componentized OCB feature.

CRs-Fixed: 2177252
Change-Id: I794ce0809afed19863b52d26d9fcf1bde5e5e754
2018-01-25 23:39:28 -08:00
Akshay Kosigi
8139413318 qcacmn: Modify same value for an enum
Change the enum values due to having same value

Change-Id: Ia7fadb7d92196c6c10ad2dcdff8826a134e086ba
CRs-fixed: 2174368
2018-01-24 01:43:39 -08:00
Subrat Mishra
bf12587bd1 qcacmn: Support for SWFDA Event & FD Frame tx
Add new WMI EVENT, SW FILS Discovery Alert Event, to get
firmware trigger to transmit FILS Discovery Frames.
Add WMI command to send FD frame buffer to firwmare.
Add WMI command to set FD period interval in mili seconds.

Change-Id: I8cb6279ec4431b9236bd32c548228a0dc6598664
CRs-Fixed: 2118098
2018-01-19 17:26:23 -08:00
Santosh Anbu
d5fdfacb1b qcacmn: Add debug trace for extender AP
Add commonly used header in Extender ap to qdf

Change-Id: Ifdf97973cc30c193e5ca81b2aec06fc350115ce6
CRs-Fixed: 2148247
2018-01-19 02:03:44 -08:00
Dustin Brown
dbc7ec1702 qcacmn: Untrack nbuf map on map failure
Currently, nbuf map tracking happens before the nbuf is actually mapped.
In cases where the actual map operation fails, remove the nbuf map
tracking information to avoid false positive mapped-never-unmapped
panics.

Change-Id: I8e649841a661d460bf89dd5edf09bb5e460ea98c
CRs-Fixed: 2171837
2018-01-18 11:37:03 -08:00
Dustin Brown
a13db35821 qcacmn: Hold lock for entire nbuf debug iteration
Hold a spinlock for the entire iteration of the nbuf map/unmap
hashtable. This prevents invalid list/memory access issues in case of a
race with an unmap operation. This also trades list/memory safety for
the chance to watchdog bite while printing. Since we are about to panic
anyway, the worst case is manually loading the memory dump to inspect
the contents of the map/unmap hashtable.

Change-Id: Iafc38764d55fc46910051349e4f4b26da33cae51
CRs-Fixed: 2171736
2018-01-18 11:37:01 -08:00
Dustin Brown
976a7f6f6e qcacmn: Add nbuf map/unmap history tracking
An nbuf free history circular buffer already exists for tracking recent
nbuf frees in the system. This is very useful for debugging tricky nbuf
related failures in the driver. In addition to tracking frees, track
alloc, map, and unmap nbuf events as well.

Change-Id: I253d454d689deb8328b3636e92063e9d33ea1a52
CRs-Fixed: 2170365
2018-01-18 05:45:52 -08:00
Dustin Brown
5819e29cbb qcacmn: Return error on nbuf map alloc failure
When nbuf map/unmap tracking is enabled, a small metadata structure is
allocated to keep the tracking information. In cases where this
allocation fails during the map operation, return an error status
instead of mapping the nbuf. This prevents a false positive
unmap-never-mapped panic when the nbuf is unmapped.

Change-Id: Id01c1f61165a0beff4edd6cc6a0a2fc5f64d9b04
CRs-Fixed: 2167082
2018-01-18 01:49:47 -08:00
Dustin Brown
4082a0951f qcacmn: Add nbuf map/unmap tracking
When MEMORY_DEBUG is enabled, track calls to nbuf map/unmap to detect
the following usage problems:

	* double map
	* double unmap
	* unmap without map
	* never unmap

Change-Id: I7326bb628d4cf0be9004398fd396907b1a06bf22
CRs-Fixed: 2155599
2018-01-18 01:49:45 -08:00
Manjunathappa Prakash
a22b919560 qcacmn: bug_on on detecting nbuf leak
bug_on the system to catch and debug the nbuf leaks.

Change-Id: Id88714654996790e53217edeb78ea6fb94bbf415
CRs-Fixed: 2162344
2018-01-15 15:39:14 -08:00
Venkateswara Swamy Bandaru
e91dd92e8b qcacmn: Mesh throughput enhancements
Sending all frames to firmware will have high throughput impact.
Queue mesh frames also to TCL/TQM and send cloned frame to firmware
only if meta header information is changed to update meta header
information. Increased meta info size as per new ext2 header.

Change-Id: I89ff27994477a5637979a9cd6a397286144b2535
CRs-Fixed: 2162643
2018-01-13 02:17:50 -08:00
Padma, Santhosh Kumar
f5d592433f qcacmn: Add support for GMAC MIC calculation
Add changes to calculate MIC using aead calls in linux

Change-Id: I710b1c748c36babc8e66aaf920a07f9657f6e273
CRs-Fixed: 2164910
2018-01-13 00:42:51 -08:00
Himanshu Agarwal
b3c81ac057 qcacmn: Green AP UMAC componentization
Add APIs, structures for Green AP component.

Change-Id: I4a39470104c89c20eec5440b7ae251a764151fd5
CRs-Fixed: 2166428
2018-01-12 12:20:17 -08:00
sumedh baikady
2a19fe4317 qcacmn: Fix legacy rate and group id in rx_status
In radiotap section of sniffer, fix group id field for vht
and rate field for legacy.

Change-Id: I3c1e2e650548551230d9eca5bc043b690169e844
CRs-fixed: 2143521
2018-01-09 23:47:25 -08:00
Nachiket Kukade
88ae85340c qcacmn: Add Objmgr related definitions to support DISA component
Add Objmgr ID and related definitions to support the newly
defined DISA component in CLD.

Change-Id: Ibbe5db39c01dae94cad5af5f4dccd2611c5b06d4
CRs-Fixed: 2159599
2018-01-09 13:40:06 -08:00
Dustin Brown
7768da6890 qcacmn: Extract memory debugging features from qdf_mem
When memory debugging is enabled, qdf_mem_malloc and qdf_mem_free do a
number of memory corruption checks. Extract these checks into their own
functions to allow other memory allocation/free logic to leverage the
same logic.

Change-Id: I07802093119c90b3d8c40a50d5b4bb152cb8243f
CRs-Fixed: 2136659
2018-01-03 20:09:43 -08:00
Yuanyuan Liu
f67e197433 qcacmn: Remove unused ipa_connect/ipa_disconnect APIs
Remove unused ipa_connect/ipa_disconnect related APIs.

CRs-Fixed: 2160644
Change-Id: If45c60d8c73cc89719d1576171921c50261a23df
2017-12-20 13:25:53 -08:00
Dustin Brown
47d702f693 qcacmn: Add qdf memory domain support
In order to support memory leak detection during a specific period of
time, add APIs to allow setting the current memory domain. Each
allocation is tracked against the current memory domain at the time of
allocation. Consumers can then check to ensure the memory domain is
empty before each transition to a different domain.

Change-Id: I3a8d18ea0700122a2425eacb6051c6188b9aa5d6
CRs-Fixed: 2113614
2017-12-20 05:38:45 -08:00
Sathish Kumar
a9a42ebe04 qcacmn: Add module id for direct buffer rx module in QDF debug trace
Direct Buffer Receive provides the driver with a mechanism by which target
can transfer information directly into host memory via DMA.

Add module id and set default trace level for the module.

Change-Id: Id2c64a342867c499a1f5f10e46b40a2b53161d2e
CRs-Fixed: 2157978
2017-12-19 03:03:48 -08:00