2020-03-06 12:28:25 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
2024-04-19 23:17:57 +08:00
|
|
|
* Copyright (C) 2019-2024 Linaro Ltd.
|
2020-03-06 12:28:25 +08:00
|
|
|
*/
|
|
|
|
#ifndef _IPA_TABLE_H_
|
|
|
|
#define _IPA_TABLE_H_
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
struct ipa;
|
|
|
|
|
|
|
|
/**
|
2022-11-03 06:11:37 +08:00
|
|
|
* ipa_filtered_valid() - Validate a filter table endpoint bitmap
|
2020-03-06 12:28:25 +08:00
|
|
|
* @ipa: IPA pointer
|
2022-11-03 06:11:37 +08:00
|
|
|
* @filtered: Filter table endpoint bitmap to check
|
2020-03-06 12:28:25 +08:00
|
|
|
*
|
2020-07-13 20:24:18 +08:00
|
|
|
* Return: true if all regions are valid, false otherwise
|
2020-03-06 12:28:25 +08:00
|
|
|
*/
|
2022-11-03 06:11:37 +08:00
|
|
|
bool ipa_filtered_valid(struct ipa *ipa, u64 filtered);
|
2020-03-06 12:28:25 +08:00
|
|
|
|
2021-02-12 22:34:01 +08:00
|
|
|
/**
|
|
|
|
* ipa_table_hash_support() - Return true if hashed tables are supported
|
|
|
|
* @ipa: IPA pointer
|
|
|
|
*/
|
2024-04-19 23:17:57 +08:00
|
|
|
bool ipa_table_hash_support(struct ipa *ipa);
|
2021-02-12 22:34:01 +08:00
|
|
|
|
2020-03-06 12:28:25 +08:00
|
|
|
/**
|
|
|
|
* ipa_table_reset() - Reset filter and route tables entries to "none"
|
|
|
|
* @ipa: IPA pointer
|
|
|
|
* @modem: Whether to reset modem or AP entries
|
|
|
|
*/
|
|
|
|
void ipa_table_reset(struct ipa *ipa, bool modem);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ipa_table_hash_flush() - Synchronize hashed filter and route updates
|
|
|
|
* @ipa: IPA pointer
|
|
|
|
*/
|
|
|
|
int ipa_table_hash_flush(struct ipa *ipa);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ipa_table_setup() - Set up filter and route tables
|
|
|
|
* @ipa: IPA pointer
|
2021-04-10 02:07:20 +08:00
|
|
|
*
|
|
|
|
* There is no need for a matching ipa_table_teardown() function.
|
2020-03-06 12:28:25 +08:00
|
|
|
*/
|
|
|
|
int ipa_table_setup(struct ipa *ipa);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ipa_table_config() - Configure filter and route tables
|
|
|
|
* @ipa: IPA pointer
|
2021-04-10 02:07:20 +08:00
|
|
|
*
|
|
|
|
* There is no need for a matching ipa_table_deconfig() function.
|
2020-03-06 12:28:25 +08:00
|
|
|
*/
|
|
|
|
void ipa_table_config(struct ipa *ipa);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ipa_table_init() - Do early initialization of filter and route tables
|
|
|
|
* @ipa: IPA pointer
|
|
|
|
*/
|
|
|
|
int ipa_table_init(struct ipa *ipa);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ipa_table_exit() - Inverse of ipa_table_init()
|
|
|
|
* @ipa: IPA pointer
|
|
|
|
*/
|
|
|
|
void ipa_table_exit(struct ipa *ipa);
|
|
|
|
|
2022-10-22 03:13:40 +08:00
|
|
|
/**
|
|
|
|
* ipa_table_mem_valid() - Validate sizes of table memory regions
|
|
|
|
* @ipa: IPA pointer
|
2022-10-26 03:51:42 +08:00
|
|
|
* @filter: Whether to check filter or routing tables
|
2022-10-22 03:13:40 +08:00
|
|
|
*/
|
2022-10-26 03:51:42 +08:00
|
|
|
bool ipa_table_mem_valid(struct ipa *ipa, bool filter);
|
2022-10-22 03:13:40 +08:00
|
|
|
|
2020-03-06 12:28:25 +08:00
|
|
|
#endif /* _IPA_TABLE_H_ */
|