summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Dasari <dasaris@codeaurora.org>2019-10-10 18:37:24 +0530
committernshrivas <nshrivas@codeaurora.org>2019-10-30 06:24:20 -0700
commit8713fbfa04bbf8239a77755d13f6d3481cb4847f (patch)
treeff31a316452d4dd2e23ade4e398cb4baf5084dfc
parentdd0221e946e03e493c76ce7edf3ae99d0db508b6 (diff)
qcacld-3.0: Clear PTK and GTK install flags in disconnect handler
PTK and GTK are installed to firmware and installation status of each key is maintained in driver. Data transmission is allowed only if both the keys are installed. Currently these flags are getting cleared after installing both ptk and gtk to firmware. But if one key is installed and the other key is not installed due to some reason(e.g. connection abort), corresponding status is not cleared and being referred in the next connection attempt. This is causing the data transmission to happen from driver to firmware after installing GTK before installing PTK, as the ptk_installed from previous connection is still set. This is not allowed by firmware and issues an assertion. PTK and GTK are invalid once the station disconnects. So reset the flags as part of connection info cleanup. Reset the flags before issuing connection also to avoid usage of previous connect status or garbage values. Change-Id: I8fa7bd0a15eab2fed80f050e77df3554d0f1b73a CRs-Fixed: 2542785
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c7
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 4275482f7f14..e04e9a0ed1ff 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1579,6 +1579,13 @@ static void hdd_conn_remove_connect_info(hdd_station_ctx_t *pHddStaCtx)
pHddStaCtx->conn_info.proxyARPService = 0;
qdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo));
+
+ /*
+ * Reset the ptk, gtk status flags to avoid using current connection
+ * status in further connections.
+ */
+ pHddStaCtx->conn_info.gtk_installed = false;
+ pHddStaCtx->conn_info.ptk_installed = false;
}
/**
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 5f92b6c09d0f..9d53066ec6c9 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -16958,6 +16958,13 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
qdf_mem_zero(&hdd_sta_ctx->conn_info.conn_flag,
sizeof(hdd_sta_ctx->conn_info.conn_flag));
+ /*
+ * Reset the ptk, gtk status flags to avoid using old/previous
+ * connection status.
+ */
+ hdd_sta_ctx->conn_info.gtk_installed = false;
+ hdd_sta_ctx->conn_info.ptk_installed = false;
+
if (pRoamProfile) {
hdd_station_ctx_t *pHddStaCtx;