|
@@ -1398,6 +1398,47 @@ wlan_ipa_get_sap_client_auth(struct wlan_ipa_priv *ipa_ctx, uint8_t *peer_mac)
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * wlan_ipa_check_peer_auth() - Check whether peer is authenticated or not
|
|
|
|
+ * @dp_soc: soc handle
|
|
|
|
+ * @peer_mac: peer mac address
|
|
|
|
+ * @iface: wlan ipa iface context
|
|
|
|
+ *
|
|
|
|
+ * Return: true if peer is authenticated
|
|
|
|
+ */
|
|
|
|
+#ifdef QCA_WIFI_QCN9224
|
|
|
|
+static inline bool
|
|
|
|
+wlan_ipa_check_peer_auth(ol_txrx_soc_handle dp_soc,
|
|
|
|
+ uint8_t *peer_mac,
|
|
|
|
+ struct wlan_ipa_iface_context *iface)
|
|
|
|
+{
|
|
|
|
+ uint8_t is_authenticated = false;
|
|
|
|
+ struct cdp_ast_entry_info ast_info = {0};
|
|
|
|
+
|
|
|
|
+ cdp_peer_get_ast_info_by_soc(dp_soc, peer_mac,
|
|
|
|
+ &ast_info);
|
|
|
|
+ peer_mac = &ast_info.peer_mac_addr[0];
|
|
|
|
+ is_authenticated = wlan_ipa_get_peer_state(dp_soc,
|
|
|
|
+ iface->session_id,
|
|
|
|
+ peer_mac);
|
|
|
|
+
|
|
|
|
+ return is_authenticated;
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static inline bool
|
|
|
|
+wlan_ipa_check_peer_auth(ol_txrx_soc_handle dp_soc,
|
|
|
|
+ uint8_t *peer_mac,
|
|
|
|
+ struct wlan_ipa_iface_context *iface)
|
|
|
|
+{
|
|
|
|
+ uint8_t is_authenticated = false;
|
|
|
|
+
|
|
|
|
+ is_authenticated = wlan_ipa_get_peer_state(dp_soc, iface->session_id,
|
|
|
|
+ peer_mac);
|
|
|
|
+
|
|
|
|
+ return is_authenticated;
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
#ifdef IPA_WDS_EASYMESH_FEATURE
|
|
#ifdef IPA_WDS_EASYMESH_FEATURE
|
|
static inline uint8_t
|
|
static inline uint8_t
|
|
wlan_ipa_get_peer_auth_state(ol_txrx_soc_handle dp_soc, uint8_t *peer_mac,
|
|
wlan_ipa_get_peer_auth_state(ol_txrx_soc_handle dp_soc, uint8_t *peer_mac,
|
|
@@ -1426,12 +1467,8 @@ static inline uint8_t
|
|
wlan_ipa_get_peer_auth_state(ol_txrx_soc_handle dp_soc, uint8_t *peer_mac,
|
|
wlan_ipa_get_peer_auth_state(ol_txrx_soc_handle dp_soc, uint8_t *peer_mac,
|
|
struct wlan_ipa_iface_context *iface)
|
|
struct wlan_ipa_iface_context *iface)
|
|
{
|
|
{
|
|
- uint8_t is_authenticated = false;
|
|
|
|
|
|
|
|
- is_authenticated = wlan_ipa_get_peer_state(dp_soc, iface->session_id,
|
|
|
|
- peer_mac);
|
|
|
|
-
|
|
|
|
- return is_authenticated;
|
|
|
|
|
|
+ return wlan_ipa_check_peer_auth(dp_soc, peer_mac, iface);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|