Commit Graph

361 Commits

Author SHA1 Message Date
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
Dustin Brown
57a7ff2f9b qcacmn: Remove QDF_MAC_ADDRESS_STR
QDF_MAC_ADDRESS_STR has been replaced by QDF_MAC_ADDR_STR. Remove
QDF_MAC_ADDRESS_STR.

Change-Id: I810d56ef62009375422a69b66d75b4d03ddaee0f
CRs-Fixed: 2176528
2018-02-02 09:31:03 -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
Dustin Brown
1b4e6b5e21 qcacmn: Remove QDF_MAC_ADDR_BROADCAST_INITIALIZER
QDF_MAC_ADDR_BROADCAST_INITIALIZER has been depreciated in favor of
QDF_MAC_ADDR_BCAST_INIT. Replace all usages with the new macro.

Change-Id: I5214558cd3788eacfe27188c230641edc86b1670
CRs-Fixed: 2176525
2018-01-25 13:26:01 -08:00
Anish Nataraj
28490c4c5e qcacmn: Add checks in rx_mon_status handler to filter spurious frames
1. find_first_bit API returns Size value if it doesn’t find any bit set.
   This was causing VOICE AC counter to go high even for TID 0
2. Reset stats was not resetting the stats immediately
3. Added checks to avoid spurious stats increment
4. Detect data/mgmt pkt to avoid spurious stats increment

Change-Id: Ic9c5695fc7bdf58d1237e7e20bb79378a02a21f6
2018-01-25 05:08:23 -08:00
Dustin Brown
8bf184d6e4 qcacmn: Remove QDF_MAC_ADDR_ZERO_INITIALIZER
QDF_MAC_ADDR_ZERO_INITIALIZER has been depreciated in favor of
QDF_MAC_ADDR_ZERO_INIT. Replace all usages with the new macro.

Change-Id: I565a01fe3c75da645d5f410ce2c54f02034fb14c
CRs-Fixed: 2176469
2018-01-24 13:19:43 -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
Dustin Brown
2e93d637cf qcacmn: Add MAC/IPV4/IPV6 address parsing to QDF
Add converged implementations of MAC, IPV4 and IPV6 address parsing to
QDF. This allows for reuse wherever address parsing is done. This also
supports the upcoming configuration component, which will support all
three address types.

Change-Id: I5158e2a40169da979a219363c6d2a25784c5a7e8
CRs-Fixed: 2174072
2018-01-20 01:45:05 -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
Keyur Parekh
71ab9ef0b7 qcacmn: Populate mon_rx_status structure fields
Update mon_rx_status fields for HE case. Also
added rs_fcs_err field to structure and populate
its value.

Change-Id: I4681543c7d6c6c7ac0d666cd93072caaee285585
2018-01-17 23:38:07 -08:00
akosigi
fffcebf2e9 qcacmn: Converge FTM feature
Support for FTM to make it common between WIN and MCL.

Change-Id: I4a65ca6d73d83e71f6a04405b5c41cdddb0a3c71
CRs-fixed: 2148283
2018-01-16 18:29:53 -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
Ruchi, Agrawal
4c1468fb23 qcacmn: RAW Mode EAPOL Frame Classification
Host CCE Classification changes for RAW Mode workaround
RAW Mode EAPOL frame classification for raw mode

Change-Id: I533c2e8bb55e3cd5088c6bff046e67066c784053
CRs-fixed: 2132295
2017-12-20 14:10:39 -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
sumedh baikady
f7bbb3512f qcacmn: Add HE SU Radiotap Support
Keeping up with changes in radiotap header definitions
and spec. This change reads preamble info for HE SU from
phy tlv and populates the radiotap structure

Change-Id: I0663d1923f2a8277c62ab6c8378aaca026ce18db
Crs-fixed: 2144302
2017-12-19 21:25:03 -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
Govind Singh
11c7f8b00e qcacmn: Dump WMI work queue stack for watchdog bite
In the event of an WMI work queue watchdog bite, dump the stack
trace to aid in debugging.

Change-Id: I7f3df5a56904748fb80afb1aef1aed90d20fbbc0
CRs-Fixed: 2145913
2017-12-15 19:26:25 -08:00
nobelj
2c3db26446 qcacmn: passing correct argument to qdf_mem_set api
qdf_mem_set api parameter switched!
old
qdf_mem_set(void *ptr, uint32_t value, uint32_t num_bytes)

new
qdf_mem_set(void *ptr, uint32_t num_bytes, uint32_t value)

