qcacmn: Fix peer authentication for wds client
Fix the peer authentication for wds client, in SDX_WKK wds client needs to get authenticate when packets receive from exception path as wds client is not directly associated, authentication is done by verifying from ast table Change-Id: I93051d67fc3d5be0af9242e6579f44883b3f757d CRs-Fixed: 3534370
This commit is contained in:

committed by
Rahul Choudhary

parent
82d71c7059
commit
5aac5cb621
@@ -760,6 +760,28 @@ dp_peer_send_wds_disconnect(struct dp_soc *soc, struct dp_peer *peer)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_peer_check_ast_offload() - check ast offload support is enable or not
|
||||||
|
* @soc: soc handle
|
||||||
|
*
|
||||||
|
* Return: false in case of IPA and true/false in IPQ case
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#if defined(IPA_OFFLOAD) && defined(QCA_WIFI_QCN9224)
|
||||||
|
static inline bool dp_peer_check_ast_offload(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline bool dp_peer_check_ast_offload(struct dp_soc *soc)
|
||||||
|
{
|
||||||
|
if (soc->ast_offload_support)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dp_peer_get_ast_info_by_soc_wifi3() - search the soc AST hash table
|
* dp_peer_get_ast_info_by_soc_wifi3() - search the soc AST hash table
|
||||||
* and return ast entry information
|
* and return ast entry information
|
||||||
@@ -781,7 +803,7 @@ static bool dp_peer_get_ast_info_by_soc_wifi3
|
|||||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||||
struct dp_peer *peer = NULL;
|
struct dp_peer *peer = NULL;
|
||||||
|
|
||||||
if (soc->ast_offload_support)
|
if (dp_peer_check_ast_offload(soc))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
qdf_spin_lock_bh(&soc->ast_lock);
|
qdf_spin_lock_bh(&soc->ast_lock);
|
||||||
|
@@ -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,
|
return wlan_ipa_check_peer_auth(dp_soc, peer_mac, iface);
|
||||||
peer_mac);
|
|
||||||
|
|
||||||
return is_authenticated;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user