summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPragaspathi Thilagaraj <tpragasp@codeaurora.org>2018-06-04 16:25:33 +0530
committernshrivas <nshrivas@codeaurora.org>2018-06-12 02:02:53 -0700
commitce1b3e9e38b1fc6fa68049658c5b4ddf060ce75d (patch)
treecccc8df0931aeda9a83d450d1a6e7b4e7980701f
parent12728a3d9778641359d0936738de8efb0135aac3 (diff)
qcacld-3.0: Populate correct dot11_mode during CSA
When CSA is recieved from the firmware, dot11_mode is copied from received message . In response to the CSA message, the host invokes wma_vdev_start with isRestart flag set to restart the vdev with the new updated channel, and channel params. The dot11_mode value is copied from the CSA which will not be a problem unless the switching channel is on the same band or on different band as long as its HT/VHT 2.4GHZ to HT/VHT 5GHZ bands or vice-versa. When the channel switch occurs from a 11a to 11g band or vice-versa, wrong dot11_mode is populated without being updated for the new band. As the phy_mode is calculated from the dot11_mode value, phy_mode check fails in wma_vdev_start in this case. So the host doesnt send vdev_restart. Populate the dot11_mode correctly and pass it to lower layers upon updation. This will ensure correct phy_mode is calculated and vdev_restart is sent. Change-Id: Iaf8788d51b47190c04744b8981dd594236fbae57 CRs-Fixed: 2248980
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 5e19ae7b7987..8a0257fb405a 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -2205,6 +2205,12 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
return;
}
+ csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
+ if (NULL == csa_offload_ind) {
+ pe_err("memalloc fail eWNI_SME_CSA_OFFLOAD_EVENT");
+ goto err;
+ }
+
session_entry =
pe_find_session_by_bssid(mac_ctx,
csa_params->bssId, &session_id);
@@ -2403,12 +2409,15 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
goto err;
}
+ if (CDS_IS_CHANNEL_24GHZ(csa_params->channel) &&
+ (session_entry->dot11mode == WNI_CFG_DOT11_MODE_11A))
+ session_entry->dot11mode = WNI_CFG_DOT11_MODE_11G;
+ else if (CDS_IS_CHANNEL_5GHZ(csa_params->channel) &&
+ ((session_entry->dot11mode == WNI_CFG_DOT11_MODE_11G) ||
+ (session_entry->dot11mode == WNI_CFG_DOT11_MODE_11G_ONLY)))
+ session_entry->dot11mode = WNI_CFG_DOT11_MODE_11A;
+
lim_prepare_for11h_channel_switch(mac_ctx, session_entry);
- csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
- if (NULL == csa_offload_ind) {
- pe_err("memalloc fail eWNI_SME_CSA_OFFLOAD_EVENT");
- goto err;
- }
csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT;
csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd);