Commit Graph

472 Commits

Author SHA1 Message Date
Arif Hussain
c516cd4d5d qcacmn: Add logs in qdf_mem_malloc(), and qdf_mem_malloc_atomic()
In qdf_mem_malloc() and qdf_mem_malloc_atomic(), pass function
name and line number, and log the same in case of failure, this
approach helps to remove error logs in caller function there by
reducing text segment.

Change-Id: Ia4586b112c6dd64aca5b397b43bb17499a0e6e30
CRs-Fixed: 2281983
2018-09-06 01:42:06 -07:00
Dustin Brown
39bb395e2e qcacmn: Add scheduler history
To help triage issues where the scheduler thread is processing slowly,
add a scheduler processing history for offline analysis. This can also
be useful in determining if a processing delay in some operation is
attributed to the scheduler thread or not.

Change-Id: Icfea17efc34b2a23d4f8b2baebe08db4e2f6ce8b
CRs-Fixed: 2307252
2018-09-05 22:15:13 -07:00
Vivek
e4bd23b400 qcacmn: Add API to get max size of the list
The list APIs only provides the current size of the list.
In certain cases, to be able to decide if the queue is full
we can compare the current size with the max size of the list
and not attempt to add to the list at all.

Change-Id: Ic0844ae9fccd8bcc9603d31c41692680966e1753
CRs-Fixed:2304508
2018-09-05 06:47:19 -07:00
Karthik Kantamneni
d07cfa4b67 qcacmn: Add qdf debugfs API to detect buffer overflow
Add API to query qdf debugfs buffer overflow.
Add support to dump log in different block sizes.

Change-Id: I3d5b63ef2f9b0eeb4df20dbb93a76f10ed10f556
CRs-Fixed: 2307897
2018-09-04 13:45:58 -07:00
Debasis Das
e6feafc106 qcacmn: Use appropriate dev handle in OS wrappers
The device handles used in OS wrappers should be of
the desired type.

Change-Id: I6a72c578492662e7c3907c844d9307fc0dc98e53
CRs-Fixed: 2299595
2018-09-04 11:53:51 -07:00
Alok Kumar
d32e9abf63 qcacmn: Add API qdf_nbuf_reset to reset netbuf
This API makes the reuse of sk_buff possible, by resetting
it with the reserve and align arguments passed by the caller.

This brings back the skb to the original state as
returned by qdf_nbuf_alloc without allocating the skb again.

Change-Id: Idefcbd4be9fae5d140805d55207dec01bdc90237
CRs-Fixed: 2301899
2018-09-03 11:27:26 -07:00
Kiran Venkatappa
08bf93bbaf qcacmn: Use multi-page alloc for tso descs
Regular allocs usually result in allocation of size aligned to
slab boundary resulting in more memory than the requested. Use
multi-page allocation to avoid allocation of more memory than
requested.

Change-Id: Id6562f2fe419179e27206ff5b1d543090b931607
CRs-Fixed: 2294213
2018-09-03 05:11:16 -07:00
Manoj Ekbote
b8de937cc4 qcacmn: Initial support for 11ax MBSSID IE
1. Service ready ext includes a parameter for max
BSSID indicator.
2. Beacon template includes MBSSID IE offset.
3. Vdev create and up cmds include more parameters.

Change-Id: I71214eacdaa886725b7ea8f61db3a743ba6597e9
CRs-Fixed: 2306638
2018-08-31 19:09:55 -07:00
Pranita Solanke
afcd0f1289 qcacmn: Add Video/all TID Counters framework for both tx/rx
Add struct in cdp required to display VoW stats
for hawkeye and akronite

Change-Id: Ibd3a3b5e5933841cc28c9ce1b36d69615234720a
2018-08-31 04:01:24 -07:00
Ruchi, Agrawal
2cbca3b050 qcacmn: msdu time lag update for tx completion
msdu time from hwenqueue to tx completion as part of
msdu stats.

Change-Id: I71ba6f1dec0505e4fa09b5fb123f21912b08b9c5
CRs-Fixed: 2286774
2018-08-31 00:51:20 -07:00
Alok Singh
18fcc5548a qcacmn: Add return as int for qdf hrtimer cancel
Add return value as int to check the success and failure of hrtimer cancel.

