Prechádzať zdrojové kódy

qcacld-3.0: Fix GTK offload req params

Currently the host sends the fixed gtk offload params
and the FILS TLV params, even when the FILS feature is disabled
in the host, which force firmware to pick the KEK from the
FILS TLV structure rather than from the fixed param structure,
which further leads to GTK re-keying feature fail.

Fix is to send only the fixed params in case when host doesnt
supports FILS.

Change-Id: I5b3b3fd503c7cb9c4d7933074fd483086b113204
CRs-Fixed: 2244725
gaurank kathpalia 6 rokov pred
rodič
commit
82a1b2b802

+ 3 - 1
components/pmo/dispatcher/inc/wlan_pmo_gtk_public_struct.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -45,6 +45,7 @@
  * @kek_len: KEK Length
  * @replay_counter: replay_counter
  * @bssid: bssid
+ * @is_fils_connection: is current connection with peer FILS or not.
  */
 struct pmo_gtk_req {
 	uint32_t flags;
@@ -53,6 +54,7 @@ struct pmo_gtk_req {
 	uint32_t kek_len;
 	uint64_t replay_counter;
 	struct qdf_mac_addr bssid;
+	bool is_fils_connection;
 };
 
 /**

+ 8 - 0
core/hdd/inc/wlan_hdd_assoc.h

@@ -217,6 +217,14 @@ struct hdd_context;
  */
 bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx);
 
+/*
+ * hdd_is_fils_connection: API to determine if connection is FILS
+ * @adapter: hdd adapter
+ *
+ * Return: true if fils connection else false
+ */
+bool hdd_is_fils_connection(struct hdd_adapter *adapter);
+
 /**
  * hdd_conn_is_connected() - Function to check connection status
  * @sta_ctx:    pointer to global HDD Station context

+ 2 - 8
core/hdd/src/wlan_hdd_assoc.c

@@ -5068,13 +5068,7 @@ hdd_translate_wpa_to_csr_encryption_type(uint8_t cipher_suite[4])
 }
 
 #ifdef WLAN_FEATURE_FILS_SK
-/*
- * hdd_is_fils_connection: API to determine if connection is FILS
- * @adapter: hdd adapter
- *
- * Return: true if fils connection else false
- */
-static inline bool hdd_is_fils_connection(struct hdd_adapter *adapter)
+bool hdd_is_fils_connection(struct hdd_adapter *adapter)
 {
 	struct csr_roam_profile *roam_profile;
 
@@ -5085,7 +5079,7 @@ static inline bool hdd_is_fils_connection(struct hdd_adapter *adapter)
 	return false;
 }
 #else
-static inline bool hdd_is_fils_connection(struct hdd_adapter *adapter)
+bool hdd_is_fils_connection(struct hdd_adapter *adapter)
 {
 	return false;
 }

+ 2 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -5984,6 +5984,7 @@ void wlan_hdd_save_gtk_offload_params(struct hdd_adapter *adapter,
 	qdf_copy_macaddr(&gtk_req->bssid, &hdd_sta_ctx->conn_info.bssId);
 
 	gtk_req->kek_len = kek_len;
+	gtk_req->is_fils_connection = hdd_is_fils_connection(adapter);
 
 	/* convert big to little endian since driver work on little endian */
 	buf = (uint8_t *)&gtk_req->replay_counter;
@@ -21385,6 +21386,7 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
 
 	wlan_hdd_copy_gtk_kek(gtk_req, data);
 	qdf_mem_copy(gtk_req->kck, data->kck, NL80211_KCK_LEN);
+	gtk_req->is_fils_connection = hdd_is_fils_connection(adapter);
 	status = pmo_ucfg_cache_gtk_offload_req(adapter->hdd_vdev, gtk_req);
 	if (status != QDF_STATUS_SUCCESS) {
 		hdd_err("Failed to cache GTK Offload");