Commit graph

5,524 commits

Author SHA1 Message Date
Gyanranjan Hazarika
3dff295d8c qcacmn: Changes for Draft 3.0
Make the HECAP and HEOP changes for 11ax Draft3.0.
Draft2.0 support can still be enabled by unsetting
SUPPORT_11AX_D3 in config.unified.wlan.profile.

Change-Id: I0c0fd885a43b672baca61011b75a51526481b1ee
CRs-fixed: 2294235
2018-09-11 16:42:22 -07:00
chenguo
f51e922a78 qcacmn: add radiotap flags for HE_TRIG frames
HE format in radiotap header are not being updated for HE_TRIG
frames. Add support for it. This is to support MU-OFDMA frames of
UL.

CRs-Fixed: 2223635
Change-Id: If0a93f6047185bcc51948b613d48d13ecb5e16cd
2018-09-11 16:42:19 -07:00
Shashikala Prabhu
6b4d64dbfa qcacmn: Add APIs to skip DFS CAC
Skip CAC if cac is already started on the same channel or the new channel
is subset of CAC started channel.

Change-Id: I8f6121f1f8d034acf3f0514a60401a3232becaa2
CRs-Fixed: 2309911
2018-09-11 16:42:17 -07:00
Sourav Mohapatra
474c614ddf qcacmn: Add FW Offload component UMAC ID
Add the UMAC enum ID for the new FW Offload enum.

Change-Id: Ia495ebd7d3a195839cae11a633b3bdc9ba7055ae
CRs-Fixed: 2307838
2018-09-11 12:03:15 -07:00
narayan
b57ed08389 qcacmn: Added wmi vdev param for setting sifs rate in target
This change is required as a part of setting sifs_rate in the
target through wmi command from host for legacy chipsets.

Change-Id: Ia3ed8a6d33fcb31b290129e1302dfc0000ad4626
CRs-Fixed: 2031293
2018-09-11 12:03:11 -07:00
gaurank kathpalia
5e652ebbb9 qcacmn: Add tracing in scheduler_post_msg_by_priority
Trace every msg, and print its src, and dest in
scheduler_post_msg_by_priority for ML logging

Print to F3, and trace it too

Change-Id: I64a2142bf3277e85e970132933f2157b95dad68d
CRs-Fixed: 2306043
2018-09-11 12:03:08 -07:00
Pratik Gandhi
4cce3e03cd qcacmn: Modify min value of DP configuration for emulation
Reducing min value of DP configuration parameter to support
low memory emulation platform.

Change-Id: I524dca73b3ce52e138527c7abd1a9d8d0cbe9ac1
CRs-Fixed: 2309295
2018-09-11 12:03:05 -07:00
Kiran Kumar Lokere
7ba00f3455 qcacmn: Define new test config attribute for HE OM control
Define new test config attribute to configure the support
for receiving the MPDU with operating mode control field.

Change-Id: I8f4885ebc705e2d6acfa0c97bdcd6b2bb4baaaca
CRs-Fixed: 2305757
2018-09-11 12:03:00 -07:00
Min Liu
fe330245af qcacmn: Fix vdev ref issue in tdls_process_del_peer
vdev ref is not released in some error path of tdls_process_del_peer,
which will lead to vdev obj failed to be deleted.

Change-Id: I439af4abbb4670d9252296b39d75eb435bb436fc
CRs-Fixed: 2311161
2018-09-11 08:44:21 -07:00
Qiwei Cai
5d4acd79ad qcacmn: Featurize BUILD_DIAG_VERSION
Featurize BUILD_DIAG_VERSION to compile out to save memory.

Change-Id: I4d221387003770e5344069dc4cf1f72b7ce9e0ad
CRs-Fixed: 2301492
2018-09-11 08:44:18 -07:00
gaurank kathpalia
302a1d9701 qcacmn: Add support for que_id in scheduler
Currently the scheduler cant differentiate between
the destination, and que to which it has to post the
message.

Add que_id, to differentiate between the destination
and que.

Change-Id: I94f81cb4b976dba4571f9cd0d6e059dc72024fcd
CRs-Fixed: 2308108
2018-09-11 03:49:11 -07:00
Om Prakash Tripathi
3c5c017507 qcacmn: Change radiotap HE log level from info to debug
Change log level for HE flags, HE data and HE MU info fields
added to radiotap header. Earlier log level of info used to
flood on console.