CRs-Fixed: 2292414
Change-Id: I7bfe94882551533c3f6b4164a2a3f778216b281b
2018-08-28 14:46:33 -07:00
Mohit Khanna
7ac554bda5 qcacmn: Support for DP RX Threads
Add support for DP RX Threads as a part of the FR. Multiple RX
threads can be enabled from the ini. The code is added in a new DP
module outside of the cmn project.

Change-Id: Id966c46c2799d23c2a4fa1c884610955afed3565
CRs-Fixed: 2256470
2018-08-24 18:35:45 -07:00
Dustin Brown
ed22a65b66 qcacmn: Add caller/line info to recovery log
To speed up recovery trigger debugging, pass the caller's function name
and line number, such that the group needing to do the initial triage
can be easily identified via the panic message.

Change-Id: I64f62ec30de657deeff037ee99610e716cfc4377
CRs-Fixed: 2298195
2018-08-17 16:13:22 -07:00
Ashish Kumar Dhanotiya
27bcaf88dd qcacmn: Add qdf api support for mtrace logging
Currently mtrace messages are getting recorded in circular
queue but are not getting used for DIAG Infrastructure.
Add support to print the mtrace messages on DIAG infrastructure in
format such that there will be two 32 bit fields printed on the
logs. These two fields will be constructed as explained below:
1. First field will be constructed using below bit positions:
   a. Bit 0 – 14 ( 15 Bits Lsb ) will contain the messageIDs
   b. The bit 15-22 will represent the destination module,
      and the 23-30 will represent the source module which is
      initiating the message.
   c. Bit 31 will represent whether the message is from host
      or from FW. If bit is 0, it indicates the message is
      from host and if it is 1 it indicates the message is
      from FW.
2. Second field will be constructed using below bit positions:
   a. First 16 bits (From LSB )will be used for counter.
   b. Next 8 bits would be the vdev id.
   c. Remaining 8 bits are reserved for future use.

Here counter is static unsigned 16 bit value which will be
used to keep track of number of logs given to QXDM and out of
these logs how many logs have been missed.

Change-Id: I4cec762ef17222d6adda9fd3e283c101afb92955
CRs-Fixed: 2290898
2018-08-14 16:50:18 -07:00
Ashish Kumar Dhanotiya
9d0ed2532c qcacmn: Add a new trace level for automation of logging
Add a new logging trace level QDF_TRACE_LEVEL_TRACE for
automation scripts to process the logging.

A new logging Infrastructure is to be added where the newly
added logging level QDF_TRACE_LEVEL_TRACE will be used to
log in specific format and these logs will be used by
post processing script to figure out right FA or to figure
the module from where the path deviated. It will help out CST
to figure out the right FA if there are any issues in the driver.

Change-Id: I7b5772026e4fc2f8e5205663e9150c861b69fdfc
CRs-Fixed: 2290893
2018-08-14 16:50:16 -07:00
Debasis Das
008baa9b4d qcacmn: Abstraction mechanism for OS API's
Provide support for abstraction layer for OS API's.

Change-Id: I1f51350c2ae4c35330aa7355e9cd20fa28aad194
CRs-Fixed: 2222560
2018-08-14 16:50:12 -07:00
Ashish Kumar Dhanotiya
14e22492c5 qcacmn: Add new Module ID in enum QDF_MODULE_ID
Currently there is no module ID to represent the FW, In new
logging infrastructure messages going from host to FW also
needs to be represented.
Add a new module id QDF_MODULE_ID_TARGET to represent firmware as
a module.

Change-Id: I0551455f2867633abed88037e414deaec1c11921
CRs-Fixed: 2290895
2018-08-11 04:41:54 -07:00
Adil Saeed Musthafa
61a21697f6 qcacmn: Add new radiotap header fields
Add the following fields in Radiotap header:
Antenna noise (in dBM)
Vendor Namespace containing the following information
->L_SIG_A
->Device_ID
->L_SIG_B
->PPDU_START_TIMESTAMP

CRs-Fixed: 2285143
Change-Id: I977be73778ab27383f12214c73b56c9b80d9f02d
2018-08-10 20:45:27 -07:00
Aditya Sathish
1c42c27c80 qcacmn: Move prints to QDF framework
Move all qdf_print from printk to qdf_trace_msg so that trace level
management can be carried out at runtime
In addition to the above, change contains removal of newline
escape characters from the format string of the converged
print APIs since qdf_trace_msg appends them by default.

