Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2
 3/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 4 * Copyright (C) 2019-2022 Linaro Ltd.
 5 */
 6#ifndef _IPA_TABLE_H_
 7#define _IPA_TABLE_H_
 8
 9#include <linux/types.h>
10
11struct 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 */
20bool 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 */
26static inline bool ipa_table_hash_support(struct ipa *ipa)
27{
28	return ipa->version != IPA_VERSION_4_2;
29}
30
31/**
32 * ipa_table_reset() - Reset filter and route tables entries to "none"
33 * @ipa:	IPA pointer
34 * @modem:	Whether to reset modem or AP entries
35 */
36void ipa_table_reset(struct ipa *ipa, bool modem);
37
38/**
39 * ipa_table_hash_flush() - Synchronize hashed filter and route updates
40 * @ipa:	IPA pointer
41 */
42int ipa_table_hash_flush(struct ipa *ipa);
43
44/**
45 * ipa_table_setup() - Set up filter and route tables
46 * @ipa:	IPA pointer
47 *
48 * There is no need for a matching ipa_table_teardown() function.
49 */
50int ipa_table_setup(struct ipa *ipa);
51
52/**
53 * ipa_table_config() - Configure filter and route tables
54 * @ipa:	IPA pointer
55 *
56 * There is no need for a matching ipa_table_deconfig() function.
57 */
58void ipa_table_config(struct ipa *ipa);
59
60/**
61 * ipa_table_init() - Do early initialization of filter and route tables
62 * @ipa:	IPA pointer
63 */
64int ipa_table_init(struct ipa *ipa);
65
66/**
67 * ipa_table_exit() - Inverse of ipa_table_init()
68 * @ipa:	IPA pointer
69 */
70void ipa_table_exit(struct ipa *ipa);
71
72/**
73 * ipa_table_mem_valid() - Validate sizes of table memory regions
74 * @ipa:	IPA pointer
75 * @filter:	Whether to check filter or routing tables
76 */
77bool ipa_table_mem_valid(struct ipa *ipa, bool filter);
78
79#endif /* _IPA_TABLE_H_ */
v5.14.15
 1/* SPDX-License-Identifier: GPL-2.0 */
 2
 3/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 4 * Copyright (C) 2019-2021 Linaro Ltd.
 5 */
 6#ifndef _IPA_TABLE_H_
 7#define _IPA_TABLE_H_
 8
 9#include <linux/types.h>
10
11struct ipa;
12
13/* The maximum number of filter table entries (IPv4, IPv6; hashed or not) */
14#define IPA_FILTER_COUNT_MAX	14
15
16/* The maximum number of route table entries (IPv4, IPv6; hashed or not) */
17#define IPA_ROUTE_COUNT_MAX	15
18
19/**
20 * ipa_table_valid() - Validate route and filter table memory regions
21 * @ipa:	IPA pointer
22 *
23 * Return:	true if all regions are valid, false otherwise
24 */
25bool ipa_table_valid(struct ipa *ipa);
26
27/**
28 * ipa_filter_map_valid() - Validate a filter table endpoint bitmap
29 * @ipa:	IPA pointer
30 * @filter_mask: Filter table endpoint bitmap to check
31 *
32 * Return:	true if all regions are valid, false otherwise
33 */
34bool ipa_filter_map_valid(struct ipa *ipa, u32 filter_mask);
35
36/**
37 * ipa_table_hash_support() - Return true if hashed tables are supported
38 * @ipa:	IPA pointer
39 */
40static inline bool ipa_table_hash_support(struct ipa *ipa)
41{
42	return ipa->version != IPA_VERSION_4_2;
43}
44
45/**
46 * ipa_table_reset() - Reset filter and route tables entries to "none"
47 * @ipa:	IPA pointer
48 * @modem:	Whether to reset modem or AP entries
49 */
50void ipa_table_reset(struct ipa *ipa, bool modem);
51
52/**
53 * ipa_table_hash_flush() - Synchronize hashed filter and route updates
54 * @ipa:	IPA pointer
55 */
56int ipa_table_hash_flush(struct ipa *ipa);
57
58/**
59 * ipa_table_setup() - Set up filter and route tables
60 * @ipa:	IPA pointer
61 *
62 * There is no need for a matching ipa_table_teardown() function.
63 */
64int ipa_table_setup(struct ipa *ipa);
65
66/**
67 * ipa_table_config() - Configure filter and route tables
68 * @ipa:	IPA pointer
69 *
70 * There is no need for a matching ipa_table_deconfig() function.
71 */
72void ipa_table_config(struct ipa *ipa);
73
74/**
75 * ipa_table_init() - Do early initialization of filter and route tables
76 * @ipa:	IPA pointer
77 */
78int ipa_table_init(struct ipa *ipa);
79
80/**
81 * ipa_table_exit() - Inverse of ipa_table_init()
82 * @ipa:	IPA pointer
83 */
84void ipa_table_exit(struct ipa *ipa);
 
 
 
 
 
 
 
85
86#endif /* _IPA_TABLE_H_ */