diff mbox series

[17/40] WPA: Add a function to get PMKSA cache entry

Message ID 20191215093438.10120-18-ilan.peer@intel.com
State Changes Requested
Headers show
Series Support for Pre association Security Negotiation (PASN) | expand

Commit Message

Ilan Peer Dec. 15, 2019, 9:34 a.m. UTC
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/rsn_supp/wpa.c | 10 ++++++++++
 src/rsn_supp/wpa.h | 14 ++++++++++++++
 2 files changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 9d8fcda0a4..f63c9f4787 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -3473,6 +3473,16 @@  int wpa_sm_pmksa_exists(struct wpa_sm *sm, const u8 *bssid,
 }
 
 
+struct rsn_pmksa_cache_entry *wpa_sm_pmksa_cache_get(struct wpa_sm *sm,
+						     const u8 *aa,
+						     const u8 *pmkid,
+						     const void *network_ctx,
+						     int akmp)
+{
+	return pmksa_cache_get(sm->pmksa, aa, pmkid, network_ctx, akmp);
+}
+
+
 void wpa_sm_drop_sa(struct wpa_sm *sm)
 {
 	wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Clear old PMK and PTK");
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index 9c9e3825a1..162cdefbf0 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -172,6 +172,11 @@  void wpa_sm_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
 int wpa_sm_pmksa_exists(struct wpa_sm *sm, const u8 *bssid,
 			const void *network_ctx);
 void wpa_sm_drop_sa(struct wpa_sm *sm);
+struct rsn_pmksa_cache_entry *wpa_sm_pmksa_cache_get(struct wpa_sm *sm,
+						     const u8 *aa,
+						     const u8 *pmkid,
+						     const void *network_ctx,
+						     int akmp);
 int wpa_sm_has_ptk(struct wpa_sm *sm);
 
 void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr);
@@ -337,6 +342,15 @@  static inline void wpa_sm_drop_sa(struct wpa_sm *sm)
 {
 }
 
+struct rsn_pmksa_cache_entry *wpa_sm_pmksa_cache_get(struct wpa_sm *sm,
+						     const u8 *aa,
+						     const u8 *pmkid,
+						     const void *network_ctx,
+						     int akmp)
+{
+	return NULL;
+}
+
 static inline int wpa_sm_has_ptk(struct wpa_sm *sm)
 {
 	return 0;