Commit Graph

805 Commits

Author SHA1 Message Date
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
Anurag Chouhan
15da7ce9be qcacmn: Fix compilation error on LE target
Fix compilation errors on LE target.

Change-Id: I57c337c8144e4f49a8fd7eefb22164f05beb13c5
2018-06-30 08:58:38 -07:00
Srinivas Girigowda
ea4a324ce5 qcacmn: Not to be hard to make high order page
kcompactd consumes many CPU cycles without being successful
to make high-order page. One of the reason is WIFI driver is
allocating order-3 page a lot.

It shows 46% high-order allocation comes from WIFI driver.
Of course, it should be fixed in MM layer but it is never
easy stuff to fix in near future.
Regardless of MM changes, drivers should do best effort to reduce
high-order allocation, too.

This patch fixes the problem via not waking kcompactd.

Change-Id: I2bc3bf3ec96d32dd1a93c24edf2f590f331c0ed5
CRs-Fixed: 2265578
2018-06-28 04:51:56 -07:00
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
Nachiket Kukade
4d5a2fe8d9 qcacmn: Clear the force_set flag while resetting a qdf_event
In case where a qdf event was waiting and an SSR has occurred,
force_set flag is set for the event. After driver recovery is
complete the same event can be reset and re-used without
resetting this flag. This may cause a failure even after the
event was successfully completed.

Clear the force_set flag while resetting a qdf_event

Change-Id: Ia8cbc04776144d40e9c59fa339f8993fdbb73368
CRs-Fixed: 2264320
2018-06-25 14:12:54 -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
Rajeev Kumar
8716234661 qcacmn: Clean up excessive console logging from target if and qdf
Clean up excessive logging from target if and QDF to avoid spamming
kernel log buffers.

Change-Id: Ib81d6bb68bae9d5c477755b31dc20e10663147d5
CRs-Fixed: 2259283
2018-06-22 18:41:06 -07:00
Shiva Krishna Pittala
b52ad74361 qcacmn: debugfs support for qdf memory tracking on WIN
qdf_debugfs_init needs to be rearranged for the debugfs to work for
memory tracking on WIN.

Change-Id: I660731a22368d34a1e4f8c29539fffd9731d02cc
CRs-Fixed: 2254297
2018-06-22 13:02:36 -07:00
Sathish Kumar
18617b8638 qcacmn: Decouple netlink service and wlan logging service
Netlink service init and exit is invoked as part of wlan logging
init and exit during qdf module init and exit. This brings in a
hard dependency to enable and compile wlan logging service
even if not used.

Decouple netlink service and wlan logging service to remove
inter-dependency. WIN qdf module currently does not require wlan
logging to be enabled. This separation leads to bss savings in qdf
module.

Change-Id: Ib0afafd196106eba78ad9783eb1a6cece77c00fa
CRs-Fixed: 2258640
2018-06-22 08:18:23 -07:00
Yun Park
aadee8cc5a qcacmn: Add ol_txrx_completion_fp in ol_txrx_ops
Add ol_txrx_completion_fp in ol_txrx_ops to provide support for
callback during TX completion.

Change-Id: I7af478636badd8f8562460cefaf5db56633df8e9
CRs-Fixed: 2253569
2018-06-21 13:52:22 -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
faa27fbe89 qcacmn: Fix compilation error for LINUX_VERSION_CODE
Fix compilation error for LINUX_VERSION_CODE in
i_qdf_time.h.

Change-Id: I4878594c398686d296f218b678247c5afa2f6ed0
CRs-Fixed: 2258897
2018-06-15 21:31:18 -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
Aditya Sathish
e6168d475d qcacmn: Extend kernel version condition in i_qdf_time.h
For kernel v3.17 and above, timekeeping.h is included for
some kernel APIs such as ktime_get() but for versions prior to 3.17,
the above APIs are present in hrtimer.h.

To accommodate the usage of these APIs for older kernel versions,
include <linux/hrtimer.h> into this file for kernel versions
lower than 3.17

Change-Id: I445a1673d9067a2dd47045d6c48d73aaa239790e
CRs-Fixed: 2252563
2018-06-11 04:45:27 -07:00
Rakshith Suresh Patkar
81f4f19830 qcacmn: Add debug change to record timestamp
This change adds timestamp information for every memory
allocated and mapped for debugging purposes.

Change-Id: Iba8e720790b863ae11c528a02f5c32ea606560dd
CRs-Fixed: 2236213
2018-06-11 01:41:47 -07:00
Amar Singhal
f98d926bcf qcacmn: Validate the network buffer before processing
Check for potential buffer overflow and NULL ptr access
issues.

