qcacmn: Get pointers to per-STA profile CSA, eCSA, MCST IE

Parse the per-STA profile IE and save the CSA, eCSA, Max Channel Switch
Time IE pointers in partner_link_info structure.

Change-Id: Icac75e3ad1f45bd5325c9144db7732684ebb4512
CRs-Fixed: 3087692
这个提交包含在:
Shashikala Prabhu
2021-12-14 23:02:27 +05:30
提交者 Madan Koyyalamudi
父节点 ed4b7bf28b
当前提交 0a725937cd
修改 2 个文件,包含 34 行新增1 行删除

查看文件

@@ -519,12 +519,18 @@ struct reduced_neighbor_report {
* @freq: center frequency in MHz
* @cfreq2: center frequency of the secondary channel in MHz
* @link_id: Link id advertised by the AP
* @csa_ie: Pointer to CSA IE
* @ecsa_ie: Pointer to eCSA IE
* @max_cst_ie: Pointer to Max Channel Switch Time IE
*/
struct partner_link_info {
struct qdf_mac_addr link_addr;
uint16_t freq;
uint16_t cfreq2;
uint8_t link_id;
const uint8_t *csa_ie;
const uint8_t *ecsa_ie;
const uint8_t *max_cst_ie;
};
/**

查看文件

@@ -30,6 +30,9 @@
#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
#include <wlan_mlme_api.h>
#endif
#ifdef WLAN_FEATURE_11BE_MLO
#include <wlan_utility.h>
#endif
#define MAX_IE_LEN 1024
#define SHORT_SSID_LEN 4
@@ -1801,6 +1804,10 @@ static void util_get_partner_link_info(struct scan_cache_entry *scan_entry)
uint8_t *ml_ie = scan_entry->ie_list.multi_link;
uint8_t offset = util_get_link_info_offset(ml_ie);
uint16_t sta_ctrl;
uint8_t *stactrl_offset = NULL;
uint8_t perstaprof_len = 0;
struct partner_link_info *link_info = NULL;
uint8_t eid = 0;
/* Update partner info from RNR IE */
qdf_mem_copy(&scan_entry->ml_info.link_info[0].link_addr,
@@ -1816,8 +1823,12 @@ static void util_get_partner_link_info(struct scan_cache_entry *scan_entry)
/* Sub element ID 0 represents Per-STA Profile */
if (ml_ie[offset] == 0) {
perstaprof_len = ml_ie[offset + 1];
stactrl_offset = &ml_ie[offset + 2];
/* Skip sub element ID and length fields */
offset += 2;
sta_ctrl = *(uint16_t *)(ml_ie + offset);
/* Skip STA control field */
offset += 2;
@@ -1828,8 +1839,24 @@ static void util_get_partner_link_info(struct scan_cache_entry *scan_entry)
&scan_entry->ml_info.link_info[0].link_addr,
ml_ie + offset, 6);
scm_debug("Found partner info in ML IE");
return;
}
/* Get the pointers to CSA, ECSA, Max Channel Switch Time IE. */
link_info = &scan_entry->ml_info.link_info[0];
link_info->csa_ie = wlan_get_ie_ptr_from_eid
(WLAN_ELEMID_CHANSWITCHANN, stactrl_offset,
perstaprof_len);
link_info->ecsa_ie = wlan_get_ie_ptr_from_eid
(WLAN_ELEMID_EXTCHANSWITCHANN, stactrl_offset,
perstaprof_len);
eid = WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME;
link_info->max_cst_ie = wlan_get_ext_ie_ptr_from_ext_id
(&eid, 1, stactrl_offset, perstaprof_len);
scan_entry->ml_info.num_links++;
}
}