Commit Graph

1099 Commits

Author SHA1 Message Date
Pragaspathi Thilagaraj
fda1af6bef qcacld-3.0: Fix OOB write in wma_passpoint_match_event_handler
In the function wma_passpoint_match_event_handler, fixed param event data
from firmware is filled in the destination buffer and indication is sent
to upper layers. The buffer allocation is done for the size
(wmi_passpoint_event_hdr*) + event->ie_length + event->anqp_length. The
maximum firmware event message size is WMI_SVC_MSG_MAX_SIZE. If either,
ie_length and anqp_length combined is greater than WMI_SVC_MSG_MAX_SIZE or
either of the two exceeds WMI_SVC_MSG_MAC_SIZE, an OOB write will occur in
wma_passpoint_match_event_handler.

Add check to ensure either of the values ie_length or anqp_lenth or
(ie_length + anqp_length) doesnt exceed the WMI_SVC_MAX_SIZE. Return
failure if it exceeds.

Change-Id: I21f473ca0b99ebb8488f2cca3c0774817ea97c3a
CRs-Fixed: 2201190
2018-03-13 23:18:00 -07:00
Arif Hussain
d54b62c7ca qcacld-3.0: Add dfs phyerr processing
Add dfs phy error processing code.

Change-Id: I756df1052bc563d312112a7c2250f2b34224eae9
CRs-Fixed: 2203434
2018-03-13 21:01:08 -07:00
Jeff Johnson
582a3382c3 qcacld-3.0: Remove obsolete use of DPU signatures
In a previous version of the driver both unicast and broadcast DPU
signatures were used to synchronize the data plane with the control
plane. However the current version of the driver does not use this
synchronization mechanism, so remove propagation of the DPU signatures
from the UMAC. This is part of the plan to completely remove these
signatures from throughout the driver.

Change-Id: I6a1808d0905bb0c4550b16cf2b2157a529caa9e9
CRs-Fixed: 2200997
2018-03-13 07:34:56 -07:00
Kiran Kumar Lokere
9f881ae660 qcacld-3.0: Send WMI custom aggr size cmd for ampdu config
Send custom aggregation size WMI command for user ampdu
configuration

Change-Id: If2157745fa51764595d496604e6f33f2768c35f7
CRs-Fixed: 2201874
2018-03-12 15:57:31 -07:00
Kiran Kumar Lokere
3324f63c57 qcacld-3.0: Add support to set no ack policy for ac
Add support to configure no ack policy for WMM access category.

Change-Id: Idf87507b78cdaf0ac8fdfc975e4fcbe0957423fa
CRs-Fixed: 2198241
2018-03-09 00:10:33 -08:00
Kiran Kumar Lokere
bc87bec984 qcacld-3.0: Add support to send ADDBA with user config
Add support to send ADDBA request with user configured buffer
size and tid and ADDBA response with user configured buffer
size.

Change-Id: I2a1dfedadeb68a1cfca9a6eba8e7775d0bb51d1a
CRs-Fixed: 2193872
2018-03-08 22:06:01 -08:00
Naveen Rawat
d24c116d75 qcacld-3.0: Program phymode before channel width for CSA handling
In CSA handling after vdev restarts, program peer_phymode before peer_ch_wd
to firmware, since firmware cannot handle higher channel width than current
peer_phymode.

Change-Id: I12ce1a6e6c0af758e1ecc9c1d272320e5e800983
CRs-Fixed: 2201944
2018-03-08 18:46:51 -08:00
Rachit Kankane
b103562c27 qcacld-3.0: Add HTC Credit History Feature flag
Add compilation flag to compile out HTC credit History
feature cleanly from the cld-3.2 driver binary.

Change-Id: I5f5e73e430d282c99d3077fb82ed1cb8eb79715a
CRs-Fixed: 2190545
2018-03-08 18:46:38 -08:00
Krunal Soni
40c5e4425a qcacld-3.0: Self peer req is not handled properly causes P2P failure
1) When wma_self_peer_remove() API returns failure, driver triggers
recovery without checking if driver unload is in progress which may
cause driver to go in bad state.