Change-Id: I7754df859bb315fff7e449e263e0d77cf412a852
CRs-Fixed: 2295965
2018-09-11 03:49:08 -07:00
Sourav Mohapatra
23310e82bb qcacmn: Add support to send RX stats to framework
As a part of the cfg80211_get_station command, the driver sends TX stats
(tx rate, MCS index, NSS and flags). Currently there is no support to
send the similar RX stats.

Add support to send RX stats to the framework.

Change-Id: Ic66596d118ad1395706db7638da1b4fdef7dc2d5
CRs-Fixed: 2303308
2018-09-10 17:45:04 -07:00
Debasis Das
0c88e0f704 qcacmn: Use wrappers for bus-oriented OS API's
Use appropriate wrappers for bus and platform related
OS API's.

Change-Id: I2b6d16f698816ef4851594717810bda6f167de32
CRs-Fixed: 2297169
2018-09-10 04:25:32 -07:00
sumedh baikady
faadbb6cd0 qcacmn: Handle addba req with incompatible buffersize
In HKv1 HW there is a buffersize setting per peer, hence
once we set buffersize we have to stick to this for all
subsequent requests for all tids. If buffersize in Addba
request is more than first session's buffersize, we restrict
buffersize to old value, else we send respond with new size
and send delba to previous sessions not compatible with new
buffersize

Change-Id: Ia71d994ee06ca7b37d93273f5fa69547f816dd20
Crs-fixed: 2247816
2018-09-10 04:25:29 -07:00
Ruchi, Agrawal
1ee51132c5 qcacmn: Change to avoid compilation issue HK2.0
EWMA macros which were used for sojourn stats
time delay calculation, causing compilation issue
for x86 platform as x86 platform is on kernel
version less than 4.3 and EWMA macros were
introduced after that version.

Change-Id: I184844c7df8e5b317a095355c2f6a9af9e4747ff
CRs-Fixed: 2308338
2018-09-10 00:49:24 -07:00
Bala Venkatesh
6da8bf6f3a qcacmn: Send TDLS set state disable command in concurrency
TDLS is not supported in concurrency and FW expects set state disable
command in concurrency. Currently, disable command is sent only if the
active connection is present when second interface comes up.

Send disable command to FW irrespecive of active TDLS connections.

Change-Id: I0716a6caf76a8a69da2225f22e385ce259c231b6
CRs-Fixed: 2305714
2018-09-09 13:14:07 -07:00
Ashish Kumar Dhanotiya
95ed1a8f7f qcacmn: Add qdf_mtrace logging for all wmi messages
We are transitioning to new logging infrastructure
by using existing mtrace functionality.
Add new logging for complete WMI module.

Change-Id: Ifbc81a6f119ff63b69e3558ad7becb1eaefae8ca
CRs-Fixed: 2301964
2018-09-09 09:36:47 -07:00
Ashish Kumar Dhanotiya
308f575884 qcacmn: Add wmi wrapper function for mtrace logging
For qdf_mtrace 15 bits are reserved for message id and currently
WMI message IDs are getting used as 32 bit IDs.

Write a wrapper function which accepts 32 bit message IDs and
converts this 32 bit message id to 15 bit by extracting
WMI_GRP_ID and WMI_MESSAGE_ID in that group. New 15 bit
message ID for qdf_mtrace will be constucted as 8 bits
(From LSB) specifies the WMI_GRP_ID and remaining 7 bits
specifies the actual WMI command. With this notation there
can be maximum 256 groups and each group can have max 128
commands which can be supported.

Change-Id: Ia5adfc079b63c2311bdc8ae4c73488d89afd462f
CRs-Fixed: 2298877
2018-09-09 09:36:44 -07:00
Ashish Kumar Dhanotiya
89921da033 qcacmn: Define qdf_mtrace api within TRACE_RECORD macro
Currently qdf_mtrace is defined outside TRACE_RECORD macro which
is using qdf_trace api and this is defined inside TRACE_RECORD
macro for MCL. since qdf_trace is having different definitions
for MCL and WIN as for MCL it is defined as a function and for
WIN it is defined as a MACRO.

To resolve this put qdf_mtrace inside TRACE_RECORD macro