Change-Id: Iecb36530716dafa27a95a82392e97f662a7c25f0
CRs-Fixed: 2251345
2018-06-08 16:30:34 -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
Amar Singhal
aa6deb6c22 Revert "qcacmn: Use the right index while accessing ipv6 array"
This reverts change-Id I38eb1d3be2840bfbb5fdc9c72606ce.
Zero_comp value can be 0 also; so revert the change.

Change-Id: I7ab10c20c74d005009f435d483d39e138687a547
CRs-Fixed: 2233854
2018-06-03 23:39:40 -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
Zhang Qian
3c724258f3 qcacmn: Add null pointer check in qdf_dp_trace
In hdd_tx_timeout(), null nbuf is passed to qdf_dp_trace(). This
results a null pointer dereference when getting data buffer.
Since data buffer is not mandory for qdf_dp_add_record(), add null
nbuf check in qdf_dp_trace().

Change-Id: If5fb4753d382d8f29bdf4d934a7910a28a7c76aa
CRs-Fixed: 2244543
2018-05-29 00:08:14 -07:00
Dustin Brown
b6c29037e6 qcacmn: Remove 2.6.19 kernel check from qdf_defer
qdf_defer contains backwards compatibility code for Linux kernel
versions <=2.6.19. At the time of writing, this version is 12 years
old. Remove backward compatibility for kernel versions <=2.6.19 from
qdf_defer.

Change-Id: I623aa5b1ed597c76997bf397d9f2114cdf8c5ece
CRs-Fixed: 2247714
2018-05-25 14:15:05 -07:00
Jeff Johnson
5a0302c53e qcacmn: Rename qdf_trace_register() param module_iD
Function qdf_trace_register() parameter module_iD has (probably
unintentional) mixed-case which violates the coding standard, so
change it to all lower case.

Change-Id: Ic2f5b76a8adb178411e3b3ac18ef4009d168a664
CRs-Fixed: 2245197
2018-05-25 12:41:41 -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
jitiphil
cfb14523ad qcacmn: Fix debugfs issue for DPTRACE
TX packet records in DPTRACE logs for debugfs do
not contain msdu id, while QXDM logs do contain them.

Add msdu id of packets in the DPTRACE records for
debugfs.

Change-Id: Id3f6c21d95221cd5444327189b803ac857d56525
CRs-Fixed: 2242178
2018-05-23 23:49:31 -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
Dustin Brown
c7ee85c4a8 qcacmn: Use qdf_flex_mem for scheduler messages
Currently, the scheduler thread keeps a large, pre-allocated array of
messages for use in message posting. The vast majority of the time,
however, the scheduler thread has zero or one messages pending in the
queue. This leads to a huge memory overhead for nominal driver
operation.

Replace the current pre-allocated scheduler message pool with a
hybrid static/dynamic approach.

Change-Id: Ie942bacfef43edf142a9f35ad0309069096cda90
CRs-Fixed: 2204172
2018-05-21 21:48:10 -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
Dustin Brown
b7871f64ad qcacmn: Add qdf_status_from_os_return()
It is sometimes useful to reverse map an errno into a QDF_STATUS. For
this purpose, introduce qdf_status_from_os_return(), the logical inverse
operation of qdf_status_to_os_return().

Change-Id: I053f43867ef603c2654eca64fe76c7bd313e14e4
CRs-Fixed: 2242664
2018-05-18 00:00:33 -07:00
Dustin Brown
a487539d7d qcacmn: Pre-allocate flex-mem segments
Pre-allocate the reduction_limit number of segments during
flex-mem-pool initialization.

Change-Id: I91581e04b94597ee4314ce8691b37a45066c5273
CRs-Fixed: 2241805
2018-05-17 21:39:12 -07:00
Wen Gong
a5dfb6d847 qcacmn: Add hdd memory dump feature flag
Add config flag to enable / disable hdd memory dump feature

CRs-Fixed: 2231694
Change-Id: I6b565bd7007223a51b67a2ea9fbafd6a737d22d9
2018-05-17 21:39:10 -07:00
Wu Gao
210778359a qcacmn: Add QDF API for ID allocation
In P2P ROC and MGMT tx cases, it use kernel address as cookie and
provides to userspace. Which has security risk. Add QDF API for ID
allocation and map ID to pointer, provides ID to userspace instead
of kernel address.