Change-Id: I4ebbc222d32e6fe18c28f2446102c95bfc734c8e
2017-12-14 17:45:20 -08:00
Ravi Joshi
54ee5e48db qcacmn: Enable support for HE radiotap headers
radiotap has updated HE (11ax) radiotap header extensions.
The change enables the support for those headers in the
driver.

CRs-Fixed: 2133532
Change-Id: I42c4f13e157ea981d6a276582553893921a70758
2017-12-14 11:25:18 -08:00
Dustin Brown
f7fb76bd5e qcacmn: Add qdf_mc_timer_check_for_leaks API
Add a new  QDF MC Timer API for asserting that there are no active MC
Timers allocated. This is useful for detecting MC Timer leaks at
runtime.

Change-Id: I272ce806111b01b5c7f6b0dfef2e992c27b83529
CRs-Fixed: 2125800
2017-12-12 15:56:48 -08:00
Jeff Johnson
f23c714cf3 qcacmn: Rename enum tQDF_GLOBAL_CON_MODE
The name tQDF_GLOBAL_CON_MODE is a poor name on many levels:
-  The "t" prefix implies it is a typedef when it isn't.
-  The "t" prefix makes this a mixed-case identifier which is "frowned
   upon" in the Linux coding style guide.
-  The term "CON_MODE" is MCL-specific and is not suitable for
   converged code.

Therefore rename enum tQDF_GLOBAL_CON_MODE to enum QDF_GLOBAL_MODE to
better align with with the Linix coding style and the converged
nomenclature.

Change-Id: I57933a62f6ce02b6594d97198be8132e61e8d1f6
CRs-Fixed: 2152503
2017-12-07 14:06:17 -08:00
Rajeev Kumar
9368d4e645 qcacmn: Add QDF timer multiplier in qdf_wait_for_event_completion APIs
Add QDF timer multiplier in qdf_wait_for_event_completion APIs such that
for emualtion setups timeout values are adjusted accordingly.

Change-Id: I661cf63a963938b2d61377980335b2f209656b4e
CRs-Fixed: 2151194
2017-12-06 10:06:12 -08:00
Ruchi, Agrawal
34721398d5 qcacmn: Host CCE Classification Changes
Host CCE Classification changes for RAW Mode workaround
H/w CCE hangs while classfiying raw packets
so the classification is moved to host

Change-Id: I75cfc6b140a7983fcdfb797c93b9fd57f01c5ee3
2017-12-06 06:57:02 -08:00
wadesong
41f857eb31 qcacmn: Debug print rate limiting
Implement driver debug print rate limiting in HIF SDIO RX
path and QDF nbuf allocation path to avoid driver
inactivity watch dog time out when the platform is facing
great memory pressure.

Change-Id: Ifa4fe3e7027150fd1469df58049776fca8aa6f2f
CRs-Fixed: 2148314
2017-12-04 23:38:59 -08:00
Mohit Khanna
90d7ebd385 qcacmn: add periodic data traffic stats
Add support for periodic stats for data packets to be displayed in
wlan driver logs.

Change-Id: Ifb8fc5cabb8ecd31da83b5d307721c1d41a30f9d
CRs-Fixed: 2118581
2017-12-04 19:47:14 -08:00
Manjunathappa Prakash
71772a5317 qcacmn: skb->cb reorganize, use new FLOW_ID macro
Fix compilation failure because of skb->cb reorganize change.
Use new macro QDF_NBUF_CB_RX_FLOW_ID instead of
QDF_NBUF_CB_RX_FLOW_ID_TOEPLITZ

Change-Id: I4f34c4710c4352a1895d0a08ce7f2e0632b1d30a
CRs-Fixed: 2120295
2017-12-02 01:41:00 -08:00
Vivek
de90e59667 qcacmn: Reorganize the tx & rx member of skb->cb structure
The current tx & rx member of skb->cb structure has lot of common members
duplicated across win & mcl sub structures.
The common members are now moved out
and new members are added as per the requirement.
Also the members are organized to avoid additional padding
and fit within the 48 byte boundary for both 32bit & 64 bit platforms.

Change-Id: I27abc95d51127513cf2e7e9657a4ee84324b2cc9
CRs-Fixed: 2120295
2017-12-02 01:40:58 -08:00
Dustin Brown
013400c3e1 qcacmn: Add several QDF logging APIs
For use by various QDF features, add the following convenience logging
APIs. These APIs mirror logging helpers used by other components.

	* qdf_alert
	* qdf_err
	* qdf_warn
	* qdf_info
	* qdf_vtrace_msg

Change-Id: I0e9194eeaf34ffca2b2130c4a7e62300e2e41ecc
CRs-Fixed: 2144969
2017-11-30 19:38:16 -08:00