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
This commit is contained in:
Agrawal Ashish 2016-02-22 14:25:11 +05:30 • committed by Gerrit - the friendly Code Review server
commit 7dd7c59917
3 changed files with 29 additions and 19 deletions

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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);
}