Commit Graph

4981 Commits

Author SHA1 Message Date
wadesong
d58eaf419e qcacmn: Fix incorrect indention
Fix the incorrect indention in function
util_scan_populate_bcn_ie_list, which causes newer versions of
gcc complaining.

Change-Id: I2ea0f2ea5bf3e381a789ae832f56a43d511e898e
CRs-Fixed: 2247021
2018-06-15 21:31:21 -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
Shashikala Prabhu
ab1d4c30ca qcacmn: Cleanup dfs unused function
Cleanup dfs_mlme_channel_mark_radar unused function.

Change-Id: I16aeacbca8f44de4dcab5667b6065fbb9b5c39d7
CRs-Fixed: 2245665
2018-06-15 20:10:50 -07:00
Bala Venkatesh
96bdde1b07 qcacmn: Fix TDLS tear down issue on initiator
The tdls peer sta id is allocated as part of wma_create_peer.
In HDD, as part of change interface,
wlan_hdd_tdls_disable_offchan_and_teardown_links API is called.
Here driver checks for valid TDLS peers based on staid.
Here HDD assumes staid zero as invalid and non zero values as
valid ID. This is not correct as staid zero also is a valid
staid. Due to this teardown status is not informed to upper layers.

Use 0xFF as invalid sta id for tdls peer to fix this issue.

Change-Id: I3827df9a63081952b2d443c175ef5a59eab85e43
CRs-Fixed: 2258171
2018-06-15 14:49:17 -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
Kiran Venkatappa
68cd728ed8 qcacmn: Fix compiler failure with HOST_DFS_SPOOF_TEST not defined
Callbacks are defined for both cases, so remove compiler
flag around callback declaration and assign callback for both
HOST_DFS_SPOOF_TEST enabled and disabled cases.

Change-Id: I5e3cedaaa5be550243ac090da3ab6499c5e83904
CRs-Fixed: 2249806
2018-06-15 12:39:36 -07:00
phadiman
65eb1b106f qcacmn: Add sanity checks
Add sanity checks for peer and
dbr_pdev_obj->dbr_mod_param structure

Change-Id: I9412be7b96df2ea62d5f0ec7d709fb45eb3849ce
2018-06-14 23:54:14 -07:00
Wu Gao
7d5128c79b qcacmn: Initialize id before tx MGMT frame
It use an uninitialized variable to TX (not wait ack) MGMT frame.

Change-Id: I46c96a2879a945e8284c436e5ff6b761e1c246ba
CRs-Fixed: 2254688
2018-06-14 23:54:12 -07:00
Sandeep Puligilla
f57464c549 qcacmn: Add an API to check if scan is completed
Add a new scan util API to check if scan is completed and
if scan is success.

Change-Id: Id60056b999a7ec23df3d3458d4498d547f6ec4d9
CRs-Fixed: 2248972
2018-06-14 23:54:10 -07:00
gaolez
9bb98176f3 qcacmn: Add length check in ndp event handler
qcacld-2.0 to qcacld-3.0 propagation

Add length check to prevent the data overflow the wmi buffer. The
total length of data should not exceed max svc msg size.

CRs-Fixed: 2248879
Change-Id: I1543732fcfe0cb7e32f7175f7775c9550854cae8
2018-06-14 20:55:52 -07:00
Yuanyuan Liu
f40b2202d4 qcacmn: Add support for WCN3998
Add support for WCN3998.

CRs-Fixed: 2246597
Change-Id: I0c19c8d47d9480e427019e9bf219d95e1ced0614
2018-06-14 20:55:49 -07:00
Rajeev Kumar
c396c9015a qcacmn: Log reason code while flushing logging events
Log reason code while flushing logging events to precisely know
the reason of failure.

Change-Id: Ibe26563780f165e85490c54c2b4f83d959a3587f
CRs-Fixed: 2235276
2018-06-14 20:55:47 -07:00
Sravan Kumar Kairam
76fb31df31 qcacmn: Reduce logging in REO NULL queue desc error case
Excessive logging to console in dp_rx_null_q_desc_handle which
executes in soft irq context is leading to scheduler watch dog bite.
Reduce the severity of the logs to prevent flooding to the console.

Change-Id: I7cced611be6f59d31d315f797fe95ea465658009
CRs-fixed: 2242652
2018-06-14 18:35:29 -07:00
Vignesh U
916926fd97 qcacmn: Move DFS functions to appropriate files
Move the functions dfs_set_update_nol_flag and dfs_get_update_nol_flag
from dfs_cac.c to dfs_nol.c.

