Commit Graph

1396 Commits

Author SHA1 Message Date
Wu Gao
66454f118f qcacld-3.0: Apply PMO configures
Since refined PMO configures based on converged cfg component, apply
PMO configurations, remove related legacy codes.

Change-Id: I2cdf18c1000d8cc923c80c00bf530b2b0c60563e
CRs-Fixed: 2322185
2018-10-01 18:38:10 -07:00
Pragaspathi Thilagaraj
da3b5e21eb qcacld-3.0: Remove legacy WEP CFG definitions
Remove the legacy definitions that are related to the WEP
cfg.
Move them to mlme component

Change-Id: Ibcec8adf15123d12ad7c2eb6ed770b44a093673a
CRs-Fixed: 2324046
2018-10-01 11:36:26 -07:00
gaurank kathpalia
d001f985d2 qcacld-3.0: Add check for num_peers in wma_ibss_peer_info_event_handler
in wma_ibss_peer_info_event_handler, the driver has a upper
bound check on num_peers and not a lower bound check.
the num_peers should be a positive value.
Since there is no check to see if num_peers is set to 0,
this check can underflow and result in multiple OOB writes
once the loop has incremented more than 32 times.

Fix is to check whether num_peers is a positive value,
and return if not found true.

Change-Id: I599151cc6720ed931142ad6a519add6957fea467
CRs-Fixed: 2324139
2018-10-01 09:48:40 -07:00
Sandeep Puligilla
30bb8407cd qcacld-3.0: Add VDEV state machine for STA disconnection
Add support for VDEV state machine support
for STA disconnection

Change-Id: Iee7274fbc8ae985d034a29f920faa38aab68ccc7
CRs-Fixed: 2322539
2018-10-01 09:48:36 -07:00
Pragaspathi Thilagaraj
3551caa95b qcacld-3.0: Fix error handling in eWNI_SME_ADD_STA_SELF_RSP
When peer creation fails in wma_create_peer, vdev delete is sent
to the fw and then eWNI_SME_ADD_STA_SELF_RSP is sent to sme.
Here three error cases needs to be handled:
1. The vdev deletion has happened, but the cdp_detach_peer is
not done. So the data path peer remains. Also the vdev_active
flag that was set after vdev creation was not unset.
2. The eWNI_SME_ADD_STA_SELF_RSP msg handler
csr_process_add_sta_session_rsp invokes csr_roam_session_opened
which signals HDD that vdev is created successfully and hdd
calls hdd_vdev_ready and vdev related parameter set commands are
sent to FW for the deleted vdev.
3. Vdev delete is not sent for objmgr peer creation failure in
case of VDEV_TYPE_STA and release vdev object ref count.

Add cdp_vdev_detach() calls during error case and set the
vdev_active flag to false. Handle releasing vdev object ref
count in all needed error case flows.
Propagate the error in wma_vdev_attach() through
csr_roam_session_opened() to HDD and abort the vdev create.

Change-Id: Iec97122d011098fae7ae2a59864fbe8ca8a0980e
CRs-Fixed: 2322212
2018-10-01 09:24:20 +05:30
Will Huang
7b39e19a60 qcacld-3.0: Remove reachable QDF_BUG(0) in wma_vdev_start_resp_handler
While handling the WMI_VDEV_START_RESP_EVENTID WMI FW event a reachable
QDF_BUG() can occur, because the message coming from out is not
reliable.

Change-Id: I9a142152a5d65e8fa25590eac1bc63279a1de4ba
CRs-Fixed: 2321490
2018-09-28 21:33:51 -07:00
Pragaspathi Thilagaraj
f445a4badf qcacld-3.0: Remove legacy call to cds_is_target_ready
When wma_create_peer is called, driver checks for
cds_is_target_ready and the macro CDS_DRIVER_STATE_FW_READY is
unset during the wlan_hdd_pld_uevent. This results in race
condition where the wma_peer_create fails due to
cds_is_target_ready() failure and wma_vdev_delete is sent from
wma_vdev_attach. In wmi_stopinprogress is set when firmware is
down. But this is set only after a small delay and the vdev
commands reach the fw, which results in a race condition.