Change-Id: I5de2cdff3942ca10b6d5d562f28d359f7f655ed4
CRs-Fixed: 2310167
2018-09-09 01:27:05 -07:00
Ashish Kumar Dhanotiya
5b8a454c45 qcacmn: Add mtrace logging for P2P module
We are transitioning to new logging infrastructure
by using existing mtrace functionality.

Add new logging for complete P2P module.

Change-Id: I34b1f3b0db9e9b5cfd4ae779cca14584e9b68841
CRs-Fixed: 2308565
2018-09-09 01:27:02 -07:00
phadiman
e2bc2c6237 qcacmn: Move qdf_timer_mod inside spinlock
wlan_objmgr_insert_ld_obj_to_list is starting
the qdf_timer_start within locks when list is
empty and during new object is being inserted

wlan_objmgr_iterate_log_del_obj_handler was
also starting the timer with qdf_timer_mod
without locks

Both functions tried to modify/start timer
and there was already a pending timer running
due to race condition between the functions

Hence move qdf_timer_mod inside spinlock to
gain access to timers atomically

CRs-Fixed: 2437930
Change-Id: If7d0b4b56372e14b20768a9a7a6da3c3f5095d7d
2018-09-08 23:17:19 -07:00
Linux Build Service Account
00f98d460c Merge "qcacmn: Use monitor direct for smart monitor" 2018-09-08 21:33:21 -07:00
sumedh baikady
59a2d33a2d qcacmn: Use monitor direct for smart monitor
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.

Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
2018-09-08 12:29:31 -07:00
Vivek
277ac5d63e qcacmn: Enhancements to the serialization component
1. Split the serialization API's into the following files
  1. serialization_api.c	: Serialization public API's.
  2. serialization_internal.c	: Serialization internal API's.
  3. serialization_queue.c	: Serialization pdev/vdev queues API's.
  4. serialization_main.c	: Serialization object manager related API's.
  5. serialization_utils.c 	: Serialization low level primitive API's.

2. Following files are not not used with new serialization
  1. serialization_enqueue.c
  2. serialization_dequeue.c

3. Using the new queue objects for pdev/vdev and component specific.

4. Implemented Locks for request, release and cancel APIs.

5. Removed locks for the lowest primitive queue API's

6. Timers executed in mc thread from MCL and timer context for WIN.

7. Allow cmds from multiple vdevs in parallel in non blocking mode.

Change-Id: I3cabcf512225331db46956ffad4ddab581c7e52b
CRs-Fixed: 2304513
2018-09-08 07:38:06 -07:00
Pragaspathi Thilagaraj
68e058b24d qcacmn: Fix possible OOB write in wlan_ftm_process_utf_event
The function wlan_ftm_process_utf_event, is invoked upon the
reception of the WMI event WMI_PDEV_UTF_EVENTID. The event_buf
argument to it is fully FW controlled.  There are two issues
here:
1. event.datalen of type uint32_t is assigned to utf_datalen of
type uint16_t which can lead to a possible integer underflow.
2. utf_datalen is calculated as the difference of event.datalen
and sizeof(seghdr_info), without validating if datalen is not
less than sizeof(seghdr_info). This could cause a potential OOB
write as utf_datalen is used as the size to copy utf_data to
ftm_pdev_obj->data.

Add fix to change the type of utf_datalen to uint32_t.

Change-Id: Ibd61b4ef8cd514d43f212174e745b1c76af1047d
CRs-Fixed: 2305477
2018-09-07 21:46:49 -07:00
Wu Gao
2f608c555a qcacmn: Do not remove id when tx action frame
Don't remove id tx action frame, since it will be removed when cleanup
related ROC. Limit the ROC duration if the original ROC duration is
very long.

Change-Id: I78e34710530a32f88e955471c974f7078df2e0a9
CRs-Fixed: 2302008
2018-09-07 19:02:33 -07:00
Shashikala Prabhu
a5b0851b36 qcacmn: Do not print DFS error message for non 5 GHz pdev
For a 2GHz pdev, dfs object is NULL and hence 'dfs is NULL' print is
always seen in some of the dfs functions when user enables the dfs
error logs.

To fix this, add non 5 GHz pdev check before dfs NULL check.

Change-Id: I4702d8c487d5533a2a99b4560471a38992ea9177
CRs-Fixed: 2296853
2018-09-07 17:22:56 -07:00
Pavankumar Nandeshwar
5bdd94bf14 qcacmn: Disable bh while holding completion_freeq_lock in process context
Avoid deadlocking by disabling bh while holding completion_freeq_lock
operating in process context.

