summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgrawal Ashish <ashishka@codeaurora.org>2016-02-22 14:25:11 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-21 17:02:09 -0700
commit7dd7c5991796c8dd494f2cff1e06ee48b9b54dd3 (patch)
tree82a7d04142ca2e97a43277901a978e520fb92173
parentaf54e2e6f0c687d637a4c033a3906078036b43a2 (diff)
qcacld-3.0: Correct handling for VDEV_UP
qcacld-2.0 to qcacld-3.0 propagation In SAP case there are two situation when driver needs to do vdev restart. 1)Hidden SSID: In case of Hidden ssid, vdev restart happens. In process of restart first vdev stop happens then vdev restart and finally VDEV_UP happens. 2)DFS detection on current channel: In this case due to DFS detection driver need to change the current channel. To change the channel vdev restart happens. There can be a race condition when restart is happening as part of Hidden ssid or switch channel, wma_send_beacon can do vdev up. Fix this by not calling wmi_unified_vdev_up_send if restart is in progress. Change-Id: I16c86105748b34b76ed575fc2e69a54cc7bab1c6 CRs-Fixed: 958230
-rw-r--r--core/wma/src/wma_dev_if.c15
-rw-r--r--core/wma/src/wma_mgmt.c30
-rw-r--r--core/wma/src/wma_scan_roam.c3
3 files changed, 29 insertions, 19 deletions
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 3d7be2431319..2e1805dab2ee 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -930,11 +930,14 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
}
params->smpsMode = host_map_smps_mode(resp_event->smps_mode);
params->status = resp_event->status;
+ if (wma->interfaces[resp_event->vdev_id].is_channel_switch) {
+ wma->interfaces[resp_event->vdev_id].is_channel_switch =
+ false;
+ }
if (((resp_event->resp_type == WMI_VDEV_RESTART_RESP_EVENT) &&
- (iface->type == WMI_VDEV_TYPE_STA)) ||
- ((resp_event->resp_type == WMI_VDEV_START_RESP_EVENT) &&
- (iface->type == WMI_VDEV_TYPE_MONITOR))) {
-
+ (iface->type == WMI_VDEV_TYPE_STA)) ||
+ ((resp_event->resp_type == WMI_VDEV_START_RESP_EVENT) &&
+ (iface->type == WMI_VDEV_TYPE_MONITOR))) {
param.vdev_id = resp_event->vdev_id;
param.assoc_id = iface->aid;
status = wmi_unified_vdev_up_send(wma->wmi_handle,
@@ -2392,6 +2395,10 @@ void wma_vdev_resp_timer(void *data)
params->status = QDF_STATUS_E_TIMEOUT;
WMA_LOGA("%s: WMA_SWITCH_CHANNEL_REQ timedout", __func__);
wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0);
+ if (wma->interfaces[tgt_req->vdev_id].is_channel_switch) {
+ wma->interfaces[tgt_req->vdev_id].is_channel_switch =
+ false;
+ }
} else if (tgt_req->msg_type == WMA_DELETE_BSS_REQ) {
tpDeleteBssParams params =
(tpDeleteBssParams) tgt_req->user_data;
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 42e9c526ccf8..1e8b8bf982cb 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -2392,19 +2392,25 @@ void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
WMA_LOGE("%s : wma_store_bcn_tmpl Failed", __func__);
return;
}
- if (!wma->interfaces[vdev_id].vdev_up) {
- param.vdev_id = vdev_id;
- param.assoc_id = 0;
- status = wmi_unified_vdev_up_send(wma->wmi_handle,
- bcn_info->bssId,
- &param);
- if (QDF_IS_STATUS_ERROR(status)) {
- WMA_LOGE("%s : failed to send vdev up", __func__);
- cds_set_do_hw_mode_change_flag(false);
- return;
+ if (!((qdf_atomic_read(
+ &wma->interfaces[vdev_id].vdev_restart_params.
+ hidden_ssid_restart_in_progress)) ||
+ (wma->interfaces[vdev_id].is_channel_switch))) {
+ if (!wma->interfaces[vdev_id].vdev_up) {
+ param.vdev_id = vdev_id;
+ param.assoc_id = 0;
+ status = wmi_unified_vdev_up_send(wma->wmi_handle,
+ bcn_info->bssId,
+ &param);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ WMA_LOGE(FL("failed to send vdev up"));
+ cds_set_do_hw_mode_change_flag(false);
+ return;
+ }
+ wma->interfaces[vdev_id].vdev_up = true;
+ wma_set_sap_keepalive(wma, vdev_id);
+
}
- wma->interfaces[vdev_id].vdev_up = true;
- wma_set_sap_keepalive(wma, vdev_id);
}
}
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 44ca7bc5a099..b68eb5fa9f46 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -2864,9 +2864,6 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
goto send_resp;
}
- if (wma->interfaces[req.vdev_id].is_channel_switch)
- wma->interfaces[req.vdev_id].is_channel_switch = false;
-
if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())
ol_htt_mon_note_chan(pdev, req.chan);
}