qcacmn: Add support to parse and aggregate split TLVs

For KIWI, when operating monitor mode in 802.11BE,
there can be certain header fields which can be received
as split across multiple TLVs.

Add support to aggregate such split TLVs and decode them
after agregation.

Change-Id: Ia00323a8f9fbe39306b1bbab4afefaa937befdae
CRs-Fixed: 3092820
This commit is contained in:
Rakesh Pillai
2021-12-10 02:05:16 -08:00
committed by Madan Koyyalamudi
parent 1c6617edf5
commit dad3ff5afa
3 changed files with 136 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 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
@@ -691,6 +691,23 @@ struct hal_rx_frm_type_info {
struct hal_rx_frm_type_info {};
#endif
#define HAL_RX_MON_MAX_AGGR_SIZE 128
/**
* struct hal_rx_tlv_aggr_info - Data structure to hold
* metadata for aggregatng repeated TLVs
* @in_progress: Flag to indicate if TLV aggregation is in progress
* @cur_len: Total length of currently aggregated TLV
* @tlv_tag: TLV tag which is currently being aggregated
* @buf: Buffer containing aggregated TLV data
*/
struct hal_rx_tlv_aggr_info {
uint8_t in_progress;
uint16_t cur_len;
uint32_t tlv_tag;
uint8_t buf[HAL_RX_MON_MAX_AGGR_SIZE];
};
struct hal_rx_ppdu_info {
struct hal_rx_ppdu_common_info com_info;
struct mon_rx_status rx_status;
@@ -730,6 +747,8 @@ struct hal_rx_ppdu_info {
struct hal_rx_ppdu_cfr_info cfr_info;
/* per frame type counts */
struct hal_rx_frm_type_info frm_type_info;
/* TLV aggregation metadata context */
struct hal_rx_tlv_aggr_info tlv_aggr;
};
static inline uint32_t