Commit Graph

12542 Commits

Author SHA1 Message Date
Pragaspathi Thilagaraj
be3b5fad69 qcacld-3.0: Fix uninitialized variable in cds_is_gmac_mmie_valid
In the function cds_is_gmac_mmie_valid, there is uninitialized
use of mic array elements that are passed into the function
qdf_crypto_aes_gmac which causes error report in coverty.

Initialize mic array before it is passed to qdf_crypto_aes_gmac.

Change-Id: I8650cc18d32f297f659ffaac0a514e183823f042
CRs-Fixed: 2233863
2018-06-14 02:56:13 -07:00
Rajeev Kumar Sirasanagandla
cf88e3afef qcacld-3.0: Avoid buffer over-read in vendor scan
While processing QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN,
scan randomization attributes: SCAN_MAC and SCAN_MAC_MASK are not
validated using nla_policy for a minimum length check of
MAC_ADDR_SIZE (6 bytes) which can result in buffer over-read.

To address this, add nla_policy for randomization attributes.

Change-Id: I872e221b951809ca1e5c60b867be52b9fa738ddd
CRs-Fixed: 2232745
2018-06-14 02:56:10 -07:00
Abhinav Kumar
8556167054 qcacld-3.0: 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: I210773ded47a84a3d06390271401e53cbda83089
CRs-Fixed: 2203232
2018-06-14 02:56:07 -07:00
Kiran Kumar Lokere
0508af99df qcacld-3.0: Send regulatory sync event for self managed reg
Add support to send regulatory sync event to user space for self
managed regulatory when regulatory info is updated.

Change-Id: Iacecb6f3e6a65c615d3a013509770463bdafe616
CRs-Fixed: 2242697
2018-06-14 02:56:04 -07:00
nshrivas
80c98da8d5 Release 5.2.0.82Q
Release 5.2.0.82Q

Change-Id: If07b03de48eff76d6fbb56fbbbe6bc712b8aa7ba
CRs-Fixed: 774533
2018-06-13 22:27:02 -07:00
Nachiket Kukade
37b4e6dfbe qcacld-3.0: Add support for getting dtim and beacon interval
Add support for getting vdev dtim and beacon interval from
mlme in PMO.

Change-Id: I97c117eec290f6b9452b98629bf6b3ee10c38ce6
CRs-Fixed: 2252713
2018-06-13 22:27:01 -07:00
Mukul Sharma
4474604869 qcacld-3.0: Add support for getting cfg integer from PMO
Add support for getting cfg integer from PMO. Register callbacks
during pe_open/close so that PMO can query CFG int values for
calculating parameters like listen interval etc.

Change-Id: I52d165586576e547e175ba276e6b7225db5b27e0
CRs-Fixed: 2252661
2018-06-13 22:26:58 -07:00
gaurank kathpalia
e4a628f2d6 qcacld-3.0: Free channel-list memory from Sap_context
The driver allocates memory to channelist in the API
sap_get_channel_list, and stores the pointer to channel
list in sap_context, and frees the memory allocated for
the same in scan request callback.
But it may happen that before the callback, stop adapter
calls wlansap_context_put and frees the memory allocated
to sap context, without the mem free of channellist, which
results in a mem leak

Fix is to add a NULL check to sap context and free the memory
allocated to the sap context channel list in
sap_cleanup_channel_list.

Change-Id: I7030ca8325ae4c968db654bf14062e332f409b87
CRs-Fixed: 2254767
2018-06-13 22:26:54 -07:00
nshrivas
2e28af52fc Release 5.2.0.82P
Release 5.2.0.82P

Change-Id: I71d2b4a1b575b773a5115ce5e5e81fa01bd7f5dd
CRs-Fixed: 774533
2018-06-13 21:00:44 -07:00
Sravan Kumar Kairam
d431e5b50e qcacld-3.0: Remove logging of peer info after peer delete
Currently after dp peer delete peer info is logged which leads
to invalid pointer access. Do not log the peer info after it is
deleted.

Change-Id: If4c2d9af7e3f2b29e3e034eec08fa68fd329257b
CRs-Fixed: 2259026
2018-06-13 21:00:44 -07:00
Dustin Brown
a6246dd4e5 qcacld-3.0: Check vdevs in hdd_check_for_leaks
Before checking for other kinds of resources leaks, check to ensure all
objmgr vdevs have been properly freed.

