diff --git a/components/son/dispatcher/inc/son_api.h b/components/son/dispatcher/inc/son_api.h index ce2b973580..4c37cca302 100644 --- a/components/son/dispatcher/inc/son_api.h +++ b/components/son/dispatcher/inc/son_api.h @@ -63,6 +63,20 @@ QDF_STATUS wlan_son_peer_set_kickout_allow(struct wlan_objmgr_vdev *vdev, bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev, uint8_t *macaddr); +/** + * wlan_son_ind_assoc_req_frm() - indicate assoc req frame to son + * @vdev: pointer to vdev + * @is_reassoc: true if it is reassoc req + * @frame: frame body + * @frame_len: frame body length + * @status: assoc req frame is handled successfully + * + * Return: Void + */ +void wlan_son_ind_assoc_req_frm(struct wlan_objmgr_vdev *vdev, + uint8_t *macaddr, bool is_reassoc, + uint8_t *frame, uint16_t frame_len, + QDF_STATUS status); #else static inline bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev, @@ -70,5 +84,13 @@ static inline bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev, { return true; } + +static inline +void wlan_son_ind_assoc_req_frm(struct wlan_objmgr_vdev *vdev, + uint8_t *macaddr, bool is_reassoc, + uint8_t *frame, uint16_t frame_len, + QDF_STATUS status) +{ +} #endif /*WLAN_FEATURE_SON*/ #endif diff --git a/components/son/dispatcher/src/son_api.c b/components/son/dispatcher/src/son_api.c index b82b365fd4..31909260d5 100644 --- a/components/son/dispatcher/src/son_api.c +++ b/components/son/dispatcher/src/son_api.c @@ -268,3 +268,47 @@ bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev, return kickout_allow; } + +void wlan_son_ind_assoc_req_frm(struct wlan_objmgr_vdev *vdev, + uint8_t *macaddr, bool is_reassoc, + uint8_t *frame, uint16_t frame_len, + QDF_STATUS status) +{ + struct wlan_objmgr_peer *peer; + struct wlan_lmac_if_rx_ops *rx_ops; + struct wlan_objmgr_psoc *psoc; + uint16_t assocstatus = IEEE80211_STATUS_UNSPECIFIED; + uint16_t sub_type = IEEE80211_FC0_SUBTYPE_ASSOC_REQ; + + if (!vdev) { + qdf_err("invalid vdev"); + return; + } + psoc = wlan_vdev_get_psoc(vdev); + if (!psoc) { + qdf_err("invalid psoc"); + return; + } + rx_ops = wlan_psoc_get_lmac_if_rxops(psoc); + if (!rx_ops || !rx_ops->son_rx_ops.process_mgmt_frame) { + qdf_err("invalid rx ops"); + return; + } + peer = wlan_objmgr_get_peer_by_mac(psoc, macaddr, + WLAN_SON_ID); + if (!peer) { + qdf_err("peer is null"); + return; + } + + if (is_reassoc) + sub_type = IEEE80211_FC0_SUBTYPE_REASSOC_REQ; + if (QDF_IS_STATUS_SUCCESS(status)) + assocstatus = IEEE80211_STATUS_SUCCESS; + qdf_debug("subtype %u frame_len %u assocstatus %u", + sub_type, frame_len, assocstatus); + rx_ops->son_rx_ops.process_mgmt_frame(vdev, peer, sub_type, + frame, frame_len, + &assocstatus); + wlan_objmgr_peer_release_ref(peer, WLAN_SON_ID); +} diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 6a1cd24180..b1fa35599b 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -44,6 +44,7 @@ #include "wlan_utility.h" #include "wlan_crypto_global_api.h" #include "lim_mlo.h" +#include /** * lim_convert_supported_channels - Parses channel support IE @@ -3209,6 +3210,12 @@ QDF_STATUS lim_send_mlm_assoc_ind(struct mac_context *mac_ctx, assoc_req->ssId.ssId, sub_type, sta_ds->assocId, QDF_MAC_ADDR_REF(sta_ds->staAddr)); + wlan_son_ind_assoc_req_frm(session_entry->vdev, sta_ds->staAddr, + assoc_req->reassocRequest, + qdf_nbuf_data(assoc_req->assoc_req_buf), + qdf_nbuf_len(assoc_req->assoc_req_buf), + QDF_STATUS_SUCCESS); + if (sub_type == LIM_ASSOC || sub_type == LIM_REASSOC) { temp = sizeof(tLimMlmAssocInd);