Change-Id: I4e10109988391474722df5b251fab11a87c7992b
CRs-Fixed: 2237756
2018-05-17 16:55:21 -07:00
Dundi Raviteja
dd1d8ba52a qcacmn: Possible information leak due to uninitialized data
In qdf_trace_hex_dump() API, linebuf array is not initialized where
it is used to print in the form of string in qdf_trace_msg() API,
this may cause information leak.

To address this issue, initialize the linebuf array to zero.

Change-Id: If2fe200eb16b28f7fff4413873c1d149716fb1a7
CRs-Fixed: 2232012
2018-05-17 02:38:00 -07:00
Jeff Johnson
2d821eb0fe qcacmn: Fix typo "recieve"
Replace typo "recieve" with correct spelling "receive".

Change-Id: I7d88e57b97fa6d217630d4a5d5c365b56e714428
CRs-Fixed: 2238309
2018-05-17 00:47:23 -07:00
Jeff Johnson
7947f90a30 qcacmn: Fix typo "retrived"
Replace typo "retrived" with correct spelling "retrieved".

Change-Id: Icde5e2480be78bdf8bf3befd1ce09b1b427074df
CRs-Fixed: 2238309
2018-05-17 00:47:20 -07:00
Jeff Johnson
dc9c55962d qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Jeff Johnson
9f2d54f039 qcacmn: Fix typo "accross"
Replace typo "accross" with correct spelling "across"

Change-Id: Ifec1b81cbc6c808784d86afe055468ff42674a57
CRs-Fixed: 2238309
2018-05-17 00:46:41 -07:00
Prathyusha Guduri
9bb99acfca qcacmn: Add skb record rx queue to qdf API
Add skb_record_rx_queue() wrapper in qdf

Change-Id: Ic14e0a39d7d62bb404b443cc240b1ed0e5176119
2018-05-14 03:00:04 -07:00
Dustin Brown
8c268a0f54 qcacmn: Use qdf_flex_mem for nbuf map metadata
nbuf map tracking requires a bit of metadata which is currently
allocated dynamically for each mapping request. Change these allocations
to use a qdf_flex_mem pool instead, amortizing each physical allocation
over many mapping requests. This reduces the runtime overhead of the
nbuf map tracking feature, and provides significant memory savings when
MEMORY_DEBUG is also enabled.

Change-Id: Ieef9b996edab135cc2e0252c3a59cb6876f36371
CRs-Fixed: 2232113
2018-05-11 13:23:02 -07:00
Dustin Brown
03a7ac6e19 qcacmn: Add reduction limit to qdf_flex_mem
Add the ability to prevent qdf_flex_mem_pool from freeing memory
segments unless there are more than some minimum number in the pool
already.

Change-Id: I20bde2ed629b97924ea71b4f7f46a2c1fc1bab28
CRs-Fixed: 2229511
2018-05-11 13:23:00 -07:00
Jeff Johnson
49dd1d9143 qcacmn: Add missing entry to VERBOSE_STR[]
In qdf_trace_msg_cmn() the VERBOSE_STR array is used to convert
a trace level into a string. This array is missing an entry for
QDF_TRACE_LEVEL_ALL, so add it.

Change-Id: Iee6337cda7e54c429d36b2fd42bbd0c143c7d5a5
CRs-Fixed: 2232820
2018-05-07 13:58:21 -07:00
Kiran Venkatappa
bc1c547b8e qcacmn: Add timekeeping.h inclusion under correct kernel version
timekeeping.h is available from kernel version 3.17. Add header
inclusion and ktime_get_boot_ns call under correct version check flag.

Change-Id: I2a1a127e1716b52af56d14c39e2e646e34b05fa3
CRs-Fixed: 2230949
2018-05-07 01:29:30 -07:00
psimha
0e8a2c6558 qcacmn: Get NSS info from SS bitmap
Get NSS info from a the MIMO SS bitmap within msdu_start info

Change-Id: I794b093783b5f1ffc7faf335da84cbc07375d520
CRs-Fixed: 2215660
2018-05-04 20:43:12 -07:00
Yun Park
538a3a6e3d qcacmn: Remove ipa_reset_hdr from QDF
Remove unused IPA API ipa_reset_hdr form QDF.

Change-Id: I749e891b74b0adb45a5c3b9dbe7ad638d62c4459
CRs-Fixed: 2233616
2018-05-03 12:55:02 -07:00
Yun Park
bcffecb07e qcacmn: Add QDF abstraction for IPA_CLIENT_WLAN1_CONS
Add QDF abstraction for IPA_CLIENT_WLAN1_CONS.

Change-Id: I7b93432c5ce88d13ba9e52eb04e933238fe7c836
CRs-Fixed: 2220705
2018-05-02 14:29:22 -07:00