Change-Id: Ie30daf22834ceb4a8ce19fbd1d4c9b231d3b70d4
CRs-Fixed: 2255511
2018-06-13 21:00:41 -07:00
Kabilan Kannan
3618a75273 qcacld-3.0: Fix synchronization problem in wma remove peer
Peer removal happens in MC thread context and the corrresponding
unmap events processed in soft IRQ context. But both the events
are not synchronized correctly and causes race condition
in the system.
Apply reference count for the peer to avoid this
problem.

Change-Id: If1ca656a4dc0325032069af926697784cdec9b2d
CRs-Fixed: 2183468
2018-06-13 21:00:38 -07:00
nshrivas
fe356310a9 Release 5.2.0.82O
Release 5.2.0.82O

Change-Id: Ibe69286158f2babfb62565cd62673f2050623fda
CRs-Fixed: 774533
2018-06-13 19:41:14 -07:00
Sourav Mohapatra
d21fc6b148 qcacld-3.0: Make wlan_hdd_cfg80211_set_key_wapi static
The function wlan_hdd_cfg80211_set_key_wapi is currently set as public
which is not required as it is called from the same file only.

Make the function static.

Change-Id: I8188cf02ec06b7212607b2aba759b47ec5cc58ac
CRs-Fixed: 2247639
2018-06-13 19:41:08 -07:00
Tang Yingying
378468160c qcacld-3.0: Remove flush log in TX packet process
hdd_inspect_dhcp_packet() Will be called for each TX packet in SAP
interface. Remove the print to avoid flush print which will impact
the TX performance.

CRs-Fixed: 2253186
Change-Id: I01766ad923725a0cb04b2c19952806d4de84b37e
2018-06-13 19:41:04 -07:00
nshrivas
c928ba2d7e Release 5.2.0.82N
Release 5.2.0.82N

Change-Id: I73b21835e60f399384ad78b553c815d47effd0e2
CRs-Fixed: 774533
2018-06-13 18:20:04 -07:00
Sourav Mohapatra
9916dca12c qcacld-3.0: Update maxNumberOfPeers in sme database from ini
The value that is received from the ini for the max number of peers
supported for SAP is not being updated to the sme database.

Update the ini param into the sme database

Change-Id: I319d825e8b1f643b04b5521577786f8a3ed20e13
CRs-Fixed: 2249919
2018-06-13 18:20:03 -07:00
Pragaspathi Thilagaraj
0092b6736f qcacld-3.0: Fix possible OOB write in wma_update_intf_hw_mode_params
In the function wma_update_intf_hw_mode_params, vdev_id received
from caller wma_pdev_set_hw_mode_resp_evt_handler, is used as
the array index for wma->interfaces. If vdev_id exceeds
wma->max_bssid then a possible OOB write could occur.

Add check to validate vdev_id against wma->max_bssid. Print
error if it exceeds.

Change-Id: I3ddf5e1b24fbd2bd401ac879219300857d05e4b7
CRs-Fixed: 2243990
2018-06-13 18:19:57 -07:00
Pragaspathi Thilagaraj
fbfa88ea39 qcacld-3.0: Increase SAP ACS scan priority to high from low
The function sap_goto_channel_sel triggers the pre start bss
scan for SAP. After this scan is queued, the hostapd process
gets scheduled after 3 secs and proceeds to select the channel
to start the SAP. If scan completion for the ACS scan was not
received, it selects the default channels. ACS scan is sent to
firmware with low priority like other normal scan.
Increasing the priority of the scan will ensure that the scan
completion is done prior to the other existing scans pending on
the queue.

Escalate the priority of the ACS scan from low to high.

Change-Id: Ibe558a4a323f276cce6eaabb3b62db217dbd5a94
CRs-Fixed: 2245200
2018-06-13 18:19:54 -07:00
nshrivas
1c07a383b8 Release 5.2.0.82M
Release 5.2.0.82M

Change-Id: I48cfb714f7190c98a4e8188d27cb457634534e0a
CRs-Fixed: 774533
2018-06-13 15:23:54 -07:00
Rachit Kankane
0106e38412 qcacld-3.0: Add INI support for number of vdevs
new INI gNumVdevs is added to allow number of VDEV support
for both Host and FW. Also Updated logic to calculate num_peers
and num_tids.

