| 1 |
|
| 2 |
|
| 3 | |
| 4 | * Copyright (C) 2019-2024 Linaro Ltd.
|
| 5 |
|
| 6 | #ifndef _IPA_TABLE_H_
|
| 7 | #define _IPA_TABLE_H_
|
| 8 |
|
| 9 | #include <linux/types.h>
|
| 10 |
|
| 11 | struct ipa;
|
| 12 |
|
| 13 | |
| 14 | * ipa_filtered_valid() - Validate a filter table endpoint bitmap
|
| 15 | * @ipa: IPA pointer
|
| 16 | * @filtered: Filter table endpoint bitmap to check
|
| 17 | *
|
| 18 | * Return: true if all regions are valid, false otherwise
|
| 19 |
|
| 20 | bool ipa_filtered_valid(struct ipa *ipa, u64 filtered);
|
| 21 |
|
| 22 | |
| 23 | * ipa_table_hash_support() - Return true if hashed tables are supported
|
| 24 | * @ipa: IPA pointer
|
| 25 |
|
| 26 | bool ipa_table_hash_support(struct ipa *ipa);
|
| 27 |
|
| 28 | |
| 29 | * ipa_table_reset() - Reset filter and route tables entries to "none"
|
| 30 | * @ipa: IPA pointer
|
| 31 | * @modem: Whether to reset modem or AP entries
|
| 32 |
|
| 33 | void ipa_table_reset(struct ipa *ipa, bool modem);
|
| 34 |
|
| 35 | |
| 36 | * ipa_table_hash_flush() - Synchronize hashed filter and route updates
|
| 37 | * @ipa: IPA pointer
|
| 38 |
|
| 39 | int ipa_table_hash_flush(struct ipa *ipa);
|
| 40 |
|
| 41 | |
| 42 | * ipa_table_setup() - Set up filter and route tables
|
| 43 | * @ipa: IPA pointer
|
| 44 | *
|
| 45 | * There is no need for a matching ipa_table_teardown() function.
|
| 46 |
|
| 47 | int ipa_table_setup(struct ipa *ipa);
|
| 48 |
|
| 49 | |
| 50 | * ipa_table_config() - Configure filter and route tables
|
| 51 | * @ipa: IPA pointer
|
| 52 | *
|
| 53 | * There is no need for a matching ipa_table_deconfig() function.
|
| 54 |
|
| 55 | void ipa_table_config(struct ipa *ipa);
|
| 56 |
|
| 57 | |
| 58 | * ipa_table_init() - Do early initialization of filter and route tables
|
| 59 | * @ipa: IPA pointer
|
| 60 |
|
| 61 | int ipa_table_init(struct ipa *ipa);
|
| 62 |
|
| 63 | |
| 64 | * ipa_table_exit() - Inverse of ipa_table_init()
|
| 65 | * @ipa: IPA pointer
|
| 66 |
|
| 67 | void ipa_table_exit(struct ipa *ipa);
|
| 68 |
|
| 69 | |
| 70 | * ipa_table_mem_valid() - Validate sizes of table memory regions
|
| 71 | * @ipa: IPA pointer
|
| 72 | * @filter: Whether to check filter or routing tables
|
| 73 |
|
| 74 | bool ipa_table_mem_valid(struct ipa *ipa, bool filter);
|
| 75 |
|
| 76 | #endif
|