Remove the cds_is_target_ready() call from wma_create_peer.
Place the call to wma_wmi_stop() to set the wmi_stopinprogress
flag immediately after the wlan_hdd_pld_uevent is received.

Change-Id: Iea53931771afd93ffaeabf704bbaffcf2460284f
CRs-Fixed: 2320538
2018-09-28 19:01:42 -07:00
Harprit Chhabada
bec6de418b qcacld-3.0: Add CFG/INI items to mlme component
Add following mlme CFG items to mlme component

1.CFG_RTS_THRESHOLD
2.CFG_FRAGMENTATION_THRESHOLD

Change-Id: I07b5dcffe8d3d03fa2cbecc7be563c407dc4d61e
CRs-Fixed: 2313600
2018-09-28 19:01:39 -07:00
Ashish Kumar Dhanotiya
cd311c87fc qcacld-3.0: Update correct PHY mode while processing ch_info_req
Currently PHY mode is not getting updated and it is being set as
0, which is resulting in an invalid channel setting to FW
for LOWI.

To address this issue update the PHY mode correctly.

Change-Id: I1f650268e2ba1814a435994d558b4b68030eb8c1
CRs-Fixed: 2318551
2018-09-28 19:01:35 -07:00
Varun Reddy Yeturu
1f10370d1b qcacld-3.0: Fix unsafe pointer dereference in TWT enable event handler
Fix MAC context NULL pointer dereference in
wma_twt_en_complete_event_handler().

Change-Id: I4b8454032bf44827b174d131145b849935a8a5c4
CRs-Fixed: 2323570
2018-09-28 19:01:31 -07:00
Varun Reddy Yeturu
951de5dc27 qcacld-3.0: Restrict the band in SET PCL command
Restrict the band of PCL to the connected band if
intra band roaming is enabled

Change-Id: I78e9a29d7f8eb226e899e944e4d2980629c52a01
CRs-Fixed: 2302607
2018-09-27 18:54:07 -07:00
Sandeep Puligilla
45e0c5e030 qcacld-3.0: Add VDEV state machine for STA
Add support for VDEV state machine support
for STA connection

Change-Id: Ifbf12d13e936b6535baee8f9bbf7062e56f84014
CRs-Fixed: 2321423
2018-09-27 15:00:33 -07:00
gaurank kathpalia
e5a17e4acb qcacld-3.0: Add MLME-CFG items for feature flags
Add these cfg mlme items for feature flags:-
1. ACCEPT_SHORT_SLOT_ASSOC_ONLY
2. HCF_ENABLED
3. RSN_ENABLED
4. 11G_SHORT_PREAMBLE_ENABLED
5. 11G_SHORT_SLOT_TIME_ENABLED
6. CHANNEL_BONDING_MODE
7. CFG_BLOCK_ACK_ENABLED

Change-Id: Id55299ece0169d40608df8508fbd768bb8aed741
CRs-Fixed: 2315584
2018-09-25 15:33:37 -07:00
Dundi Raviteja
3b63709be9 qcacld-3.0: Add ini params for three antenna BTC mode
Add below ini parameters for three antenna BTC mode and send
them to firmware using WMI command WMI_COEX_CONFIG_CMDID.
1. gSetBTCMode
2. gSetAntennaIsolation
3. gSetMaxTxPowerForBTC
4. gSetWlanLowRssiThreshold
5. gSetBtLowRssiThreshold
6. gSetBtInterferenceLowLL
7. gSetBtInterferenceLowUL
8. gSetBtInterferenceMediumLL
9. gSetBtInterferenceMediumUL
10. gSetBtInterferenceHighLL
11. gSetBtInterferenceHighUL

Change-Id: I69030b6e80ee99912e2f3baced883894d18db0b6
CRs-Fixed: 2298652
2018-09-24 18:55:03 -07:00
gaurank kathpalia
e5f6690a60 qcacld-3.0: Fix OOB read in scan_id get
In wma_extscan_find_unique_scan_ids() the TLV structures
for param_buf are pulled from the WMI message.
wma_extscan_find_unique_scan_ids parses the data (param_buf)
which is obtained from the firmware.
This parsing logic of rssi_list does not consider the
size of the list and thus results in an OOB access.

