summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalli Subramanyam <nalli@qti.qualcomm.com>2014-01-22 15:57:52 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-31 17:28:09 -0800
commitb42e7cfda67f481b60f63bfc9586f506acbe77ce (patch)
treef18bf7337e010148f648575db86d80cd6b783a1a
parent1689055e543558c2259cf33d88809eaebf0d2174 (diff)
qcacld: wma: Send vdev restart only during channel switch
VDEV restart was sent to FW during normal connection as well as during on channel change. Due to this disconnection is happening if the new channel from csa is not a dfs channel. With this fix, following sequence is used VDEV start followed VDEV UP during normal connection and on channel change VDEV restart followed by VDEV UP on restart resp handler. CRs-Fixed: 581476 Depends-on: 588153 597667 598919 Change-Id: I5cccf23fdf7a32a1e0a72b6eb2d05af065c21163
-rw-r--r--CORE/SERVICES/WMA/wma.c35
-rw-r--r--CORE/SERVICES/WMA/wma.h1
2 files changed, 28 insertions, 8 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index b4870d77e410..940a636c8a4f 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -543,14 +543,21 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
params->chainMask = resp_event->chain_mask;
params->smpsMode = host_map_smps_mode(resp_event->smps_mode);
params->status = resp_event->status;
+ if (resp_event->resp_type == WMI_VDEV_RESTART_RESP_EVENT &&
+ (iface->type == WMI_VDEV_TYPE_STA)) {
+ wmi_unified_vdev_up_send(wma->wmi_handle,
+ resp_event->vdev_id,
+ iface->aid,
+ iface->bssid);
+ }
+ /*
+ * Marking the VDEV UP STATUS to FALSE
+ * since, VDEV RESTART will do a VDEV DOWN
+ * in the firmware.
+ */
+ else
+ iface->vdev_up = FALSE;
- /*
- * Marking the VDEV UP STATUS to FALSE
- * since, VDEV RESTART will do a VDEV DOWN
- * in the firmware.
- */
-
- iface->vdev_up = FALSE;
wma_send_msg(wma, WDA_SWITCH_CHANNEL_RSP, (void *)params, 0);
} else if (req_msg->msg_type == WDA_ADD_BSS_REQ) {
tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
@@ -1594,6 +1601,7 @@ static int wma_csa_offload_handler(void *handle, u_int8_t *event, u_int32_t len)
csa_offload_event->channel = csa_ie->newchannel;
csa_offload_event->switchmode = csa_ie->switchmode;
+ wma->interfaces[vdev_id].is_channel_switch = VOS_TRUE;
wma_send_msg(wma, WDA_CSA_OFFLOAD_EVENT, (void *)csa_offload_event, 0);
return 0;
}
@@ -5732,13 +5740,24 @@ static void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
req.beacon_intval = 100;
req.dtim_period = 1;
req.is_dfs = params->isDfsChannel;
- status = wma_vdev_start(wma, &req, VOS_TRUE);
+
+ /* In case of AP mode, once radar is detected, we need to
+ * issuse VDEV RESTART, so we making is_channel_switch as
+ * TRUE
+ */
+ if((wma->interfaces[req.vdev_id].type == WMI_VDEV_TYPE_AP ) &&
+ (wma->interfaces[req.vdev_id].sub_type == 0))
+ wma->interfaces[req.vdev_id].is_channel_switch = VOS_TRUE;
+
+ status = wma_vdev_start(wma, &req,
+ wma->interfaces[req.vdev_id].is_channel_switch);
if (status != VOS_STATUS_SUCCESS) {
wma_remove_vdev_req(wma, req.vdev_id, WMA_TARGET_REQ_TYPE_VDEV_START);
WMA_LOGP("vdev start failed status = %d\n", status);
goto send_resp;
}
+ wma->interfaces[req.vdev_id].is_channel_switch = VOS_FALSE;
return;
send_resp:
WMA_LOGD("%s: channel %d offset %d txpower %d status %d\n", __func__,
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 3c8a3e1b801c..53524d1c943f 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -428,6 +428,7 @@ struct wma_txrx_node {
tANI_U8 bss_status;
tANI_U8 rate_flags;
tANI_U8 nss;
+ v_BOOL_t is_channel_switch;
};
#if defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)