Change-Id: I18cd06400bb9747761bbd86bfb38fe6d06106729
CRs-Fixed: 2243843
2018-08-10 18:11:15 -07:00
Sathyanarayanan Esakkiappan
360ad1d34f qcacmn: Wrapper API for memset_io and memcpy_toio
Inclusion of Wrapper API for memset_io and memcpy_toio

Change-Id: I89b94e201f043d37b782e855f198dbc00b89ac15
2018-08-08 09:11:56 -07:00
Sathish Kumar
8b2d1c7c05 qcacmn: Add CB ftype for DMS packets
Directed Multicast Service (DMS) allows a client to request the AP
to convert multicast frames that match a certain traffic classifier
into unicast frames for the client. This request can be sent either
as a DMS Request Information Element in the Association/Reassociation
Request frame or explicitly via a DMS Request Action Frame after the
client has completed association. If the AP accepts the DMS Request,
all multicast frames matching the traffic classifier specified in the
DMS Request will be unicasted directly to the client as an AMSDU.
The original multicast frame will still be transmitted for the benefit
of those clients that do not support or request for DMS.

Add new CB ftype to differentiate data packets intended for DMS subscribed
clients

CRs-Fixed: 2056341
Change-Id: I687e4f4d182869753e2c3670ec07aa64f95fda1b
2018-08-01 12:31:58 -07:00
Nirav Shah
c3f3f9d4a8 qcacmn: QDF: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: Ibc5745eae277110e884882891d14d3714e0d3ab4
CRs-Fixed: 2278876
2018-07-27 09:09:53 -07:00
Rajeev Kumar Sirasanagandla
66970850d9 qcacmn: Add WMI layer support for action OUI extensions
Add WMI support to send action OUI extensions to firmware.
For STA interface, this feature is intended to control mode of connection,
connected AP's in-activity time, Tx rate etc.,

Change-Id: I6a0bc9d3f7f0d57805b872cae4baa1fe84fb8193
CRs-Fixed: 2254509
2018-07-24 13:20:42 -07:00
Pavankumar Nandeshwar
205aeca91d qcacmn: Add a new qdf API for spin_trylock
This change adds a qdf wrapper api qdf_spin_trylock for spin_trylock.

Change-Id: I3406ed96f7f40df24949bd4e21ceb144d919d58d
2018-07-19 04:29:26 -07:00
Krunal Soni
37bf7f4d22 qcacmn: Update radiotap header with LTF symbol value
As per the updated spec, 11AX PPDU's HE SIG_A data-5 field has added
LTF symbol field which is 3bits in size.

Add logic to parse the TLV coming from hardware and update the
LTF symbol value.

Change-Id: I05e2ff8ece7e14dc22ce747e9a9b906bf130462f
CRs-Fixed: 2235233
2018-07-17 00:58:29 -07:00
Sravan Kumar Kairam
d0f08ef155 qcacmn: Assign DMA address correctly to all scatterlist elements
Assign DMA address correctly to all scatterlist elements of scatter
gather table in qdf_mem_shared_mem_alloc() func.

Change-Id: I07988d0bc35e3e0fcf7b9f6df02a9e56a0e8b083
CRS-Fixed: 2110715
2018-07-16 18:32:36 -07:00
Nirav Shah
a175314c51 qcacmn: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
2018-07-13 10:36:22 -07:00
Mohit Khanna
163c3170a1 qcacmn: fix dptrace for data packets
Enable tracing for TX/RX data packets
Donot print stats with 0 value

Change-Id: I4bab6537494c4ee0fe290e3778fb5662bf5abd66
CRs-Fixed: 2269193
2018-07-13 02:58:46 -07:00
Dustin Brown
6d5b8fa8e7 qcacmn: Remove unused osdep APIs
osdep contains many legacy APIs which have better counterparts elsewhere
in QDF. Remove unused APIs from osdep to avoid reintroducing their
usage.

