Revīziju grafs

6237 Revīzijas

Autors SHA1 Ziņojums Datums
Arif Hussain
2028c7f543 qcacmn: Fix possible OOB read in extract_reg_cap_service_ready_ext_tlv
OOB read can occur while handling WMI_SERVICE_READY_EXT_EVENTID event
when large invalid num_phy received in that event, as this value is used
as index to array.

Change-Id: I0e80d04d19160e219028b07599a8b9953a798fb2
CRs-Fixed: 2374726
2019-01-19 13:18:32 -08:00
Chaitanya Kiran Godavarthi
1f55ed1a9f qcacmn: Check create thread return value in scheduler
Check for NULL in scheduler create thread return value

Change-Id: I00b1e58115eb70ba0074bb8e147445cf43296a66
2019-01-19 11:14:27 -08:00
Debasis Das
a5e316fb7e qcacmn: Fix array out-of-bounds in target CE config array
The CE11 in target CE config array is used, but not allocated.
Fix this by allocating memory for CE11 in the global structure.

Change-Id: I85088f5a832aec037a1e46eed4b72ac4228fde44
CRs-Fixed: 2365435
2019-01-19 03:17:01 -08:00
Nandha Kishore Easwaran
ea9c2de208 qcacmn: Componentize qwrap
Remove dependency of qwrap on VAP layer and radio(ic) layer data
structure. Added flags to detect qwrap specific features in vdev
structure.

Change-Id: I5bb951ce8c813928b9ab189a77bf4da2ac6258d6
2019-01-19 01:10:28 -08:00
Dustin Brown
631cde9525 qcacmn: Add qdf_must_check function attribute
Some compilers allow functions to be annotated such that a warning will
be emitted if the return value of that function is not used. Allow the
WLAN driver to leverage these annotations by introducing a wrapper in
QDF, qdf_must_check.

Change-Id: I9c1328ae904857717703aae3748b207967a8dd3d
CRs-Fixed: 2382837
2019-01-19 01:10:25 -08:00
Pavankumar Nandeshwar
2702aeeb0a qcacmn: keep objmgr_peer alive until txrx peer is freed
Make sure the objmgr_peer is not deleted before
dp peer is deleted, which will avoid the access
of already freed objmgr_peer for connected sta peers.

Change-Id: Ib931dcd0c5650fea5284e9dd53dae9e41f662c56
CRs-Fixed: 2359645
2019-01-18 21:28:50 -08:00
Vinay Adella
a06e8c8bfb qcacmn: Fix use-after-free issue in hal_srng_cleanup
hal_srng_cleanup was called from dp_srng_cleanup after the
hal_soc was freed.
Move the call to dp_srng_deinit where the memory is still
valid.

Change-Id: Ida25ee48e527b5139fc05cd85c5634e70965ccd0
CRs-Fixed: 2367332
2019-01-18 21:28:45 -08:00
Will Huang
5a453d8d40 qcacmn: Remove CONFIG_MCL for send_scan_chan_list_cmd_tlv
Currently we have same function name/different implementation when set
wmi scan channel list for WIN and MCL, the implementation for WIN side
send_scan_chan_list_cmd_tlv looks more intuitive which will remain with
minor change.

Remove definition of struct scan_chan_list_params and wmi_channel_param
which is no longer needed. Change HT flag set independent on VHT flag.
Add WMI DFS flag set if channel_param.dfs_set set.

Change-Id: I131ca09c12687bda5eb3eb03b7bcca1d62ac7aa9
CRs-Fixed: 2363675
2019-01-18 21:28:42 -08:00
chenguo
d37a822ae3 qcacmn: Limit maxinum nss number as 2 for MCL platform
As a hot fix before h\w part change, just limit maxinum nss number
to 2 for MCL platform.

CRs-Fixed: 2377796
Change-Id: Iad205804be90b6803ff2f1afa79076dde9b77013
2019-01-17 22:20:50 -08:00
Arif Hussain
61847a9ba6 qcacmn: Use function name instead of file name in debug logs
Replace all instance of file name to function name in debug logs.

Change-Id: Iff731675772859f02c975005b2656eaa41c6f360
CRs-Fixed: 2377894
2019-01-17 22:20:46 -08:00
Ashok Kumar
6f8b924d64 qcacmn: Add support for pmksa handling
Added support for pmksa handling in crypto to
support add_pmksa, del_pmksa and
flush_pmksa function calls from cfg80211.
Added support for adding pmkid in rsnie.