Fix is loop for the num_rssi_list and not the num of entries

Change-Id: Icf79b59a17b66ac858222b79589641787022572d
CRs-Fixed: 2316805
2018-09-24 15:37:49 -07:00
Karthik Kantamneni
24f71bcfbf qcacld-3.0: Add MLME CFG items of RTT and PMF
Add CFG items of RTT and PMF as generic items based
on converged cfg component.

Change-Id: Ic95d1e7b052259149704d9faf65ebe5f51536fdf
CRs-Fixed: 2313281
2018-09-24 15:37:23 -07:00
Abhishek Singh
a063f1c658 qcacld-3.0: Remove legacy vdev restart and hidden ssid restart flags
Remove legacy vdev restart and hidden ssid restart flags as vdev mlme
new vdev mlme priv flags.

Change-Id: I31a1541fe4504bfb635b3151ea3afd05ffce7cea
CRs-Fixed: 2319427
2018-09-21 07:09:14 -07:00
Abhishek Singh
c5a5408b00 qcacld-3.0: Add vdev state machine for start BSS and CSA failure
Adds vdev state machine for start bss and CSA failure.

Change-Id: I77979af192e40fe44dd9ea7ce41d7be52f40ad15
CRs-Fixed: 2316581
2018-09-21 07:09:09 -07:00
Abhishek Singh
6c681f4b63 qcacld-3.0: Add vdev state machine for hidden ssid restart
Adds vdev state machine for hidden ssid restart.

Change-Id: I41d8c8d71050c1e80597787db4623b1359cbb92d
CRs-Fixed: 2316576
2018-09-21 07:09:05 -07:00
Abhishek Singh
20a8e44ab2 qcacld-3.0: Add vdev state machine for CSA and radar
Add vdev state machine for Channel change and to handle
radar indication.

Change-Id: Ib5a5476510ffe55611325c98dd9779261c7bd9a3
CRs-Fixed: 2316574
2018-09-21 07:09:01 -07:00
Abhishek Singh
caa6185945 qcacld-3.0: Add vdev state machine for stop BSS
Adds vdev state machine for stop BSS request

Change-Id: I3324f6e7c5747d8a75817fc02620b6bca013326e
CRs-Fixed: 2316547
2018-09-21 05:28:39 -07:00
Abhishek Singh
3d30a3bb0c qcacld-3.0: Add vdev state machine for start BSS
Adds vdev state machine changes for start BSS req.

Change-Id: I9c8a5129db4ddc81f179256b077ab0cd038b5b27
CRs-Fixed: 2316552
2018-09-21 05:28:35 -07:00
Bala Venkatesh
2fde2c61db qcacld-3.0: SAP CFG Items part 2
Add support for the sap cfg items in new mlme component

Change-Id: I80f3f00a85720fe7bec11575fe67dd2f6b9d44b2
CRs-Fixed: 2316643
2018-09-20 10:30:08 -07:00
Sravan Kumar Kairam
0ebf453164 qcacld-3.0: Use psoc handle to check for wmi service cap
wma_mgmt_nbuf_unmap_cb uses wma handle to check if wmi service
capability for mgmt is supported. If wma handle is freed before
call back is invoked it returns with out doing unmap of nbuf.
Instead of wma handle use psoc object handle which has the
information about wmi service capability support.

Change-Id: Icbdeb155be0fb5d056dd876faa2bd73f78cd9db7
CRs-Fixed: 2317785
2018-09-19 23:15:04 -07:00
Sourav Mohapatra
49ce4cec0f qcacld-3.0: 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: 2303306
2018-09-18 12:48:47 -07:00
Arif Hussain
6b0ed167ad qcacld-3.0: Fix possible OOB in wma_unified_radio_tx_mem_free()
In wma_unified_radio_tx_mem_free() function, results buffer array may be
dereferenced with large index value, that may result OOB memory access.