Change-Id: I16b105f68e07939d340ccccfd96f81a37959d5bc
CRs-Fixed: 2308549
2018-09-07 15:33:26 -07:00
Edayilliam Jayadev
1f91a239b6 qcacmn: Add fft bin size WAR check
Add the fft bin size WAR check in spectral
report processing routine.

CRs-fixed: 2300341
Change-Id: I662fb469cb3716287663bc6d94d4adccb01a83c4
2018-09-07 03:04:12 -07:00
Rajeev Kumar Sirasanagandla
61a090c1d5 qcacmn: Add wmi support to get firmware roam scan stats
Add wmi layer support to get firmware roam scan statistics which includes
scoring of roam candidates, channels, old and new bssids etc.,

Change-Id: I3a0aafbe66d12eea40e71ceb4c7c3a60b9d6e04f
CRs-Fixed: 2203904
2018-09-07 03:04:10 -07:00
Priyadarshnee S
79a84bde7b qcacmn: Do not hold the lock for a long time in timer delete function
On NOL timer expiry, timer callback handler dfs_remove_from_nol is called.
It acquires dfs_nol_lock at various instances while accessing the elements
of NOL list like deleting an NOL element, printing or copying the elements
of NOL. Also, there is a thread scheduled in the callback handler
dfs_nol_elem_free_work to free the NOL element memory after all operations.
This thread does a del_timer_sync and hence waits for the timer handler to
complete operation before freeing the NOL timer element.

Consider a case where nol timer expires on channel (say chan 100) and
the timer handler is called on core1 of CPU.  After all cleanup operations,
the thread to free NOL timer element is scheduled and acquires an NOL lock.
The lock will be released only after del_timer_sync succeeds in its
operation for which the handler (dfs_remove_from_nol) must have finished
executing on other CPUs.

While the Lock is held by Core1, nol timer expires on another channel
(say chan 120) and timer handler function dfs_remove_from_nol is called
from CPU Core0. In the handler, the same NOL lock is tried to be acquired.
Since it is already held by cleanup thread, it spins. del_timer_sync fails
to succeed in its timer cleanup as the handler function dfs_remove_from_nol
is executing on another CPU. It waits for the handler to finish execution
and handler waits for the lock acquired by the thread. It runs into
a deadlock.

Release the NOL lock before calling del_timer_sync. This will give a
chance for the handler to execute. Acquire the lock again when the next
element is removed from the free list.

CRs-Fixed: 2301063

Change-Id: I822714edee3269ccbb93838e3892796219e1b88e
2018-09-07 01:29:31 -07:00
Jianmin Zhu
ff034e9797 qcacmn: Fix compiling issue of qdf_platform
qdf_platform.h/qdf_platform.c is only used by MCL

Change-Id: I8172f3dbe0716be24a4dda739afb49f94528a4f6
CRs-Fixed: 2310882
2018-09-06 22:48:27 -07:00
Pramod Simha
fab0917d22 qcacmn: Set nbuf frag list to NULL
Set the frag list of the nbuf of a RX defragmented pkt to NULL.
This list will be used to stich the fragmentation list.

Change-Id: I341b0085c123a72dcd74d7f76a4979286e75dc8e
CRs-Fixed: 2297483
2018-09-06 16:13:27 -07:00
Pragaspathi Thilagaraj
d9ad2ce5ea qcacmn: Fix possible OOB read in extract_pdev_utf_event_tlv
The function extract_pdev_utf_event_tlv, is called when the WMI
event WMI_PDEV_UTF_EVENTID is received. The event_buf
argument to it is fully FW controlled. There is an assumption
that the WMI message is at least the size of struct
wmi_host_utf_seg_header_info which could lead to OOB read issues
when a shorter message is sent.

Add fix to validate the event->datalen passed against
sizeof(struct wmi_host_utf_seg_header_info) before copying to
seg_hdr.

Change-Id: I1a8313f11013722edb601c009e59b1509fda3280
CRs-Fixed: 2305465
2018-09-06 16:13:24 -07:00
Wu Gao
28cf95520f qcacmn: Check number of NOA descriptors
There is possible to read buffer overflow. Since it don't check number
of NOA descriptor when handling WMI_P2P_NOA_EVENTID.