2) when wma_self_peer_remove() API returns success, driver releases the
memory accidently as part of I14895b0d3a19b3aaea2299311cc021ea14408f1e

Fix 1st condition by checking if driver unload is in progress. If driver
in unloading then just release the memory and return failure. If driver
is not unloading then just trigger SSR recovery, so FW can recover
silently.

Fix 2nd condition by checking the return status and release the memory
up on failure status code.

CRs-Fixed: 2197657
Change-Id: Ia08dbdac66d8641d22f6a82c29ab1a5b99309214
2018-03-06 23:45:09 -08:00
Krunal Soni
1b5debddcc qcacld-3.0: Release memory when del self sta req fails in WMA layer
The memory leak is detected in API csr_process_del_sta_session_command()
for the memory allocation of del_sta_self_req.

SME sends this message from WMA for further processing.
When WMA_DEL_STA_SELF_REQ is processed, wma_self_peer_remove() will be
called for p2p device. If wma_self_peer_remove() API is failed due to
some reason then memory needs to be freed up which is allocated through
csr_process_del_sta_session_command() API which is missing.

For any failure case, release the message memory allocated by SME either
by releasing directly in WMA when response is not required or by sending
failure response which in turn releases the memory when response is
required.

CRs-Fixed: 2192935
Change-Id: I14895b0d3a19b3aaea2299311cc021ea14408f1e
2018-03-06 23:45:06 -08:00
Dustin Brown
0b703ef927 qcacld-3.0: Remove maxWoWFilters and related
Recent changes in Power Management and Offload (PMO) have removed the
need for a configurable maximum number of WoW filters. Remove the
following relevant fields:

 * maxWoWFilters
 * CFG_MAX_WOW_FILTERS_MAX
 * WMA_STA_WOW_DEFAULT_PTRN_MAX
 * max_wow_filters
 * ol_ini_info

Change-Id: I99cc74731d6373258dc65473a8342bda0ab2786b
CRs-Fixed: 2199452
2018-03-05 23:33:27 -08:00
Dustin Brown
b9987afb2c qcacld-3.0: Update firmware filter config (part 1)
In order to conserve firmware memory when various filtering features are
not in use, update the target configuration provided to firmware based
on the intersection of various filtering features and host
configuration.

Part 1
	num_wow_filters = ARP/NS offload enabled ? 2 : 5
	bpf_instruction_size - BPF enabled ? 0 (auto) : 0xffffffff

Part 2 (pending firmware support)
	pkt_filter_num = Packet Filter enabled ? 12 : 0 (disabled)

Change-Id: Ic6624ff04598b53d8321e4864618b12b9702780f
CRs-Fixed: 2196997
2018-03-05 21:43:46 -08:00
Arif Hussain
d15902ccd5 qcacld-3.0: Fix possible null pointer de-references in SME and WMA
Add null check to avoid null pointer de-references.

Change-Id: I8a93f269467bbb0dec5610ae158c4f5dc9658a12
CRs-Fixed: 2196080
2018-03-05 20:48:45 -08:00
Dustin Brown
06259e5d96 qcacld-3.0: Add ucfg_pmo_psoc_set_caps()
Provide PMO-specific device capabilities to PMO. This allows PMO to do
intersections between configuration and device capabilities.

Change-Id: If0a199f9be466d16cef900a29b14b73a2a4e52d0
CRs-Fixed: 2197828
2018-03-05 20:48:43 -08:00
Abhinav Kumar
cc86496435 qcacld-3.0: Handle error case in wma_extscan_cached_results_event_handler
Currently, driver calls wma_group_num_bss_to_scan_id API from
wma_extscan_cached_results_event_handler to group bss to scan id
table. Without checking return status of wma_group_num_bss_to_scan_id,
HDD callback is called which can lead to NULL pointer de-reference issue
in wlan_hdd_cfg80211_extscan_cached_results_ind if malloc for
t_scan_id_grp->ap fails in wma_group_num_bss_to_scan_id.