Change-Id: Ic8add9635c2e7fd73da21b1305467e6500f6d73c
CRs-Fixed: 2363632
2019-01-17 22:20:42 -08:00
Jeff Johnson
5b92ee0716 qcacmn: Replace session_id with vdev_id in qdf_trace APIs
To align with the converged nomenclature replace the identifier
session_id with vdev_id in qdf_trace APIs.

Change-Id: Ic97a2df848e2b687edbd29c419193f4285125f81
CRs-Fixed: 2381424
2019-01-17 22:20:38 -08:00
Amar Singhal
31c36fd829 qcacmn: Set world mode if dynamic country not found
Currently host does not process the country code if CC
is not found in the firmware. Firmware supposedly set world
mode if CC is not found. Set the world mode in such a case.

Change-Id: I87dde58c70ce12358583c704d1959e0467f9b186
CRs-Fixed: 2368293
2019-01-17 20:04:50 -08:00
Shashikala Prabhu
75b0650131 qcacmn: Add new target_if layer files for for LTE and 11d feature
Create target_if_reg_11d.c and target_if_reg_lte.c  files.
Move 11d and LTE feature specific code from target_if_reg.c file to
these files.

These files has only MCL specific code.

Change-Id: I016c6e6c8b6d54670496367e08ac5d83ad94bebd
CRs-Fixed: 2349173
2019-01-17 20:04:48 -08:00
Jeff Johnson
3caa53099c qcacmn: Remove SSID hotlist support
Change Ie6c4a9847f2daa9ba2aebd17f386d584201b86d6 ("qcacld-3.0: Remove
obsolete set/reset ssid hotlist") in the qcacld-3.0 project removed
the only client of the WMI SSID hotlist infrastructure. Since this
infrastructure is obsolete, remove it.

Change-Id: I4a1de39c982947bbf4958d976426f95e3217f1a3
CRs-Fixed: 2381277
2019-01-17 13:12:49 -08:00
Chaithanya Garrepalli
ee70a49899 qcacmn: do not process WDI event after pdev deinit
Avoid processing WDI events for a pdev after pdev deinit

Change-Id: If57082cf2cadf92ab3cf2cb9485c7546b118aa0b
CRs-fixed: 2377503
2019-01-17 10:49:27 -08:00
Tallapragada Kalyan
eff377a1d3 qcacmn: do not process duplicate descriptor frame in RX
once in a while the HW is sending a descriptor which
is already processed by host. This can be a potential HW
issue, as a WAR we are not processing such duplicate descriptors
instead increment a counter and continue with next descriptor.

Change-Id: I6c9bc6a9fb4705b42284171a32855411aa5dd73f
CRs-Fixed: 2338543
2019-01-17 10:49:24 -08:00
Abhishek Singh
e88c0e8ffa qcacmn: Refactor the prints for rx management frames
Refactor the prints for rx management frames. Do not print beacon,
probe resp and probe req frames in txrx module.
Also remove the beacon print from wlan_cfg80211_inform_bss_frame.

Change-Id: I1dbfcec1614b9465d97c010fa4c386f3a1612f5f
CRs-Fixed: 2381796
2019-01-17 10:49:15 -08:00
Sourav Mohapatra
2cd5c4ca25 qcacmn: Rectify logic for disabling indoor channels on SAP start
Currently the logic present for disabling the indoor channels during SAP
start is not complete. The way of using the two ini deviates the driver
from the expected behavior.

Mark the indoor channels correctly during SAP start and SAP stop as per
the expected behavior.

Change-Id: Ia136dcbc4f20ad72812f096531863aeb5fbe66fb
CRs-Fixed: 2368218
2019-01-17 10:49:12 -08:00
Chaithanya Garrepalli
9cc562c53b qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW
Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
2019-01-17 02:22:24 -08:00
tinlin
d6bdb6eb36 qcacmn: Add check for num_hw_modes
In extract_mac_phy_cap_service_ready_ext() the num_hw_modes
is used as loop bounds and may be attacked.

hw_mode_caps is a pointer defined by firmware. The exact
array length cannot be got since hw_mode_caps pointing array
length is variable. So use max number to  check
num_hw_modes before loop.

The max number of hw modes is 24 including 11ax.

Change-Id: I72f30ba819bca89915bb09f271e3dbe7c0f157a6
CRs-Fixed: 2369233
2019-01-17 02:22:20 -08:00
Rhythm Patwa
33fd91b43f qcacmn: Add command support for enable/disable Spatial Reuse
Add command support to enable/disbale 'Spatial Reuse Value15
Allowed' parameter in the Spatial Reuse IE.

Change-Id: I755a15da7758704f2e833ddc61805d45654f0957
CRs-fixed:2345770
2019-01-16 19:35:36 -08:00
Chaitanya Kiran Godavarthi
b1e2bf5c79 qcacmn: KW fixes in Tx DP
Add array bound check for Tx desc pool config
Add NULL check for nbuf in case of segment frames

Change-Id: I8b547edf641a7a21823506388b2c04715cffbf21
2019-01-16 17:10:02 -08:00
Shiva Krishna Pittala
860140027e qcacmn: Correct the formatting in Spectral WMI logs
Current Spectral WMI logs on TLV systems are
difficult to interpret, correct it.
Also, set their log level to QDF_TRACE_LEVLE_DEBUG.

Change-Id: I6f19143df230d82edc2fb8dd86b18addbb327d6b
CRs-Fixed: 2369960
2019-01-16 17:09:59 -08:00
Wu Gao
6b70d468e7 qcacmn: Check the valid of chain mask capabilities number
The pointer to chain masks capabilities is increased, and the number
of chainmask capabilities isn't check if valid. Which will cause oob
read list of chain mask capabilities.

Change-Id: I1f11fb49d545a4f88fe4d0734968dbe17c3f1a7e
CRs-Fixed: 2347661
2019-01-16 17:09:56 -08:00
Kiran Venkatappa
cb001d8dd4 qcacmn: Increase WMI event ring size for qca8074
QCA8074 platform supports DBS(two radio) and DBS_SBS(three radio)
modes. In these cases, same WMI event ring is shared for all the
radios. Increase the WMI event ring size two absorb host delays
due to lower clock platforms. This increase is required even to
support three radios.

Change-Id: I1aa08b8fa879f6ec54c838541a0e4c4e5871b60a
CRs-Fixed: 2378193
2019-01-16 12:57:09 -08:00
Jeevan Kukkalli
b6efb747d7 qcacmn: Add peer param to indicate FT roam
Add peer param to indicate start/stop of FT roam to fw.

Change-Id: I5b685fb1265656d319cae9272b7eca2ef2e7c3e3
CRs-Fixed: 2353125
2019-01-16 12:57:06 -08:00
Vignesh Mohan
3ae033ce1c qcacmn: Add offset to second segment cfreq in HE160 mode
For subchannel marking, an offset of 20 MHz was added to the
second segment center frequency value of VHT160 mode operation
to get the actual second segment center frequency.
This was not done for HE160 mode operation, which led to wrong
subchannels being added to NOL.

Add 20 MHz frequency offset to the center frequency for HE160 opmode.

Change-Id: I7c076be220c70c18b60ed68c1ce99068924d41bf
CRs-Fixed: 2378075
2019-01-16 12:57:03 -08:00
Nandha Kishore Easwaran
8958351763 qcacmn: Add pdev_id in debug command
Added pdev_id in debug command in beacon/probe receive
path.

Change-Id: I223d7e43112d69951f53995b4759079ac7f0827b
CRs-fixed: 2378135
2019-01-16 10:37:53 -08:00
Jianmin Zhu
7d37e84cf7 qcacmn: Fix possible OOB read in extract_hw_mode_cap_service_ready_ext_tlv
When WMI_SERVICE_READY_EXT_EVENT is received from firmware, the
function extract_hw_mode_cap_service_ready_ext_tlv is called to
update the soc caps and other capabilities to the host. hw_caps
is extracted directly from the param_buf value received from the
firmware and hw_caps->num_hw_modes is used to traverse
through the hw_mode_caps and update the values to it from the
param_buf->hw_mode_caps, need validate hw_caps->num_hw_modes and
param_buf->hw_mode_caps before use them.

Change-Id: I459f0afce7701ddf1d041912e3406643d27a7f9c
CRs-Fixed: 2336910
2019-01-16 10:37:50 -08:00
Tallapragada Kalyan
30d651d13b qcacmn: Adjust mpdu length properly for RAW MPDUs
mpdu length is calculated wrongly in one corner case
resulting in wrongly identifying the last nbuf of the
mpdu, fixed it by properly adjusting the length.
CRs-Fixed: 2368608

Change-Id: Ia7bd3247eb05f2eb4b5de1c65e7190c798128792
2019-01-16 10:37:48 -08:00
Paul Zhang
884782c9c8 qcacmn: Clean CONFIG_MCL for host_diag_log_set_*
The aim is to remove CONFIG_MCL or CONFIG_WIN from
cmn component.

This change takes care host_diag_log_set_code and
host_diag_log_set_length.

CRs-Fixed: 2371125
Change-Id: Ic04037202d79f87003a47ac2d698bc4e7752ee12
2019-01-16 00:12:08 -08:00
Kiran Kumar Lokere
bd60ad37c2 qcacmn: QCA vendor commands to configure HE +HTC and OMI Tx
Define QCA vendor command attributes to configure HE +HTC support and
HE operating mode control transmission.

Change-Id: I6249a23ab0d0b9a82210c749dfd6bd53fb697c51
CRs-Fixed: 2377769
2019-01-16 00:12:06 -08:00
Viyom Mittal
757853fd60 qcacmn: Fix NULL pointer dereference for 'pdev' pointer
Fix NULL pointer dereference issue observed using static code analysis for 'pdev' pointer.
Problem ID: 380528, 380530

Change-Id: I057062afc8d347247a74d8ae66fc188b69f5ee0f
2019-01-15 05:21:13 -08:00
Sourav Mohapatra
195164b7bb qcacmn: Populate proper rates received by FW
Due to unknown legacy reason, the rates received by the driver from the
firmware are currently divided by 500 to convert it into units of
500kbps. This division by 500 is later compensated by a multiplication
with 5 to maintain units of 100kbps before being sent to the upper
layer. This division and then subsequent multiplication results in the
loss of precision (in the case the rate is not divisible by 5).
Consequently, the rate being sent to the upper layer becomes inaccurate.
Also the calculation of the MCS rate flags is affected.

Do not carry out the unnecessary division and multiplication by 5.
Instead just convert the rates into units of 100kbps (which is as
mandated by the kernel) when driver receives the rate from the firmware.

Change-Id: Iab7b825f4067ad51174a0c545cf4a7d0ab426171
CRs-Fixed: 2378167
2019-01-15 03:13:28 -08:00
Rajeev Kumar Sirasanagandla
f40ae2631e qcacmn: Send 11d country to firmware
When regulatory offload is enabled, firmware sends 11d new country code
event. Now, to get master channel list for this new country send
SET_CURRENT_COUNTRY command to firmware.

Change-Id: Iac4d38ed488984ad2b3739ec8052813b7cc945c1
CRs-Fixed: 2367335
2019-01-15 03:13:25 -08:00
Jianmin Zhu
60e9d43aae qcacmn: Fix OOB read in extract_ndp_ind_tlv()
In the call to QDF_TRACE_HEX_DUMP in extract_ndp_ind_tlv(),
the buffer, event->ndp_cfg is dereferenced an additional time
and then read the length number of bytes in hex_dump_to_buffer,
resulting in an OOB read.
As WMI logging is already enabled, remove the hex dump.

Change-Id: I1ebe2469a6bb2baefc76980405d97700c1c57b5c
CRs-Fixed: 2336856
2019-01-14 21:47:37 -08:00
gaurank kathpalia
575539a9d8 qcacmn: Enable/disable first DFS channel scan through ini
Currently the driver includes all the DFS channels as part of scan
in the scan list, and thus not exclude the DFS channels in the first
scan for faster scan.

Fix is to check the ini, for first DFS channel scan, and then remove
the DFS channels from the scan list if the ini is enabled.

Change-Id: I43d5c87676d4e66706da3cc0029c60559b70d179
CRs-Fixed: 2378805
2019-01-14 21:47:34 -08:00
phadiman
6c3432b709 qcacmn: Fix array out of bound access
Array mcs_count is of size 13 and the
macro MCS_MAX is 13

mcs_count array should be access only
till 12, hence change the comparison
from <= MCS_MAX to < MCS_MAX

Change-Id: Ieab9a8d1f2a06ff31fa79a062bfcbf96f298f0a1
2019-01-14 17:32:55 -08:00
Arif Hussain
c1e7877ff5 qcacmn: Add wapi bkid count in crypto module
Add wapi bkid count in crypto module.

Change-Id: Ia242eaefc24fde0fdd25c10e127e6b85f233ade3
CRs-Fixed: 2379886
2019-01-14 17:32:52 -08:00
Karunakar Dasineni
1f1acf59c9 qcacmn: Increase max size of REO status ring
Increase maximum allowed size of REO status ring to 2048.

Change-Id: I1b85d7f2154a50a5b69eccec3fb5139a9e2d686b
2019-01-14 17:32:49 -08:00
Alok Kumar
6fef0e9592 qcacmn: Reset rx_pending to avoid continuous tasklet scheduling
The rx_pending flag is never set to 0 if the check for
TARGET_REGISTER_ACCESS_ALLOWED(scn) is failed when target is
not reachable. Since, the rx_pending flag is not set to 0,
ce_check_rx_pending(CE_state) check inside ce_tasklet() will
be true and tasklet gets rescheduled again and again.

Reset the rx_pending flag before TARGET_REGISTER_ACCESS_ALLOWED(scn)
check in ce_per_engine_service() to avoid continuous scheduling of
tasklet when check for TARGET_REGISTER_ACCESS_ALLOWED(scn) fails.

Change-Id: Ib9268e6cf2bdcd0ed0bf84934e9370bcef1cdbab
CRs-Fixed: 2375307
2019-01-14 12:58:59 -08:00
Vivek Natarajan
ed3bf79dd4 qcacmn: Use htc_lock while accessing TxLookupQueue
There are other places where txLookupQueue is protected
with htc_lock instead of lookup_queue_lock.

Change-Id: I91497ce4593a14033871d3e8c3a97deab222d365
2019-01-14 08:38:17 -08:00
Vivek Natarajan
95f004f879 qcacmn: Update Rx stats in case of vow traffic
For non-NSS platform, update no of rx packets being
sent from wifi driver to network stack in case of
vow traffic.

Change-Id: If16a5b9c37a16374d4217369b1f02360c62155a9
CRs-Fixed: 2371429
2019-01-14 08:38:14 -08:00
Abhishek Singh
b46a753f63 qcacmn: Fix race while accessing the serialization timer cmd pointer
If two threads T1 and T2 are trying to stop the serialization timer,
both can get the timer while holding lock. Timer cmd pointer is set
to NULL after releasing lock.

Now if a third thread T3 is trying to start the timer at same time,
it may get the timer as soon as T1 make cmd NULL and adds its cmd
pointer to the timer in the list.

But T2, which was also trying to stop the timer can stop the timer
and set cmd back to NULL again.  Thus T3 will not have the timer in
the timer list.

Now when driver try to abort/flush the command it will not find the
timer and In case timer is not found the command is not freed, leading
to vdev ref leak.

To fix this stop and update the timer while holding lock.

Change-Id: I363a4d36181328be310c7c980c981302501a9453
CRs-Fixed: 2376733
2019-01-13 18:46:04 -08:00
Abhishek Singh
00f80b6094 qcacmn: fix out of bound access of memories in wlan_cfg80211_scan
In wlan_cfg80211_scan the number of ssid, ssid length and number of
channels are not checked for max size of array and thus can lead to
Out of bound access of memories.

Fix is to add bound check before copying the params.

Change-Id: Ie6d4e546fb9c884d5988493b611ef7b217f0a95c
CRs-Fixed: 2375217
2019-01-13 11:26:48 -08:00
tinlin
ab5cba5cbb qcacmn: Fix NULL pointer dereference
In extract_hal_reg_cap_tlv(), hal_reg_capabilities
can be optionally defined. This field can be NULL
resulting in a NULL pointer read. Add NULL pointer
check before qdf_memory_call().

Change-Id: I142bed65e80aa9b4bb88a4e68f74235dd50e3624
CRs-Fixed: 2368284
2019-01-13 11:26:45 -08:00
Abhinav Kumar
f9074e2c09 qcacmn: Cleanup INI CFG_DROP_BCN_ON_CHANNEL_MISMATCH
Initialize drop_bcn_on_chan_mismatch from INI
(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) default value

Change-Id: I55c28aa5656ce6befe9cd3477ab0b14c99641cea
CRs-Fixed: 2375199
2019-01-13 11:26:43 -08:00
Bala Venkatesh
7a5bee08a9 qcacmn: Don't drop the beacon/probe resp if rates IE does not present
Currently, beacon or probe responses are dropped by the scan module
if the rates IE does not present. But, some AP's in 11n mode does not
add the rates IE.
So, it is not mandatory to have the rates IE in the beacon or probe
response.

Change-Id: Id57b2216c012d117cca1a3a2dbce9825d58b67c3
CRs-Fixed: 2376710
2019-01-13 11:26:40 -08:00
Aniruddha Paul
a2e7c93db7 qcacmn: Change the 2k handling API to non-static
Make the 2k jump handler from static to non-static
to change the scope of the API.

Change-Id: I55e2b69c8d470cdf958da76f4f0c8d0effc7ed2e
2019-01-12 07:28:54 -08:00