Fix the same by correcting incrementing pointer to results buffer.

Change-Id: I57a26dba9db32758c7d7fd51b99d3364a8020a9d
CRs-Fixed: 2308644
2018-09-17 21:29:04 -07:00
Abhishek Singh
5ad797d0b3 qcacld-3.0: Remove legacy APIs to modify vdev state machine
This change Removes legacy APIs to modify vdev state machine and
add use new API to get vdev state.

Change-Id: I48aa3744dafc6d13a43a14e48de821c7dadf3a37
CRs-Fixed: 2314730
2018-09-17 06:09:35 -07:00
Wu Gao
93816217da qcacld-3.0: Apply mlme sta configuraions
Since refined mlme sta configures based on converged cfg component,
apply mlme sta configurations, remove related legacy codes.

Change-Id: Ia5989a29378bf33e3c9550a0ae26338aeb966592
CRs-Fixed: 2312079
2018-09-17 10:44:54 +08:00
Rajeev Kumar
9f2dd4729c qcacld-3.0: Increase FW response timeout values in debug build
In slub debug enabled build processing is slowed down and hence
increase the FW response timeout values by factor of 2 times.

Change-Id: I979269a9b4f6bc03f97452b3d7f7416fd418f336
CRs-Fixed: 2315934
2018-09-15 03:35:05 -07:00
Srinivas Girigowda
eff16d956b qcacld-3.0: Fix tab stop checkpatch warnings
Fix tab stop checkpatch warnings.

Change-Id: I4ccbc39b571737413de038fabcd4b8641a39cd62
CRs-Fixed: 2312593
2018-09-13 13:20:38 -07:00
Sravan Kumar Kairam
f3a2f6151d qcacld-3.0: Don't take dp peer ref count during remove peer
From control path while removing peer, dp peer handle is
acquired using mac address with ref count incremented which
is not needed. Ref count should be incremented only when
there is possibility of parallel execution of peer unmap
event. Fix this by getting peer handle with out taking the
ref count.

Change-Id: I76bf4eebc8e7ddadc388a957bea05813a4b24741
CRs-Fixed: 2314110
2018-09-13 04:52:12 -07:00
Rajeev Kumar Sirasanagandla
17fa308715 qcacld-3.0: Add support to store vdev object in WMA interface
Add support to store vdev object in WMA interface (wma_txrx_node)
and acquire and release its reference count during wma_vdev_attach()
and wma_vdev_detach() respectively.

Change-Id: I5449d4051b08dc328a5d97446a4de3d7b51155eb
CRs-Fixed: 2310990
2018-09-12 13:35:44 -07:00
Srinivas Girigowda
09625b0222 qcacld-3.0: Fix embedded function name checkpatch warnings
Logging macros already print function name by default,
there is no need to print the function name again as part of the log.

Hence, remove the function name or
wherever required use '"%s...", __func__'

Change-Id: Ib6dc6cc03ef148146b1c626271d5ac3b7345c4bb
CRs-Fixed: 2312593
2018-09-12 11:58:26 -07:00
Sravan Kumar Kairam
0fbaefea1b qcacld-3.0: Unmap nbuf of pending mgmt frames
As part of wlan_mgmt_txrx_pdev_close only nbuf is freed
in case of cleanup path due to SSR or drive unload and
dma unmap is not done. In this change register a callback
to mgmt_txrx component tx ops which does dma unmap of nbuf
as part of pdev close.

Change-Id: Ia0fa6684f66a3b732e5c599f2df4ea7f33ebc4f8
CRs-Fixed: 2308372
2018-09-12 08:50:05 -07:00
Manikandan Mohan
95453252fa qcacld-3.0: Check for following radio link stats events
When first WMI_RADIO_LINK_STATS_EVENTID is received radio stats buffer
is allocated based on num_radio param. There is an option for pending
following events. So update wma_unified_link_radio_stats_event_handler
to check if following events are valid wrt num_radio values to avoid
buffer overwrites.