Add check for return status of "wma_group_num_bss_to_scan_id" in
wma_extscan_cached_results_event_handler before invoking HDD callback

Change-Id: I457f39404436c54feb4b555f8101895d3c1ae5d7
CRs-Fixed: 2188297
2018-03-05 13:22:31 -08:00
Min Liu
22202b703a qcacld-3.0: Peer is not deleted when delete VDEV
Failure can be observed when waiting for peer deletion
before sending WMI command. Peer deletion in VDEV stop
timeout handler also need to be handled in the scheduler
queues.

Change the logic to wait for peer delete completion
before sending message to scheduler queue to delete VDEV.

Change-Id: I78d3070a73c85d212bc33c346b3e60edf3c016f8
CRs-Fixed: 2187430
2018-03-05 07:16:41 -08:00
Abhishek Singh
1d1d3e3970 qcacld-3.0: Stop the vdev rsp timer as soon as vdev req is removed
In wma_vdev_delete_handler() once vdev req is removed from the
vdev_resp_queue the vdev rsp timer is stopped and freed after
releasing the wake lock and vdev detach callback.

So before vdev rsp timer is stopped it may get expired and
post msg in MC thread. Now once this timer msg is processed it
access the already freed memory.

To fix it stop vdev rsp timer first before releasing the wake
lock and vdev detach callback.

Change-Id: Iface6d1faaa9f801d0da7a70d548eafbd082dc48
CRs-Fixed: 2196338
2018-03-02 16:52:31 -08:00
gaurank kathpalia
85f8a61cf9 qcacld-3.0: Periodically update host time stamp to firmware for sync
qcacld-2.0 to qcacld-3.0 propagation

Send host timestamp to firmware, so that firmware can print the
logs timestamp in sync with host.

Change-Id: I1d4d223aa1c8e207941ab659f69b72a855e3a604
CRs-Fixed: 2193976
2018-02-28 23:35:44 -08:00
Kiran Kumar Lokere
0923ad8015 qcacld-3.0: Fix capability parsing in service ready event
Check the total supported mac and phy count for capability
parsing in service ready extension event.

Change-Id: Ibde9040e5adf97d53645f714e5e8981dd1a9d22a
CRs-Fixed: 2194602
2018-02-28 23:35:40 -08:00
Nirav Shah
eb017befbd qcacld-3.0: Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I2de81794cd16521097ffa6956a18b4b0fe981d36
CRs-Fixed: 2196757
2018-02-28 05:29:39 -08:00
Padma, Santhosh Kumar
9668240906 qcacld-3.0: Add support for GMAC offload
Add check for GMAC offload capability wmi_service_gmac_offload_support.
If firmware supports GMAC offload, trim MMIE when driver receives
PMF frame. Otherwise, driver calculates MIC and trims MMIE.

Also, add support for suiteB auth types during roaming in
e_csr_auth_type_to_rsn_authmode.

Change-Id: Id44f44a41297ca3e462d14905f5986f904a639fd
CRs-Fixed: 2185819
2018-02-28 01:29:51 -08:00
Venkata Sharath Chandra Manchala
2996517bbc qcacld-3.0: Enable pktlog for Helium
Add Support to enable pktlog through INI
for helium based devices.

Change-Id: I0acfcf1db8c007c5e2ce81fcb1775fd1b7a50570
CRs-Fixed: 2185210
2018-02-28 00:31:24 -08:00
Krunal Soni
a5388a25f7 qcacld-3.0: Add vdev restart when changing channel in monitor mode
While changing the channel, driver needs to add vdev restart instead
of channel switch.

Change-Id: I2d5a40aee2108feda5da5e41c6d18aab6c3a30bc
CRs-Fixed: 2182014
2018-02-27 22:17:09 -08:00
Varun Reddy Yeturu
bc1bea0956 qcacld-3.0: Send ROAM_STOP if roam synch failed
Send a ROAM_STOP command to firmware with an explicit
reason code for the failure so that it is not blocked
in WMA before sending it to firmware.