Change-Id: Ife5ff24e9594c8986913c06899ac5e41c83fc75c
CRs-Fixed: 2245506
2018-06-13 15:23:53 -07:00
Dustin Brown
c1cdb710bf qcacld-3.0: Reduce excessive logging during suspend
There are several logs along the suspend/resume code paths that log
debugging related information at the INFO level. Reduce the logging
level of these debug logs to avoid spamming the console.

Change-Id: I0e81901e4a053038392c1012600ae125a1ad27a3
CRs-Fixed: 2258093
2018-06-13 15:23:50 -07:00
gaurank kathpalia
3a1059e43b qcacld-3.0: Add break statement in switch case
The API wma_inc_wow_stats lacks a break in switch case
after WOW_REASON_OEM_RESPONSE_EVENT. Due to this
execution falls through to the next case statement or
default.

Fix is to add a break after WOW_REASON_OEM_RESPONSE_EVENT

Change-Id: I0b95fd55403b29d74a471f038e518c58c81cfcf7
CRs-Fixed: 2233189
2018-06-13 15:23:47 -07:00
nshrivas
6bf339d781 Release 5.2.0.82L
Release 5.2.0.82L

Change-Id: Ib29f034fe2409e2421482ee5481a05eb9bcfca4e
CRs-Fixed: 774533
2018-06-13 14:10:56 -07:00
bings
77a35ac15b qcacld-3.0: Check for non zero buffer pointer for FILS info
Currently the length of every FILS information is updated before buffer
pointer check which results in invalid update of FILS information.

Add non-zero buffer pointer check for all parameters of FILS information.

Change-Id: I2065f2f1984da473b5e97ffa25f4ab519e091c5b
CRs-Fixed: 2228062
2018-06-13 14:10:53 -07:00
nshrivas
569b3fe0fb Release 5.2.0.82K
Release 5.2.0.82K

Change-Id: Ide7899f79cefd7f0db3c685370ab035710f9962a
CRs-Fixed: 774533
2018-06-13 12:30:47 -07:00
jitiphil
06b539af65 qcacld-3.0: Compilation error due to uninitialization of buf_len
In wma_unified_link_peer_stats_event_handler() we are checking
if buf_len is of proper value. At this point buf_len is may be
uninitialized, thus causing a compilation issue.

Initialize buf_len before use in the validation check.

Change-Id: Ia19de3c5c8bcd154670a44a9dafca31c6bf0b76b
CRs-Fixed: 2256229
2018-06-13 12:30:44 -07:00
jitiphil
9fa0e8e014 qcacld-3.0: Integer overflow in wma_unified_link_peer_stats_event_handler
In wma_unified_link_peer_stats_event_handler a check for excess WMI
buffer is done by comparing difference between WMI_SVC_MSG_MAX_SIZE and
buffer length with size of wmi_peer_stats_event_fixed_param. In case the
buffer length is a value larger than WMI_SVC_MSG_MAX_SIZE, and as buffer
length is an unsigned integer, it causes an integer overflow and results
in a very large value, thus invalidating the check.

Change the check to compare difference of WMI_SVC_MSG_MAX_SIZE and size
of wmi_peer_stats_event_fixed_param with the buffer length which
prevents chance of integer overflow.

Change-Id: Ic99d0cf6b34c7c45dde3c4feb50e102807564eff
CRs-Fixed: 2224451
2018-06-13 12:30:37 -07:00
nshrivas
a8195d0919 Release 5.2.0.82J
Release 5.2.0.82J

Change-Id: I64687a85a416e0101044543910336a8acae3d388
CRs-Fixed: 774533
2018-06-11 04:45:12 -07:00
Pragaspathi Thilagaraj
b4b7aae0e1 qcacld-3.0: Fix possible NULL pointer dereference in lim_process_messages
In the function lim_process_messages, msg is received as the
argument. msg->bodyptr is accessed before checking if the msg is
NULL. This can cause a NULL pointer dereference if msg is NULL.

Moved the NULL check for the msg structure prior to accessing msg.

Change-Id: I61fc5fc65c9604bd5a82d7e226d9a4a9c30aebd2
CRs-Fixed:  2245791
2018-06-11 04:45:12 -07:00
jitiphil
2de7d6ef8e qcacld-3.0: Use of %p in htt_t2h_tx_ppdu_log_print()
Introducing integer overflow checks in htt_t2h_tx_ppdu_log_print()
contained use of %p which violates security guidelines.

