qcacmn: Add API to find Multi-Link element

Add API to find the first Multi-Link element or the start of the first
Multi-Link element fragment sequence in a given buffer containing
elements, if a Multi-Link element or element fragment sequence exists
in the given buffer.

Change-Id: I3dbd0f9053e3a1e20b47c182b5258f49b1e2c409
CRs-Fixed: 3040400
此提交包含在:
Krishna Rao
2021-09-20 19:42:50 +05:30
提交者 Madan Koyyalamudi
父節點 9b26ed4fbf
當前提交 f0b40c96d7
共有 2 個檔案被更改,包括 146 行新增2 行删除

查看文件

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -42,6 +43,32 @@ QDF_STATUS
util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t len,
struct qdf_mac_addr link_addr, uint8_t *new_ie);
/**
* util_find_mlie - Find the first Multi-Link element or the start of the first
* Multi-Link element fragment sequence in a given buffer containing elements,
* if a Multi-Link element or element fragment sequence exists in the given
* buffer.
*
* @buf: Buffer to be searched for the Multi-Link element or the start of the
* Multi-Link element fragment sequence
* @buflen: Length of the buffer
* @mlieseq: Pointer to location where the starting address of the Multi-Link
* element or Multi-Link element fragment sequence should be updated if found
* in the given buffer. The value NULL will be updated to this location if the
* element or element fragment sequence is not found. This should be ignored by
* the caller if the function returns error.
* @mlieseqlen: Pointer to location where the total length of the Multi-Link
* element or Multi-Link element fragment sequence should be updated if found
* in the given buffer. This should be ignored by the caller if the function
* returns error, or if the function indicates that the element or element
* fragment sequence was not found by providing a starting address of NULL.
*
* Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
* the reason for error in the case of failure
*/
QDF_STATUS
util_find_mlie(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
qdf_size_t *mlieseqlen);
#else
static inline QDF_STATUS
util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t len,
@@ -49,5 +76,12 @@ util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t len,
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
#endif
static inline QDF_STATUS
util_find_mlie(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
qdf_size_t *mlieseqlen)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif /* WLAN_FEATURE_11BE_MLO */
#endif /* _WLAN_UTILS_MLO_H_ */