Change-Id: I4d7e2e525c145ca0e990dcef85948285e2186c63
CRs-Fixed: 2182671
2018-02-27 22:17:04 -08:00
Abhishek Singh
221cf99fdf qcacld-3.0: Cleanup unused scan code
Cleanup the unused legacy scan code.

Change-Id: Ia664f815759142e7f4ad8e648a469c63ddd003f5
CRs-Fixed: 2193917
2018-02-22 07:25:52 -08:00
Vignesh Viswanathan
08ad8a0a34 qcacld-3.0: Add vdev_id sanity check in wma_vdev_stop_resp_handler
In function wma_vdev_stop_resp_handler, resp_event->vdev_id is
received from the FW and is used to access the interfaces array in
wma_handle. This could lead to OOB read/write if the vdev_id
received from the FW is greater than or equal to max_bssid.

Add check to return failure if resp_event->vdev_id is greater than
or equal to max_bssid in wma_vdev_stop_resp_handler

Change-Id: I1af5312e6c45db3b9ba03fbf45de3d3c2a7fab20
CRs-Fixed: 2185477
2018-02-21 15:24:18 -08:00
Naveen Rawat
368858c54f qcacld-3.0: Switch order of phymode and ch_width
As part of csa or opmode IE handling program phymode param after
ch_width since firmware expects channel width to be programmed
before phymode.

Change-Id: I46e3a5e1ce94fa53e27f821e70c29e209e591865
CRs-Fixed: 2186030
2018-02-16 19:46:25 -08:00
Krunal Soni
1fd496d4f2 qcacld-3.0: Send certain DTIM params when LI offload is enabled
It is decided to centralize the logic of programming LI based on
modulated/dynamic DTIM in FW to address the concerns with LFR3.0 in WoW
mode. In order to make it work, following steps need to be performed.

1) If listen interval offload bit is enabled in service ready extension
   then,

   a) Driver needs to send "gEnableModulatedDTIM", "gMaxLIModulatedDTIM"
      and "gEnableDynamicDTIM" params' value to FW via VDEV PARAM up on
      each successful association.

   b) Driver should not program LI during suspend()/resume()

2) If listen interval offload bit is disabled in service ready extension
   then don't trigger above changes.

Change-Id: I6f94c95bd83e5846d7290d5dc752b14da5951a76
CRs-Fixed: 2187597
2018-02-14 13:02:13 -08:00
Abhinav Kumar
f9989586a6 qcacld-3.0: Scan cleanup in lim and csr
Cleanup the unused scan legacy code in lim and csr

Change-Id: Ibea328196a9453ebaae887aa4068e78c47296762
CRs-Fixed: 2184924
2018-02-14 04:02:17 -08:00
Kiran Kumar Lokere
f7662e5fed qcacld-3.0: Validate opmode update req before sending to FW
Check the current vdev supported bandwidth values agianst peer
opemode update value and if the peer opmode value is greater than
current supported value then do not send the opmode update request
to FW.

Change-Id: I8f360d769b5aafb90061a6a9d18f1f8062e3534e
CRs-Fixed: 2174050
2018-02-13 18:28:42 -08:00
Kiran Kumar Lokere
13dedacbdc qcacld-3.0: Update HE STBC cap and support to configure it
Update the HE STBC capabilty per latest spec and add support
to configure it using INI configuration and ioctl.

Change-Id: I4ecc7b600671c132c1f3968a10fb652a4311f484
CRs-Fixed: 2181114
2018-02-13 17:24:04 -08:00
Rajeev Kumar
0b071179d4 qcacld-3.0: Add vdev id sanity check in wma stats event handlers
Stats events are sent by WLAN FW based on over the air frame reception
and may contain incorrect vdev id hence sanitize vdev id received from
FW in stats events before accessing interface array based on it.