Change-Id: Ie2829bf10d5c6f61c4cc062f54c4c9ca2cc6e34b
CRs-Fixed: 2252573
2018-06-14 15:20:43 -07:00
jitiphil
4a8f66f382 qcacmn: NULL pointer dereference in htc_issue_packets()
Inside htc_issue_packets() if the HTC frame header
associated with a packet is NULL, a NULL pointer dereference
can occur.

Add check to verify that HTC frame header is not NULL before
dereferencing.

Change-Id: I4169035286b582a91e5963c20a11c8ad0f375d17
Crs-Fixed: 2232846
2018-06-14 15:20:40 -07:00
Dustin Brown
b4fd609e03 qcacmn: Reduce excessive p2p logging during suspend
Several bits of debug information are being logged to console from the
p2p module, which is seen consistently during suspend/resume. Reduce the
logging level of these debug logs to avoid spamming the console.

Change-Id: I4cf63e88a9d0391fb366b11fa3eb14e9f2f69698
CRs-Fixed: 2258427
2018-06-14 15:20:38 -07:00
Abhijit Pradhan
45098b95de qcacmn: Fix host dfs confirmation FR issues
1. Do not send the RADAR found command to FW for bangradar. Since FW is
   unaware of the bangradar command for Partial Offload chips there is no
   need to send the Radar found indication to FW in bangradar processing.

2. Fix two times vap restart during spoof test: After sending the radar
   found command to the FW, the host waits for the FW to send the status
   check event to the host but if FW takes a very long time to send the
   event then the host timer times out and restarts the channel. After the
   channel restart if the host receives the status from FW, the host does
   the channel change again. Increase the host timer timeout value to avoid
   the two times channel change.

3. When removing the spoofed-radar-infected channel from NOL list, also
   remove the channel from regulatory channel list so that the regulatory
   channels are consistent with NOL.

Change-Id: I914d48e6202261b87a5ed6f8f40e150eb42463e2
CRs-Fixed: 2250008
2018-06-14 15:20:35 -07:00
Visudha Sathurappan
3ca68af4ff qcacmn: Support PDEV CP Stats for DA
Add change to define pdev cp stats structure
for DA and provide APIs to get/set cp stats

Change-Id: Ib46d8b55b4c38b2c7a9e2bea45977de23ad21939
2018-06-14 13:04:52 -07:00
Pamidipati, Vijay
cabd46d044 qcacmn: Set IRQ_DISABLE_UNLAZY flag for DP interrupts
Since DP interrupts are not disabled at source, and enabled and
disabled only at GIC level, set IRQ_DISABLE_UNLAZY flag to avoid
spurious interrupt detection

Change-Id: Ie935bee5bf31171d75342cd7607b0478d5e16906
CRs-Fixed: 2257162
2018-06-14 13:04:50 -07:00
Pratik Gandhi
46837cc4f9 qcacmn: Export symbol to other modules
Export symbol to get Pdev WMI handle for other modules.

Change-Id: Ie46133eac5898ac51fde9b42f66bc365bcc938f4
CRs-Fixed: 2217556
2018-06-14 13:04:48 -07:00
Jinwei Chen
fc76555f2e qcacmn: add the tx_desc id checking
If host receive the tx completion with invalid tx_desc ID,
panic happened. add the tx desc ID check both on dp_tx_hw_enqueue
and dp_tx_comp_handler to know that how this invalid tx_desc ID
is generated by which reason of below two:
1. host tx desc is corrupted and fill in invalid id to TCL_DATA_CMD.
2. FW or HW generate invalid TX compl to host.

Change-Id: Id2b070697199b19f83e5d9fd89eadcfe0423d617
CRs-Fixed: 2243455
2018-06-14 11:47:07 -07:00
Nachiket Kukade
49f9618acc qcacmn: Allow broadcast probe req for p2p scan with empty SSID
In case where driver receives a scan request with a single SSID with
an empty string, it must be treated as an active scan with broadcast
probe requests. In case of p2p search, driver treats this as a passive
scan. With this the P2P Client fails to detect existing P2P GO or
Autonomous GO devices, leading to connection failure.

Set flag WMI_SCAN_ADD_BCAST_PROBE_REQ for this type of p2p scan req.
P2P GO devices will respond to probe requests with wildcard SSID
and Cli will be able to connect to them.

