summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Kondabattini <ganeshk@codeaurora.org>2017-09-11 17:32:36 +0530
committersnandini <snandini@codeaurora.org>2017-09-13 01:15:35 -0700
commitda5b52023f31d115343b9b183afe7d6c06538bef (patch)
treea601a86a98b83b474ff1b43640f30043f650e86d
parent7d891896324304bfd1fb45bf4777a223eb4bfa5f (diff)
qcacld-3.0: Reset limit off channel parameters after disconnection
Reset the limit off channel parameters after disconnection, otherwise FW is going to use these settings for future connections on the same interface. CRs-Fixed: 2105301 Change-Id: I00a408c1d71cdf261e5718a67d9417ac3fcd133c
-rw-r--r--core/hdd/inc/wlan_hdd_main.h8
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c3
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c2
-rw-r--r--core/hdd/src/wlan_hdd_main.c43
4 files changed, 56 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 8504ecc6799a..83c88b939c1d 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -2723,6 +2723,14 @@ void hdd_dp_trace_init(struct hdd_config *config);
int hdd_set_limit_off_chan_for_tos(hdd_adapter_t *adapter, enum tos tos,
bool is_tos_active);
+/**
+ * hdd_reset_limit_off_chan() - reset limit off-channel command parameters
+ * @adapter - HDD adapter
+ *
+ * Return: 0 on success and non zero value on failure
+ */
+int hdd_reset_limit_off_chan(hdd_adapter_t *adapter);
+
#if defined(WLAN_FEATURE_FILS_SK)
/**
* hdd_update_hlp_info() - Update HLP packet received in FILS (re)assoc rsp
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index cf4175ce6e56..e827de33c06b 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1717,6 +1717,9 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
/* Unblock anyone waiting for disconnect to complete */
complete(&pAdapter->disconnect_comp_var);
+
+ hdd_reset_limit_off_chan(pAdapter);
+
hdd_print_bss_info(pHddStaCtx);
return status;
}
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index ccb7414d749d..327ee9a4978d 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -8471,6 +8471,8 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
/* Reset WNI_CFG_PROBE_RSP Flags */
wlan_hdd_reset_prob_rspies(pAdapter);
+ hdd_reset_limit_off_chan(pAdapter);
+
#ifdef WLAN_FEATURE_P2P_DEBUG
if ((pAdapter->device_mode == QDF_P2P_GO_MODE) &&
(global_p2p_connection_status == P2P_GO_COMPLETED_STATE)) {
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index cf1a62fb1a4e..00ca1baded55 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -12075,6 +12075,49 @@ int hdd_set_limit_off_chan_for_tos(hdd_adapter_t *adapter, enum tos tos,
return ret;
}
+/**
+ * hdd_reset_limit_off_chan() - reset limit off-channel command parameters
+ * @adapter - HDD adapter
+ *
+ * Return: 0 on success and non zero value on failure
+ */
+
+int hdd_reset_limit_off_chan(hdd_adapter_t *adapter)
+{
+ struct sir_limit_off_chan *cmd;
+ hdd_context_t *hdd_ctx;
+ int ret;
+
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ ret = wlan_hdd_validate_context(hdd_ctx);
+
+ if (ret < 0)
+ return ret;
+
+ cmd = qdf_mem_malloc(sizeof(struct sir_limit_off_chan));
+ if (!cmd) {
+ hdd_err("qdf_mem_malloc failed for limit off channel");
+ return -ENOMEM;
+ }
+
+ cds_set_cur_conc_system_pref(hdd_ctx->config->conc_system_pref);
+
+ /* clear the bitmap */
+ adapter->active_ac = 0;
+
+ hdd_debug("reset ac_bitmap for session %hu active_ac %0x",
+ adapter->sessionId, adapter->active_ac);
+
+ cmd->vdev_id = adapter->sessionId;
+ cmd->is_tos_active = false;
+
+ ret = hdd_send_limit_off_chan_cmd(cmd);
+ if (ret)
+ qdf_mem_free(cmd);
+
+ return ret;
+}
+
void hdd_pld_ipa_uc_shutdown_pipes(void)
{
hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);