Change-Id: I4ecc73fc27285c98c0ea8cebc27955213cd68399
CRs-Fixed: 2186953
2018-02-13 15:22:07 -08:00
Kiran Kumar Lokere
6d3a30dd48 qcacld-3.0: Update DTIM value in WMA for modulated DTIM
Update DTIM value in WMA interface for modulated DTIM
calculation

Change-Id: I090cb2f33427202edb4e4272e6ac79686fec9cf8
CRs-Fixed: 2171810
2018-02-13 15:22:04 -08:00
Zhu Jianmin
a2f8e8dbe1 qcacld-3.0: wait tx complete before vdev stop
Before VDEV_STOP is initiated by host, sometimes there are
outstanding mgmt tx pkts left in FW.  need wait all tx
complete,  or peer vdev ref count keep held. In P2P GO/SAP mode,
no wait since wma->interfaces[session_id].delay_before_vdev_stop
is 0, ini relative cfg isn't passed to wma at all.

Change-Id: I1c3d137bb08624e30cc220e0fa0e31e6d6fc8a9d
CRs-Fixed: 2184096
2018-02-13 09:33:52 -08:00
Kiran Kumar Lokere
05a0658af1 qcacld-3.0: Validate CSA WBW IE before processing channel switch
Check new channel width and center frequency segments in CSA
wider BW IE before processing the channel switch and if CSA IE
has invalid data for any of these parameters then do not do the
channel switch with wider BW.
Also check for self capability for BW that is supported by device
before processing wider BW channel switch. If AP advertises the new
channel width with valid data that is greater than self capability
BW value then limit the channel switch BW to self capability.

Change-Id: I1d567e5cdc6347b56b513ea002b5a3978cb447e9
CRs-Fixed: 2182054
2018-02-12 19:52:21 -08:00
Arif Hussain
05fb4870a3 qcacld-3.0: Add bss color collision detection support
Add support for bss color collision detection.

Change-Id: Idd616ca902469f5dc446d35e63fce7fe7eb0d327
CRs-Fixed: 2130127
2018-02-11 23:20:42 -08:00
Arunk Khandavalli
4b44ef4e00 qcacld-3.0: update tgt services from converged structures
Update the services information from the target psoc info structure.

CRs-Fixed: 2178933
Change-Id: I7137ff604d680fe6eb5ff6486b59879bf52ebc91
2018-02-09 06:24:23 -08:00
Min Liu
a9df1ff921 qcacld-3.0: Fix FW assert when delete VDEV
FW assert is observed when deleting VDEV due to there are peers
not deleted.

Add check for peer number in FW before sending delete VDEV
command to avoid such issue.

Change-Id: I4cc5d4c63faf3dc8f7b9d0702f92b54b298802cb
CRs-Fixed: 2163770
2018-02-09 01:51:13 -08:00
Abhishek Singh
c87bb049d8 qcacld-3.0: Move wma_get_buf_start_scan_cmd logic to common code
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.

Change-Id: Iaee8ab5b7f0c20867bf37db7509b1c1fab23579d
CRs-Fixed: 2180959
2018-02-08 23:34:34 -08:00
Arunk Khandavalli
10af728966 qcacld-3.0: use common specific mode caps
As part of convergence the mode capabilities
are extracted and saved in the target info structure.
Update the hardware mode list and pcl from the converged
structures.

CRs-Fixed: 2179003
Change-Id: I3cfc28533448c312913db3bead5d5322386f3f74
2018-02-08 07:55:38 -08:00
Himanshu Agarwal
88b16a48d0 qcacld-3.0: Register wmi_tlv_attach() through wmi_tlv_init()
Register wmi_tlv_attach() through wmi_tlv_init() for WMI
modularization.

Change-Id: I4c21fd5ddd6e58dcebfbf1b484b418c537e23e58
CRs-Fixed: 2184817
2018-02-08 06:58:25 -08:00
bings
6b41366494 qcacld-3.0: Update target type to target_type of psoc_info->info
Target type should be passed to target_type of psoc_info->info in
wma_open.