Change-Id: Iacb44fb0cb5363f5af6cf7f6efb219857a799075
CRs-Fixed: 2235604
2018-06-14 11:47:05 -07:00
bings
315d67f3f4 qcacmn: Fix pl_info->log_stat update
If log state 1, 2, 0, 1 are set serially, log state 2 can't be set
successfully, while log state 1 is set to wdi twice, which results
in two same pointers in doubly linked list txrx_pdev->wdi_event_list
and causes dead loop.

Update pl_info->log_stat only when it is subscribed to wdi and sent
to firmware successfully.

Change-Id: I8d67b9f02a2fb2c958d2553a743cbabcedfb2f42
CRs-Fixed: 2250715
2018-06-14 02:56:49 -07:00
Kabilan Kannan
cf124491c7 qcacmn: Remove unused data structures in TDLS component
Remove the unused data structures in TDLS component
to avoid incorrect usage

Change-Id: Id3997d5895dba8e3cb3f60fe102ca846cb009607
CRs-Fixed: 2232726
2018-06-14 02:56:47 -07:00
Abhinav Kumar
5fb51321a8 qcacmn: Add diag events for debugging
Currently there are no diag events to inform user space about
used AKM Suite, requested pairwise cipher, group cipher, and
group key management in assoc request and algo num used in auth
req.

Add such diag events which can be useful in automation.

Change-Id: I25336d541f507bfa16e3b6e10b0653fcce898021
CRs-Fixed: 2225883
2018-06-14 02:56:44 -07:00
bings
2a44c1c811 qcacmn: Set wmi_service_wow_wakeup_by_timer_pattern service bit
Currently the service bit of wmi_service_wow_wakeup_by_timer_pattern
is not set and it is 0. This is wrong because 0 is the service bit of
wmi_service_beacon_offload.

Set wmi_service_wow_wakeup_by_timer_pattern service bit as
WMI_SERVICE_WOW_WAKEUP_BY_TIMER_PATTERN

Change-Id: I52058d79281aeed9312ce6c0c361d3cb254fef07
CRs-Fixed: 2250922
2018-06-13 22:27:10 -07:00
Naveen Rawat
75d5ce3972 qcacmn: Fix NPD in function os_if_nan_process_ndp_responder_req
While processing of NDP responder request if NDP response code is
accept NDI interface is must. Throw error if interface is not provided
and bail out of the function.

Change-Id: I7266e3c82062130f6dbeb078cddfaa15a87d9197
CRs-Fixed: 2247586
2018-06-13 21:01:00 -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
Dustin Brown
028f560991 qcacmn: Add objmgr check for vdev leaks API
During objmgr psoc teardown, it would be useful to assert that there are
no longer any vdevs attached. Add an API that logs a list of all
vdevs attached to a given psoc, and panics if any are found.

Change-Id: Id618fa396ec1238b1bb7a78dfb6267e2b08470e4
CRs-Fixed: 2255503
2018-06-13 21:00:56 -07:00
Kiran Kumar Lokere
76da7996ae qcacmn: Add support to send regulatory sync event
Add support to send regulatory rules info in regulatory sync
event to user space for self managed regulatory when regulatory
info is updated.

Change-Id: Iac8704598fd181e47cb023405dfe592c4c93f51b
CRs-Fixed: 2242701
2018-06-13 21:00:54 -07:00
Krunal Soni
f909a8a0af qcacmn: Fix enum values of MGMT subtype field to correct value
MGMT frame's subtype enums are not correctly displayed on debugging tool
due to incorrect enum values.

CRs-Fixed: 2252180
Change-Id: Ib7e7111e43e95166e3ba87a758295948eb72ba0f
2018-06-13 21:00:52 -07:00
Amir Patel
ffc6a0439c qcacmn: Add spinlock release API in objmgr debug code
Spinlock is locked but not unlocked in objmgr debug code,
this leads to deadlock.
To avoid, while iterating over logically deleted nodes,
if macaddr is NULL (macaddr could be NULL, either due object
memory corruption or object itself is NULL) release list lock
and raise BUG(). Also if name of object (psoc/pdev/vdev/peer)
is NULL (object name could be NULL, if obj_type passed while
adding object to logically deleted list is >= WLAN_OBJ_TYPE_MAX)
release list lock and raise BUG()

CRs-Fixed: 2233619
Change-Id: Ib6a67817234bf352b6e3a57360db0c082be19430
2018-06-13 15:24:01 -07:00
Frank Liu
f433b0787c qcacmn: Reject tdls_vdev create/destroy when disabled in INI
Reject tdls_vdev creation and destroy, when TDLS is disabled in INI.