Change-Id: I912b6d0dae510e96f5ab520d5d5b4ac6c60fbe86
CRs-Fixed: 2276316
2018-07-11 18:45:56 -07:00
Dustin Brown
352de8a613 qcacmn: Add qdf_thread_run and qdf_thread_join APIs
For cases where you want to create and immediately start a thread, the
Linux kernel has the kthread_run() API. Create a QDF wrapper for
kthread_run() as well as companion APIs for waiting for a thread to exit
and one to check if the current thread should exit.

Change-Id: Ia4e107010fc400f764661a9b36aceea970841ade
CRs-Fixed: 2270827
2018-07-11 14:29:13 -07:00
Rajeev Kumar Sirasanagandla
6b6b91db11 qcacmn: Update QDF API to convert ASCII hex char to decimal value
To convert ASCII hexa decimal character to unsigned value and similarly
to convert string of ASCII hexa decimal characters to array of decimal
values, there is need of QDF API.

Therfore, add QDF wrapper functions to kernel API hex_to_bin() and
hex2bin().

Change-Id: I4692961eeba9067f9b737f7deeefca397ff1a7bf
CRs-Fixed: 2274320
2018-07-10 18:42:07 -07:00
Rachit Kankane
371fce287d qcacmn: Allocate MAC Trace buffer dynamically
Allocate memory for g_qdf_trace_tbl buffer dynamically.

Change-Id: I5e9ba0a33e220ead36e0775f00000346aae68373
CRs-Fixed: 2267922
2018-07-08 23:30:46 -07:00
Linux Build Service Account
cb090521de Merge "qcacmn: Allocate DP_TRACE buffer dynamically" 2018-07-03 05:33:24 -07:00
Manjunathappa Prakash
cf4286b730 qcacmn: DPtrace: Do not log to memory during high throughput
During high TPUT scenario logging of DPT trace is not useful,
require more MIPS. Disable datapacket DPtrace logging during
TPUT runs, but contiue to log special packets like ARP/DHCP/ICMP etc..

Change-Id: I70c9368de4cb2423901449b267452a34d652213d
CRs-Fixed: 2255756
2018-07-02 12:23:38 -07:00
Bala Venkatesh
dea772a6b7 qcacmn: Add support to allow user select preferred band for SAP
Add enum QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) for this.
If ini gWlanMccToSccSwitchMode is selected to
QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) then following will be the
behaviour of STA+SAP concurrency.
1. If second interface(SAP/STA) comes in same band as
   first interface(STA/SAP) respectively then force SCC
   irrespective of channel.
2. If second interface(SAP/STA) comes in other band as
   first interface(STA/SAP) then dont force SCC allow
   interband MCC or DBS based on DBS capability.
Allow interband MCC but not intraband MCC.

Change-Id: I91d41b4b0306ed4e362b5bcab9538f5fd5feea7d
CRs-Fixed: 2260677
2018-07-02 08:45:47 -07:00
Rachit Kankane
b3ba76975e qcacmn: Allocate DP_TRACE buffer dynamically
Allocate memory for g_qdf_dp_trace_tbl buffer dynamically.

Change-Id: Id5cc51776f4378ecc97d7d758d5e502055423fb2
CRs-Fixed: 2268793
2018-07-02 11:24:53 +05:30
Rakshith Suresh Patkar
09089f1b73 qcacmn: Remove unused APIs qdf_nbuf_set_rx_info and qdf_nbuf_get_rx_info
Currently, the APIs qdf_nbuf_set_rx_info and qdf_nbuf_get_rx_info
are no longer used in our driver code.

Cleanup the unused code for qdf_nbuf_set_rx_info and
qdf_nbuf_get_rx_info.

Change-Id: I57acbd4e5901d8922e3b650f0f3b57f056a0ae3e
CRs-Fixed: 2259212
2018-06-25 23:53:07 -07:00
Shiva Krishna Pittala
7d721c3baf qcacmn: Fix file name tracking logic in QDF nbuf tracker
As WIN has multiple modules and QDF is the last one to be unloaded,
QDF is crashing when it tried to print the file name of an nbuf
allocated by other modules. To fix this, copy the file name in the
QDF nbuf tracker, rather than using the pointer to file name,
to avoid access to the invalid pointer.

CRs-Fixed: 2258770
Change-Id: I27ee76e58b0f5a976840783cfeba451784de85dd
2018-06-25 03:17:57 -07:00
Kiran Venkatappa
6dfc2c26ec qcacmn: Add nbuf debug version for qdf_nbuf_unshare API
skb_unshare may create copy and return different skb. If skb_unshare
returns different skb, remove debug node for the original skb and add
new debug node for the returned skb.