Change-Id: I657b54c6c64c40f0a0bff2cbd6c75cddc4edc921
CRs-Fixed: 2184833
2018-02-07 19:23:55 -08:00
Yeshwanth Sriram Guntuka
d18c7a27a7 qcacld-3.0: Populate correct HT MCS index in station stats
HT MCS index returned by wma_get_mcs_idx function is
between 0 and 7 for both nss equal to 1 and 2. This
results in incorrect HT MCS index for nss 2 case
populated in station stats on using iw station dump
command.

Fix is to set the correct HT MCS index based on nss.

Change-Id: Id4ac51b56bc44e90ea0e7570b387450af83ee8f5
CRs-Fixed: 2182050
2018-02-07 07:55:34 -08:00
Vignesh Viswanathan
fb9d07522e qcacld-3.0: Send 11k offload params as part of RSO to WMA
Currently 11k offload params is sent directly as a message from CSR to WMA
leading to timing issues where 11k offload params are sent to the FW
before RSO start is sent.

Send the 11k offload params as part of the RSO request from CSR to WMA
and handle the request to send the 11k offload WMA command to FW.

Change-Id: Icff7146171cdf325f3a7e5a067652669ec0270ff
CRs-Fixed: 2183161
2018-02-07 04:00:22 -08:00
Arunk Khandavalli
2462f461ab qcacld-3.0: Remove redundant wma_handle values
update the max frag entry,ht,vht, rf chains from from the converged
target psoc capabilities information and remove redundant wma_handle.

CRs-Fixed: 2178922
Change-Id: I6bfe734bac85905b0d6837bffb37d286cff2a4ff
2018-02-07 03:07:37 -08:00
Arunk Khandavalli
aaf6b14da0 qcacld-3.0: Use converged wmi service bit map
Use the converged wmi service bitmap from the
target psoc info instead extracting the same from
the ready event.

CRs-Fixed: 2178812
Change-Id: I00d61aa3cbb2a90459d4363e2ca04e297cc74187
2018-02-07 03:07:32 -08:00
Arunk Khandavalli
80a61351fb qcacld-3.0: Extract phy_capability from target psoc
As part of converged init deinit architecuture, all the target
capabilities are saved as part of target_psoc_info, use the same
to update.

CRs-Fixed: 2178726
Change-Id: Iad1d0224e0fdfe1140d1600e17f3e585142eaf63
2018-02-07 02:15:12 -08:00
Will Huang
9323e8559b qcacld-3.0: Add msg.flush_callback for wma_send_msg_by_priority
If wma_send_msg with msg_type WMA_SET_LINK_STATE_RSP, tpLinkStateParams
params has a member callbackArg which is malloc from heap. If this
message is flushed when driver unload, because no msg.flush_callback is
supplied, the flush just free msg->bodyptr and callbackArg got leak.

Fix it by supply a flush_callback as wma_discard_fw_event, and minor
change to avoid NULL pointer access.

Change-Id: Ie979a1e83cbd7c87e5bbb08382ae2af3230a13db
CRs-Fixed: 2181458
2018-02-07 02:15:08 -08:00
Vignesh Viswanathan
1f6e08faea qcacld-3.0: Add sanity check for vdev_id in wma_wow_wakeup_host_event
Currently wake_info->vdev_id, recevied from the FW, is directly used
to refer to wma->interfaces without validating if the vdev_id is valid.

Add sanity check to make sure vdev_id is less than max_bssid before
using it.

Change-Id: I66be7d15f370d0204e25c3d0ea60c0c9f5912005
CRs-Fixed: 2121059
2018-02-07 00:03:44 -08:00
Himanshu Agarwal
ceb9faa305 qcacld-3.0: Remove dependency on WMA layer for green AP component
Remove dependency on WMA layer for green AP component by registering
green AP events through target_if layer.

Change-Id: Ic4ea8df1928db632b8e31f0a873b74c6aff4505d
CRs-Fixed: 2167028
2018-02-06 17:32:55 -08:00