Change-Id: If4675bada5492c3bae98c655b45cac6dc76b6431
CRs-fixed: 2309399
2018-09-12 00:13:59 -07:00
Pragaspathi Thilagaraj
0d1159e96d qcacld-3.0: Add vdev_active validation for wmi commands
When the host sends a wmi command with invalid vdev id, firmware
crashes. So to avoid this check the vdev_active flag for the
vdev before sending the wmi command.

This changeset validates the vdev_active check for the following
commands:
WMI_VDEV_CREATE_CMDID
WMI_VDEV_DELETE_CMDID
WMI_VDEV_START_REQUEST_CMDID
WMI_VDEV_RESTART_REQUEST_CMDID
WMI_VDEV_UP_CMDID
WMI_VDEV_STOP_CMDID
WMI_VDEV_DOWN_CMDID
WMI_VDEV_SET_PARAM_CMDID
WMI_VDEV_WMM_ADDTS_CMDID
WMI_VDEV_WMM_DELTS_CMDID

This change also removes the flag is_vdev_valid which seems to
duplicate the vdev_active flag.

Change-Id: If9d4a2b24f8141c26a73f3a012fa99d38b3221bc
CRs Fixed: 2312360
2018-09-11 18:27:15 -07:00
Pragaspathi Thilagaraj
61dd79cf79 qcacld-3.0: Call wma_vdev_update_pause_bitmap after vdev assigned to iface
During vdev_attach, wma_vdev_update_pause_bitmap() is called to
clear the pause bitmap to zero to ensure the queues are unpaused.
This function is called immediately after cdp_vdev_attach before
the vdev created is assigned to interfaces[vdev_id].handle.
This causes the function wma_vdev_update_pause_bitmap to exit
everytime with error.

Call wma_vdev_update_pause_bitmap after vdev assigned to iface.

Change-Id: I1fc3af66212fc62211d03245cfddb96806a37c87
CRs-Fixed: 2312344
2018-09-11 16:42:05 -07:00
Kiran Kumar Lokere
1f96b4af34 qcacld-3.0: Add support for 11ax draft3.0 spec
Add support for 11ax draft3.0 spec.

Change-Id: I272d9f4ec6b3a2a23ad708265dd0afaf289c1b95
CRs-Fixed: 2294255
2018-09-11 16:41:57 -07:00
gaurank kathpalia
00861f036c qcacld-3.0: Add src, and dst id support in WMA
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I73a0f11bd6ea4edb0d4c8871d9e217e16f756e58
CRs-Fixed: 2305991
2018-09-11 12:02:38 -07:00
gaurank kathpalia
9fb3f4b3cb qcacld-3.0: Add src, and dst id support in TX/RX
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: Ia79d1e8ceda97f956eadcef50524b8307fcc247b
CRs-Fixed: 2305993
2018-09-11 12:01:57 -07:00
Pragaspathi Thilagaraj
00bd8bc47f qcacld-3.0: Remove legacy ini for chainmask configs
Remove the legacy ini config values defined in hdd_cfg.
Call the mlme cfg get api to retrieve chainmask config values.
Remove the tx_chainmask_cck from cds_config as mlme object is
not initialized during cds_open. Call mlme cfg api during
wma_open to populate the tx_chainmask_cck value.

Change-Id: If48aeb62cf35e2e604be2b72845b8e98c5c313dc
CRs-Fixed: 2310382
2018-09-11 12:01:28 -07:00
Abhishek Singh
1df508847a qcacld-3.0: Refactor mlme code to integrate SAP start fail and restart
Divide and refactor mlme functions to integrate vdev state
machine for SAP restart and start fail.

Change-Id: I824df69e126d4647a156bc10570689f6b0822b06
CRs-Fixed: 2309284
2018-09-10 20:41:26 -07:00
Abhishek Singh
2904a6ac79 qcacld-3.0: Refactor mlme code to integrate SAP stop vdev SM
Divide and refactor mlme functions to integrate vdev state
machine for SAP stop.

Change-Id: Id9841b1a87f2f3c1c2816dae8b2a183ac04791a9
CRs-Fixed: 2309264
2018-09-10 20:41:22 -07:00
Abhishek Singh
dfa69c397a qcacld-3.0: Refactor mlme code to integrate SAP start vdev SM
Divide and refactor mlme functions to integrate vdev state
machine for SAP start.

