qcacmn: Introduce API to modify MAC address in action frame

Introduce two APIs which will change the RA, DA and BSSID fields
of 802.11 MAC header.

For any non-public action frame, supplicant will send RA, DA and BSSID
with MLD address which needs to be translated to link addresses to
transmit over the air. wlan_mlo_update_action_frame_from_user() API
will do the address translation from MLD to link.

If any non-public action frame is received over the air that needs
to be sent to userspace, the kernel expects MLD address in RA, DA
and BSSID fields. wlan_mlo_update_action_frame_to_user() API will
do the address translation from link to MLD.

Change-Id: Iab93dd1301003b78edf6d619cfbf552afa53ae7a
CRs-Fixed: 3394706
This commit is contained in:
Vinod Kumar Pirla
2023-02-01 22:42:05 -08:00
کامیت شده توسط Madan Koyyalamudi
والد c595a4abdf
کامیت cad19e4fc7
2فایلهای تغییر یافته به همراه162 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -918,6 +918,42 @@ QDF_STATUS wlan_mlo_check_valid_config(struct wlan_mlo_dev_context *ml_dev,
*/
bool mlo_mgr_ml_peer_exist_on_diff_ml_ctx(uint8_t *peer_addr,
uint8_t *peer_vdev_id);
/**
* wlan_mlo_update_action_frame_from_user() - Change MAC address in WLAN frame
* received from userspace.
* @vdev: VDEV objmgr pointer.
* @frame: Pointer to start of WLAN MAC frame.
* @frame_len: Length of the frame.
*
* The API will translate MLD address in the SA, DA, BSSID for the action
* frames received from userspace with link address to send over the air.
* The API will not modify if the frame is a Public Action category frame and
* for VDEV other then STA mode.
*
* Return: void
*/
void wlan_mlo_update_action_frame_from_user(struct wlan_objmgr_vdev *vdev,
uint8_t *frame,
uint32_t frame_len);
/**
* wlan_mlo_update_action_frame_to_user() - Change MAC address in WLAN frame
* received over the air.
* @vdev: VDEV objmgr pointer.
* @frame: Pointer to start of WLAN MAC frame.
* @frame_len: Length of the frame.
*
* The API will translate link address in the SA, DA, BSSID for the action
* frames received over the air with MLD address to send to userspace.
* The API will not modify if the frame is a Public Action category frame and
* for VDEV other then STA mode.
*
* Return: void
*/
void wlan_mlo_update_action_frame_to_user(struct wlan_objmgr_vdev *vdev,
uint8_t *frame,
uint32_t frame_len);
#else
static inline QDF_STATUS wlan_mlo_mgr_init(void)
{
@@ -943,6 +979,20 @@ bool mlo_mgr_ml_peer_exist_on_diff_ml_ctx(uint8_t *peer_addr,
return false;
}
static inline
void wlan_mlo_update_action_frame_from_user(struct wlan_objmgr_vdev *vdev,
uint8_t *frame,
uint32_t frame_len)
{
}
static inline
void wlan_mlo_update_action_frame_to_user(struct wlan_objmgr_vdev *vdev,
uint8_t *frame,
uint32_t frame_len)
{
}
static inline
uint8_t wlan_mlo_get_sta_mld_ctx_count(void)
{