Files
android_kernel_samsung_sm86…/hal/wifi3.0/hal_rx_flow_info.h
Tallapragada Kalyan 328ea67a32 qcacmn: enable FSE with MLO support
from Beryllium onwards a single Flow Search Table
will be used across multiple radios. to ensure this
a single FST attach is called for the first SOC's
pdev and FST detach is called only during last pdev
of last SOC. the same FST instance is saved in all
pdevs of all the SOCs

CRs-Fixed: 3366409
Change-Id: I42fbdc6f09fb902021877e100a2831a1a24bc975
2023-01-04 18:30:46 -08:00

81 rinda
2.8 KiB
C

/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2023 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 copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __HAL_RX_FLOW_DEFINES_H
#define __HAL_RX_FLOW_DEFINES_H
#include "hal_flow.h"
#define HAL_FST_HASH_KEY_SIZE_BYTES 40
#define HAL_OFFSET(block, field) block ## _ ## field ## _OFFSET
#define HAL_RX_FST_ENTRY_SIZE (NUM_OF_DWORDS_RX_FLOW_SEARCH_ENTRY * 4)
/**
* struct hal_rx_flow - Rx Flow parameters to be sent to HW
* @tuple_info: Rx Flow 5-tuple (src & dest IP, src & dest ports, L4 protocol)
* @reo_destination_handler: REO destination for this flow
* @reo_destination_indication: REO indication for this flow
* @fse_metadata: Flow metadata or tag passed to HW for marking packets
* @use_ppe_ds: send the pkt to REO2PPE instead of REO2HOST
* @priority_vld: field used by DS
* @service_code: field used by DS
*/
struct hal_rx_flow {
struct hal_flow_tuple_info tuple_info;
uint8_t reo_destination_handler;
uint8_t reo_destination_indication;
uint32_t fse_metadata;
uint8_t use_ppe_ds;
uint8_t priority_vld;
uint16_t service_code;
};
/**
* struct hal_rx_fst - HAL RX Flow search table context
* @base_vaddr: Virtual Base address of HW FST
* @base_paddr: Physical Base address of HW FST
* @key: Pointer to 320-bit Key read from cfg
* @shifted_key: Pointer to left-shifted 320-bit Key used for Toeplitz Hash
* @max_entries : Max number of entries in flow searchh table
* @max_skid_length : Max search length if there is hash collision
* @hash_mask: Hash mask to apply to index into FST
* @key_cache: Toepliz Key Cache configured key
* @add_flow_count: Add flow count
* @del_flow_count: Delete flow count
* @fst_entry_size: size of each flow entry
*/
struct hal_rx_fst {
uint8_t *base_vaddr;
qdf_dma_addr_t base_paddr;
uint8_t *key;
#ifndef WLAN_SUPPORT_RX_FISA
uint8_t shifted_key[HAL_FST_HASH_KEY_SIZE_BYTES];
uint32_t key_cache[HAL_FST_HASH_KEY_SIZE_BYTES][1 << 8];
#endif
uint16_t max_entries;
uint16_t max_skid_length;
uint16_t hash_mask;
uint32_t add_flow_count;
uint32_t del_flow_count;
uint32_t fst_entry_size;
};
#endif /* HAL_RX_FLOW_DEFINES_H */