Change-Id: Ib511cde241ea7a44bd726912c225452722d953a7
CRs-Fixed: 2260467
2018-06-20 04:05:57 -07:00
Ryan Hsu
c84218fed7 qcacmn: Add SSR callbacks
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.

Also moves the platform related function to qdf_platform.[c|h]

Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
2018-06-20 04:05:54 -07:00
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Vinay Adella
873dc40d46 qcacmn: Beacon to replace a probe response
Cancel broadcast of probe response if beacon is already sent
in beacon offload.

Change-Id: I4fea51433fbb959e05988c2daac89fbe839b1cdf
CRs-Fixed: 2209282
2018-06-15 12:39:38 -07:00
Om Prakash Tripathi
9b56f5dc1c qcacmn: Use atomic allocation for all scheduler context scan allocations
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.

Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
2018-06-13 21:00:59 -07:00
Jeff Johnson
03f91cce40 qcacmn: Remove legacy tQDF_* definitions
Previously legacy definitions tQDF_GLOBAL_CON_MODE and
tQDF_ADAPTER_MODE were renamed to have converged semantics.  However
since these were defined in a common project, and since not all
references could be simultaneously changed, legacy definitions were
left with the expectation that they would be removed when all
references to the legacy definitions had been updated.

All of the legacy references have now been updated, so remove the
legacy definitions.

Change-Id: I21775c1f5a8ab1868c1ce27edce90acf5a1aa962
CRs-Fixed: 2245250
2018-06-04 13:58:58 -07:00
Yun Park
c8a48dbe8f qcacmn: Remove ipa_add/del_hdr_proc_ctx from QDF
Remove unused IPA API ipa_add_hdr_proc_ctx and ipa_del_hdr_proc_ctx
from QDF.

Change-Id: Iffe79a040ae68e817433416f9f59b23d9029fbdf
CRs-Fixed: 2242429
2018-06-01 19:44:48 -07:00
jiad
efc0b71831 qcacmn: Add support for SMMU IPA WDI unified API
IPA driver adds unified WDI API for ipa_wdi_create_smmu_mapping
and ipa_wdi_release_smmu_mapping. WLAN driver needs to adopt the
change accordingly.

Change-Id: Ibbf10e4beb579a6a3d3e6b0e8e6d2c853f7e629a
CRs-Fixed: 2238493
2018-05-24 07:52:02 -07:00
Mohit Khanna
4b3b7e7110 qcacmn: debug prints for monitor mode TLVs
Add prints to track:
* Incoming TLVs in the monitor mode status ring.
* HE, HE-MU and HE-MU-Other values being passed to the
  stack.

Change-Id: Ib23336353dc4a2253a62444b767d2a706ce372ea
CRs-Fixed: 2242514
2018-05-22 13:00:04 -07:00
Nirav Shah
9106902215 qcacmn: Featurize dp trace
Featurize dp trace to compile out cleanly.

Change-Id: If244fba87a50cde57ec55e54249b41dd30dcc92d
CRs-Fixed: 2227771
2018-05-22 09:34:12 -07:00
Jeff Johnson
8bc5042785 qcacmn: qdf: Fix misspellings
Address the following issues in the qdf folder:
CHECK: 'arguement' may be misspelled - perhaps 'argument'?
CHECK: 'Arguement' may be misspelled - perhaps 'Argument'?
CHECK: 'continous' may be misspelled - perhaps 'continuous'?
- (actually 'contiguous')
CHECK: 'implentation' may be misspelled - perhaps 'implementation'?
CHECK: 'Initilize' may be misspelled - perhaps 'Initialize'?
CHECK: 'occurance' may be misspelled - perhaps 'occurrence'?
CHECK: 'untill' may be misspelled - perhaps 'until'?

Change-Id: I4ea13e1a6b1490082830ed67098ff174a162114b
CRs-Fixed: 2241580
2018-05-19 19:41:08 -07:00
Jeff Johnson
1974e07df2 qcacmn: qdf: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: Ia920daa3248677b9446f4203c7698cbc37648fbd
CRs-Fixed: 2230684
2018-05-18 02:17:38 -07:00