Change-Id: I08fc3ac429bc19a8df7ac429fbe779fa3b227318
CRs-Fixed: 2307321
2018-09-06 13:40:44 -07:00
Venkata Sharath Chandra Manchala
a7d5874dba qcacmn: Account for fragmented packets
Account and print fragmented packets received
on the Rx error path.

Change-Id: I078b6524e8de279445bf5f1f156655c354a169b6
CRs-Fixed: 2303817
2018-09-06 11:48:16 -07:00
Shiva Krishna Pittala
5f2280aa4f qcacmn: Separate out nbuf map/unmap code
Put the nbuf map/unmap code under NBUF_MAP_UNMAP_DEBUG.
nbuf map/unmap debug will be enabled on WIN once
the nbuf map/unmap related false positives are fixed.

Change-Id: I6b62539d39664db3ff62411fe8632633f53488c8
CRs-Fixed: 2284128
2018-09-06 10:20:17 -07:00
Linux Build Service Account
5a9b87fd93 Merge "qcacmn: Add logs in wmi_unified_cmd_send()" 2018-09-06 10:04:01 -07:00
Linux Build Service Account
a62d430e01 Merge "qcacmn: Add logs in qdf_nbuf_alloc()" 2018-09-06 10:04:01 -07:00
Linux Build Service Account
0c999dc79c Merge "qcacmn: Add logs in qdf_mem_malloc(), and qdf_mem_malloc_atomic()" 2018-09-06 10:04:01 -07:00
hangtian
71a0cfb91a qcacmn: Copy randomize configuration to sched_scan
Copy randomize configuration to sched_scan, for MAC spoofing.

Change-Id: I357ab5f601bf9e6b17389c621adb63f4977ac844
CRs-Fixed: 2293441
2018-09-06 07:20:02 -07:00
Arif Hussain
89557a3838 qcacmn: Validate stats_req_type type before use as index of req array
Validate type which is used as index of req array to avoid any
out of bond access issue.

Change-Id: I75d08054b94b7066f7bdc030cf9896469c923a65
CRs-Fixed: 2305555
2018-09-06 07:20:00 -07:00
Rachit Kankane
a1c9e5ab29 qcacmn: Featurize WLAN_FEATURE_PACKET_FILTERING
Featurize packet filter properly, as this feature was partially featurized.

Change-Id: Ic10407f8593b14ad22535233ac5b442f3066b627
CRs-Fixed: 2304237
2018-09-06 05:48:09 -07:00
Karthik Kantamneni
4113fb7d13 qcacmn: Add qdf api which converts string to array
Added api which parses given input string to 8-bit unsigned array.

Change-Id: I2d6800f550b37970b9a0d48508a49e6354a94f9a
CRs-Fixed: 2306890
2018-09-06 03:18:36 -07:00
Linux Build Service Account
8563781a63 Merge "qcacmn: Fix NULL pointer dereference in policy manager" 2018-09-06 02:04:55 -07:00
Linux Build Service Account
5faab33ddc Merge "qcacmn: Disable CE-IRQ interrupt before cleaning up the tasklets" 2018-09-06 02:04:55 -07:00
Naga
e85b72a4ae qcacmn: Add support for Extended BSS IE
Add implementation to enhance structure
corresponding to WMI_DCS_INTERFERENCE_EVENT_ID
handler in cp stats component which hold
secondary 40 and 80MHz utilization
which are required parameters of Extended BSS IE

Change-Id: I1c471608394d5c395632742098d2c92fc02ec238
CRs-Fixed: 2298073
2018-09-06 01:42:16 -07:00
Arif Hussain
ffcaef4344 qcacmn: Add logs in wmi_unified_cmd_send()
In wmi_unified_cmd_send() function, pass function name and
line number of caller 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: Ib70d55959087021c4495c175d5363375037afe00
CRs-Fixed: 2281983
2018-09-06 01:42:14 -07:00
Arif Hussain
6e9fa6a725 qcacmn: Add logs in qdf_nbuf_alloc()
In qdf_nbuf_alloc() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.

Also add qdf_rl and qdf_rl_nofl_* macros.

Change-Id: Ib8ce83335807cfbd2d83d1f165d6bec1dc1e4c94
CRs-Fixed: 2281983
2018-09-06 01:42:11 -07:00