Change-Id: Id4419261cb1ba88754eded9fd780cca60f1f5db7
CRs-Fixed: 2309240
2018-09-10 20:41:19 -07:00
Pragaspathi Thilagaraj
f81a8f0ad4 qcacld-3.0: Remove is_vdev_valid flag from the vdev structure wma_txrx_node
The flag is_vdev_valid and vdev_active serve the same purpose,
they are used to prevent the race condition where wmi vdev level
command gets posted to FW after vdev is deleted. Both the flags
are set to true in wma_vdev_attach when the vdev is created and
set to false in wma_vdev_detach where the vdev delete command is
sent to fw.

So remove is_vdev_valid flag and replace it with the existing
vdev_active flag.

Change-Id: I5199bc7d473470fd9f16320d323f86257a24ae19
CRs Fixed: 2312321
2018-09-10 11:54:11 -07:00
Will Huang
26a0a83c53 qcacld-3.0: Remove cds_is_target_ready() to prevent race condition
Currently if target is not ready, vdev stop req use check
cds_is_target_ready() in wma_fill_vdev_req(), while peer related API
uses wmi_handle->wmi_stopinprogress.

As wmi_handle->wmi_stopinprogress is set after target ready flag, the
vdev stop req is dropped while peer delete is sent to firmware. This
leads to bss peer delete sent without vdev stop.

Remove cds_is_target_ready() in wma_fill_hold_req() and
wma_fill_vdev_req() so that only wmi_handle->wmi_stopinprogress is used
to detect firmware down.

Change-Id: I5a7fb886f8bbf9a10d25c6991a291bc4bd2bef48
CRs-Fixed: 2309680
2018-09-07 09:25:23 -07:00
Rajeev Kumar Sirasanagandla
4f20b67e7a qcacld-3.0: Add debugfs support for roam scan stats
Add debugfs entry to get last five roam scan stats info which includes
old bssid, new bssid, roaming candidates etc., for STA interface.

Change-Id: Ied66beb270d97b6e17a6116c1be0e82783094519
CRs-Fixed: 2203885
2018-09-07 04:43:53 -07:00
Liangwei Dong
d108cf20d6 qcacld-3.0: Disallow roam cfg if Roam not started
The driver always allow roaming command ROAM_SCAN_OFFLOAD_UPDATE_CFG
even through session roaming not "started" in CSR.
But WMA will always enable Roam_scan_mode to non-zero
to FW when handle the command ROAM_SCAN_OFFLOAD_UPDATE_CFG.
The inconsistency is the CSR still keep as roaming stopped
status but WMA enable the roaming on session.

In STA+STA case, there will cause two vdev roam mode enabled in Firmware
because the CSR roaming start state does not keep sync with FW.

Fix by enable FW roam only based on enable state from CSR
when handle the ROAM_SCAN_OFFLOAD_UPDATE_CFG in WMA.

Change-Id: I95a2bd1edd88cc241ae9821a6e0756c44663229a
CRs-Fixed: 2305594
2018-09-06 22:22:36 -07:00
Jeff Johnson
0c8dbc37c4 qcacld-3.0: Refine the extscan reset significant change logic
Make the following updates to the extscan reset significant change
logic:
1) Exclusively use the Unified WMI data structures.
2) Update the HDD<=>SME interface to enforce the contract that SME
   must not make any assumptions about the buffers provided by HDD.

Change-Id: I9b63924f4219f6d3567e3ee2b1a31e1a9ce3bc29
CRs-Fixed: 2309570
2018-09-06 20:34:23 -07:00
Rachit Kankane
026e77a99d qcacld-3.0: Featurize P2P Listen Offload
P2P Listen offload is not a requirement for Genoa, hence featurize
P2P listen offload code to save memory foot-print for Genoa.

Change-Id: If50c784bb4cd6daac513a0654364e78cd636c9d3
CRs-Fixed: 2304554
2018-09-06 01:41:49 -07:00