Change %p to %pK.

Change-Id: I9e886e9b065ea6902aeedc3d9c25aac76a07d6de
CRs-Fixed: 2252217
2018-06-11 04:45:08 -07:00
nshrivas
bee83ddc48 Release 5.2.0.82I
Release 5.2.0.82I

Change-Id: I3268091aec71d0b9f98aa6cfe48902080aecd24e
CRs-Fixed: 774533
2018-06-11 03:03:25 -07:00
Paul Zhang
8bbbcdf465 qcacld-3.0: Retry if request_firmware returns EAGAIN
Loading driver is fail because request_firmware returns
EAGAIN when it invokes usermodehelper_read_trylock during
system suspend happens. Though system suspend is aborted,
it hasn't invoked usermodehelper_enable yet.

To resolve this issue, retry again to check whether
usermodehelper_enable has done.

Change-Id: I80f95c2194039a67adbc463a32bfc0a15e68484b
CRs-Fixed: 2251604
2018-06-11 03:03:24 -07:00
nshrivas
1687e16c01 Release 5.2.0.82H
Release 5.2.0.82H

Change-Id: I1be89d262fc10e0c9ff97ae30d9b8916f7a7406f
CRs-Fixed: 774533
2018-06-10 23:55:59 -07:00
Sourav Mohapatra
2101268ece qcacld-3.0: Add compile time check for cRegTableEntries
The maximum value of the variable cRegTableEntries is defined in
MAX_CFG_INI_ITEMS. In the scenario the value is greater than this it
may cause an overrun may occur due to the weak guard.

Turn the runtime check into compile time check to prevent such scenario.

Change-Id: I58a0d47a32d457297d3caa456fd0ca03523ed9f5
CRs-Fixed: 2232723
2018-06-10 23:55:58 -07:00
Abhishek Singh
0edeba0e83 qcacld-3.0: Avoid timeout in case of back to back connect req
In case of back to back connect req, if the 1st connect is in scan for
ssid phase, the 2nd connect req try to cleanup the 1st connect and wait
for disconnect complete variable for 5 sec. In this scenario as cleanup is
pending, the scan for ssid will fail and result in the association
failure.

But in association failure the disconnect complete variable is not
completed and thus the 2nd connect req keeps on waiting for 5 sec.

To fix this complete the disconnect complete variable in association
failure, if reason is scan for ssid failure and hdd disconnect is pending.

Change-Id: Ibc0cfb72d04442e82847dd624ede15eda340b766
CRs-Fixed: 2256376
2018-06-10 23:55:54 -07:00
nshrivas
f00251b320 Release 5.2.0.82G
Release 5.2.0.82G

Change-Id: I83f1f8cb323823321997e38381318e8e5f49f6d4
CRs-Fixed: 774533
2018-06-10 16:39:17 -07:00
Jeff Johnson
21b678d640 qcacld-3.0: Introduce mac_handle_t
Currently tHalHandle is used as the opaque handle for the primary data
structure within the protocol stack. This name is an anachronism given
that the HAL layer was moved to firmware many generations ago. In
addition the name does not conform to the Linux Kernel naming
convention.

To address these issues introduce a new identifier, mac_handle_t, to
be used as the opaque handle. Keep tHalHandle as a typedef to
mac_handle_t until such time that all references have been replaced.

In addition introduce a new set of conversion functions, MAC_CONTEXT()
and MAC_HANDLE(), to be used to convert between these two kinds of
references.

Change-Id: I9d0d7d109621237f29d66f7b06c5b63c38f63fb2
CRs-Fixed: 2257659
2018-06-10 10:47:39 -07:00
nshrivas
c1b00aa228 Release 5.2.0.82F
Release 5.2.0.82F

Change-Id: I76dedfcd65a1f2e073acce418ef90992f3897280
CRs-Fixed: 774533
2018-06-09 09:11:15 -07:00
Vignesh Viswanathan
b58161cf1f qcacld-3.0: Fix 11k offload support check in wma_send_offload_11k_params
In function wma_send_offload_11k_params, check to support 11k offload
in FW fails due to usage of older WMI_SERVICE_EXT_IS_ENABLED leading
to 11k offload params not sent to FW.

