[9610] wlbt: SCSC Driver version 10.9.1.0
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / net / wireless / scsc / reg_info.h
1 /******************************************************************************
2 *
3 * Copyright (c) 2012 - 2019 Samsung Electronics Co., Ltd. All rights reserved
4 *
5 *****************************************************************************/
6 #ifndef __SLSI_REGINFO_H__
7 #define __SLSI_REGINFO_H__
8
9 int slsi_read_regulatory(struct slsi_dev *sdev);
10 void slsi_regd_deinit(struct slsi_dev *sdev);
11 void slsi_regd_init(struct slsi_dev *sdev);
12
13 enum slsi_regdb_state {
14 SLSI_REG_DB_NOT_SET,
15 SLSI_REG_DB_ERROR,
16 SLSI_REG_DB_SET,
17 };
18
19 struct reg_database {
20 enum slsi_regdb_state regdb_state;
21 uint32_t version;
22 uint32_t num_countries;
23 struct regdb_file_reg_rule *reg_rules;
24 struct regdb_file_freq_range *freq_ranges;
25 struct regdb_file_reg_rules_collection *rules_collection;
26 struct regdb_file_reg_country *country;
27 };
28
29 struct regdb_file_freq_range {
30 uint32_t start_freq; /* in MHz */
31 uint32_t end_freq; /* in MHz */
32 uint32_t max_bandwidth; /* in MHz */
33 };
34
35 struct regdb_file_reg_rule {
36 struct regdb_file_freq_range *freq_range; /* ptr to regdb_file_freq_range array */
37 uint32_t max_eirp;/* this is power in dBm */
38 uint32_t flags;
39 };
40
41 struct regdb_file_reg_rules_collection {
42 uint32_t reg_rule_num;
43 /* pointers to struct regdb_file_reg_rule */
44 struct regdb_file_reg_rule *reg_rule[8];
45 };
46
47 struct regdb_file_reg_country {
48 uint8_t alpha2[2];
49 uint8_t pad_byte;
50 uint8_t dfs_region; /* first two bits define the DFS region */
51 /* pointers to struct regdb_file_reg_rules_collection */
52 struct regdb_file_reg_rules_collection *collection;
53 };
54
55 #endif
56