Merge "qcacld-3.0: Igonre HT BW change if channel switch is in progress" into wlan-cld3.driver.lnx.2.0-dev
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index ee757fe..df499f2 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -516,6 +516,7 @@
#endif
bool enable_bcast_probe_rsp;
uint8_t ht_client_cnt;
+ bool ch_switch_in_progress;
} tPESession, *tpPESession;
/*-------------------------------------------------------------------------
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 209e209..602f74b 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -3097,6 +3097,7 @@
pe_err("session does not exist for given sessionId");
return;
}
+ psessionEntry->ch_switch_in_progress = false;
/* HAL fills in the tx power used for mgmt frames in this field. */
/* Store this value to use in TPC report IE. */
rrm_cache_mgmt_tx_power(pMac, pChnlParams->txMgmtPower, psessionEntry);
diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c
index 1d5d8b6..ae4ae44 100644
--- a/core/mac/src/pe/lim/lim_send_messages.c
+++ b/core/mac/src/pe/lim/lim_send_messages.c
@@ -288,6 +288,7 @@
pe_err("Posting CH_SWITCH_REQ to WMA failed");
return eSIR_FAILURE;
}
+ pSessionEntry->ch_switch_in_progress = true;
return eSIR_SUCCESS;
}
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index e94c931..ee900a2 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -4333,6 +4333,11 @@
return;
}
+ if (psessionEntry->ch_switch_in_progress == true) {
+ pe_debug("ch switch is in progress, ignore HT IE BW update");
+ return;
+ }
+
if (!pHTInfo->primaryChannel) {
pe_debug("Ignore as primary channel is 0 in HT info");
return;
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index f0c79e7..3fdcaa8 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -1084,6 +1084,8 @@
uint32_t he_ops;
#endif
bool in_bmps;
+ struct beacon_filter_param beacon_filter;
+ bool beacon_filter_enabled;
};
#if defined(QCA_WIFI_FTM)
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index a420a22..a9766a9 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -1099,6 +1099,9 @@
} else {
wma_vdev_set_mlme_state(wma,
resp_event->vdev_id, WLAN_VDEV_S_RUN);
+ if (iface->beacon_filter_enabled)
+ wma_add_beacon_filter(wma,
+ &iface->beacon_filter);
}
}
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index bebac44..3dbe7b4 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -842,7 +842,9 @@
u_int8_t *buf;
A_UINT32 *ie_map;
int ret;
+ struct wma_txrx_node *iface;
tp_wma_handle wma = (tp_wma_handle) handle;
+
wmi_add_bcn_filter_cmd_fixed_param *cmd;
int len = sizeof(wmi_add_bcn_filter_cmd_fixed_param);
@@ -855,6 +857,11 @@
return QDF_STATUS_E_INVAL;
}
+ iface = &wma->interfaces[filter_params->vdev_id];
+ qdf_mem_copy(&iface->beacon_filter, filter_params,
+ sizeof(struct beacon_filter_param));
+ iface->beacon_filter_enabled = true;
+
wmi_buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!wmi_buf) {
WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 8f54da2..93104bd 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -3026,6 +3026,11 @@
(params->restart_on_chan_switch == true))
wma->interfaces[req.vdev_id].is_channel_switch = true;
+ if (params->restart_on_chan_switch == true &&
+ wma->interfaces[req.vdev_id].beacon_filter_enabled)
+ wma_remove_beacon_filter(wma,
+ &wma->interfaces[req.vdev_id].beacon_filter);
+
if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam() &&
wma_is_vdev_up(vdev_id)) {
status = wma_switch_channel(wma, &req);