Add changes to use wmi_service_enabled instead of
WMI_SERVICE_EXT_IS_ENABLED in wma_send_offload_11k_params.

Change-Id: Ic71043f448d74066a234ae1cb9513a1580011abd
CRs-Fixed: 2255255
2018-06-09 09:11:14 -07:00
Will Huang
0724417fbf qcacld-3.0: Update max_vdev_count to psoc objmgr
Currently max_intf_count which report from target only update to hdd
layer, but there might be a race condition if don't update to objmgr:
There are already max_intf_count vdev created, one of the vdev is
closing by supplicant, vdev is logically deleted and referenced by
other function and waiting for cleaning. The interface count of hdd
layer is already decreased to accept opening new adapter, but the
vdev_id which derived from objmgr vdev is still occupied so the new
vdev have to choose max_intf_count as vdev_id, which makes target
assert.

Update max_vdev_count to psoc objmgr in hdd_update_tgt_cfg()

Change-Id: Ifff0b79cfb4645bb466a22da2d7d07040eee2bd0
CRs-Fixed: 2241098
2018-06-09 09:11:11 -07:00
nshrivas
eb92e54035 Release 5.2.0.82E
Release 5.2.0.82E

Change-Id: I63632268378ba86450aa08b2b991f7d3f0d35afb
CRs-Fixed: 774533
2018-06-09 00:09:17 -07:00
nshrivas
52702d9e36 Release 5.2.0.82D
Release 5.2.0.82D

Change-Id: I836d50b8ca40741efe9a41baf2f256fe8353e5f2
CRs-Fixed: 774533
2018-06-08 22:59:36 -07:00
Rajeev Kumar
4471f1b106 qcacld-3.0: Add magic string for WLAN WD timeouts
To speed up auto triage add magic string whenever driver detects
OPs watchdog timeout.

Change-Id: I2e8dad86b5056f30e82f7dfe9ebc0b4f24672310
CRs-Fixed: 2257331
2018-06-08 22:59:35 -07:00
Rajeev Kumar
617aadd2a2 qcacld-3.0: Enable PNO feature in FW feature config
Enable PNO feature in FW feature config such that WiFi
kernel space driver can return proper PNO feature capability
to user space.

Change-Id: I1360050aab0224b109ee9b3912d1aa428f5a5ed7
CRs-Fixed: 2249491
2018-06-08 22:59:32 -07:00
Rajeev Kumar
85ffc26c54 qcacld-3.0: Disable MAWC feature in config file
Disable MAWC features in HDD config file.

Change-Id: I0cbe8857a7be1c7e12ffdfab7d5683034e1981c8
CRs-Fixed: 2252904
2018-06-08 22:59:29 -07:00
nshrivas
38205382a4 Release 5.2.0.82C
Release 5.2.0.82C

Change-Id: Id1ce69a5ef784c1b25781e079ea31538ff4637d3
CRs-Fixed: 774533
2018-06-08 21:34:48 -07:00
Nachiket Kukade
107f639cce qcacld-3.0: Change wow event API's to accept wow event types
Current ucfg API's that disables wow events accept a u32 bitmap
variable. A pointer to that variable is passed to core API where
it assumes it as a u32 array of 4 bytes. This will lead to out of
bound memory access.

Change wow enable/disable API's to accept wow event type as the
parameter.

Change-Id: I220aaddfea62ab96f121014d0d65a1406988c946
CRs-Fixed: 2233108
2018-06-08 21:34:47 -07:00
nshrivas
acfc426b2e Release 5.2.0.82B
Release 5.2.0.82B

Change-Id: I739aae3788db357f405a7374f25ec245e7e368a3
CRs-Fixed: 774533
2018-06-08 20:14:06 -07:00
Alok Kumar
d27a9ed4f7 qcacld-3.0: Fix race vdev down and tx_desc->vdev access
ol_tx_update_connectivity_stats() in tx completion
path updates connectivity stats referenced from tx_desc.
In cases when vdev has gone down and tx completion are received
leads to NULL vdev access. So, add check before accessing vdev.

Change-Id: I402d740ab3ecd923aa1b632bd0c59447599c17df
CRs-Fixed: 2225053
2018-06-08 20:14:06 -07:00