Change-Id: Ie85e8ed231e14dc413e4bfdcff205c47115c84dd
CRs-Fixed: 2229872
2018-06-13 14:11:05 -07:00
Sandeep Puligilla
719f933642 qcacmn: Remove scan event log
Duplicate information is logged
while processing scan event.

Removed the duplicate log from scan
event handler API.

Change-Id: I3d58e594c683875fa82349d47103cc1de67ae18a
CRs-Fixed: 2255904
2018-06-13 14:11:03 -07:00
Vivek
972ee331d9 qcacmn: Export cfg_psoc_parse API
The cfg_psoc_parse API is called from
a different ko in WIN and the API should
be exported

Change-Id: Idcb3aa7ee745f5942d2877df348fb77389149811
CRs-Fixed: 2256145
2018-06-13 12:31:03 -07:00
jitiphil
fcc2488d25 qcacmn: NULL pointer dereference in free_htc_bundle_packet()
Inside free_htc_bundle_packet() if the HTC packet queue
associated with a packet is NULL, a NULL pointer dereference
can occur.

Add check to verify that HTC packet queue is not NULL before
dereferencing.

Change-Id: I1965a66de74b8954fdc59733e5ef86120f4f8898
Crs-Fixed: 2232839
2018-06-13 12:30:58 -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
Naga
54a68b5752 qcacmn: Add os_if implementation of dcs chan stats
Add change to support get API for dcs chan stats from
within cp stats component

Change-Id: I55af5d83389f34c6c7ff9a7f2a7826eb3a9f4a4c
CRs-Fixed: 2247228
2018-06-11 03:03:41 -07:00
Naga
8703c9c98f qcacmn: Add os_if implementation of atf peer cp stats
Add change to support get API for ATF peer cp stats from
within cp stats component

Change-Id: I1f7ed2e2d1c071df28f34f08d137be1302f61c36
CRs-Fixed: 2247228
2018-06-11 03:03:39 -07:00
Naga
06ef93b2c1 qcacmn: Add os_if implementation of pdev cp stats
Add change to support get API for pdev cp stats from
within cp stats component

Change-Id: Ib791a32a912b7f7e8b7c3b5ebcb3f4e64cdf1f6f
CRs-Fixed: 2247228
2018-06-11 03:03:37 -07:00
Naga
9eeb35db5f qcacmn: Add os_if implementation of vdev cp stats
Add change to support get API for vdev cp stats from
within cp stats component

Change-Id: Ice1c9d6858cbf7241791a6901db7934217bb6076
CRs-Fixed: 2247228
2018-06-11 03:03:35 -07:00
Naga
c5e9342021 qcacmn: Add os_if implementation of peer cp stats
Add change to support get API for peer cp stats from
within cp stats component

Change-Id: I81276cee57a8c28e52e82c0cbc7f58be7dbfa33e
CRs-Fixed: 2247228
2018-06-11 03:03:32 -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
Nirav Shah
c9b0931950 qcacmn: Featurize packet log
Featurize packet log.

Change-Id: Ica7d658ef65486ae77e24a11cef50291a5e82563
CRs-Fixed: 2245424
2018-06-09 02:28:11 -07:00
Amar Singhal
6cc647211d qcacmn: Add legacy code CTRY_JAPAN15 to regdb
Legacy code CTRY_JAPAN15 is still being used. Add that to
regdb as well.

Change-Id: Ibf455b31b11bf909cfba85f487c9c40816eb8959
CRs-Fixed: 2255527
2018-06-08 22:59:44 -07:00
Nandha Kishore Easwaran
372f566a59 qcacmn: Remove rx_header.h file inclusion
Remove inclusion of rx_header.h file

Change-Id: Ie585334fcfed369f2ff81b4d1d1bc16466c46c3e
CRs-fixed: 2256497
2018-06-08 20:14:15 -07:00
Varun Reddy Yeturu
27b4aef196 qcacmn: Add support to store target TWT capabilities
Add support to read the TWT services being advertised
by the target and make use of it internally in the host
at appropriate places

Change-Id: I3691622447271467d9276788574a2f2717928f83
CRs-Fixed: 2251389
2018-06-08 20:14:13 -07:00
Amar Singhal
699074598b qcacmn: Remove unused function htc_add_receive_pkt
Function htc_add_receive_pkt exposes pointer to local
variable to the caller. Since it is unused; remove it.

Change-Id: I3294fde4499a58e6872c44fd8615eff2bfb42556
CRs-Fixed: 2247626
2018-06-08 16:30:36 -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