162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
262306a36Sopenharmony_ci/* Copyright(c) 2018-2019  Realtek Corporation
362306a36Sopenharmony_ci */
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#ifndef __RTW_REGD_H_
662306a36Sopenharmony_ci#define __RTW_REGD_H_
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
962306a36Sopenharmony_ci#define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR
1062306a36Sopenharmony_cienum rtw_chplan_id {
1162306a36Sopenharmony_ci	RTW_CHPLAN_ETSI1_NULL = 0x21,
1262306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI1 = 0x26,
1362306a36Sopenharmony_ci	RTW_CHPLAN_MKK1_MKK1 = 0x27,
1462306a36Sopenharmony_ci	RTW_CHPLAN_IC1_IC2 = 0x2B,
1562306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_CHILE1 = 0x2D,
1662306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_FCC3 = 0x30,
1762306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_FCC5 = 0x32,
1862306a36Sopenharmony_ci	RTW_CHPLAN_FCC1_FCC7 = 0x34,
1962306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI2 = 0x35,
2062306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI3 = 0x36,
2162306a36Sopenharmony_ci	RTW_CHPLAN_ETSI1_ETSI12 = 0x3D,
2262306a36Sopenharmony_ci	RTW_CHPLAN_KCC1_KCC2 = 0x3E,
2362306a36Sopenharmony_ci	RTW_CHPLAN_ETSI1_ETSI4 = 0x42,
2462306a36Sopenharmony_ci	RTW_CHPLAN_FCC1_NCC3 = 0x44,
2562306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ACMA1 = 0x45,
2662306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI6 = 0x47,
2762306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI7 = 0x48,
2862306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI8 = 0x49,
2962306a36Sopenharmony_ci	RTW_CHPLAN_KCC1_KCC3 = 0x4B,
3062306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI10 = 0x51,
3162306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI14 = 0x59,
3262306a36Sopenharmony_ci	RTW_CHPLAN_FCC2_FCC7 = 0x61,
3362306a36Sopenharmony_ci	RTW_CHPLAN_FCC2_FCC1 = 0x62,
3462306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI15 = 0x63,
3562306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_FCC7 = 0x73,
3662306a36Sopenharmony_ci	RTW_CHPLAN_FCC2_FCC17 = 0x74,
3762306a36Sopenharmony_ci	RTW_CHPLAN_WORLD_ETSI20 = 0x75,
3862306a36Sopenharmony_ci	RTW_CHPLAN_FCC2_FCC11 = 0x76,
3962306a36Sopenharmony_ci	RTW_CHPLAN_REALTEK_DEFINE = 0x7f,
4062306a36Sopenharmony_ci};
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_cistruct country_code_to_enum_rd {
4362306a36Sopenharmony_ci	u16 countrycode;
4462306a36Sopenharmony_ci	const char *iso_name;
4562306a36Sopenharmony_ci};
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_cienum country_code_type {
4862306a36Sopenharmony_ci	COUNTRY_CODE_FCC = 0,
4962306a36Sopenharmony_ci	COUNTRY_CODE_IC = 1,
5062306a36Sopenharmony_ci	COUNTRY_CODE_ETSI = 2,
5162306a36Sopenharmony_ci	COUNTRY_CODE_SPAIN = 3,
5262306a36Sopenharmony_ci	COUNTRY_CODE_FRANCE = 4,
5362306a36Sopenharmony_ci	COUNTRY_CODE_MKK = 5,
5462306a36Sopenharmony_ci	COUNTRY_CODE_MKK1 = 6,
5562306a36Sopenharmony_ci	COUNTRY_CODE_ISRAEL = 7,
5662306a36Sopenharmony_ci	COUNTRY_CODE_TELEC = 8,
5762306a36Sopenharmony_ci	COUNTRY_CODE_MIC = 9,
5862306a36Sopenharmony_ci	COUNTRY_CODE_GLOBAL_DOMAIN = 10,
5962306a36Sopenharmony_ci	COUNTRY_CODE_WORLD_WIDE_13 = 11,
6062306a36Sopenharmony_ci	COUNTRY_CODE_TELEC_NETGEAR = 12,
6162306a36Sopenharmony_ci	COUNTRY_CODE_WORLD_WIDE_13_5G_ALL = 13,
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci	/* new channel plan above this */
6462306a36Sopenharmony_ci	COUNTRY_CODE_MAX
6562306a36Sopenharmony_ci};
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciint rtw_regd_init(struct rtw_dev *rtwdev);
6862306a36Sopenharmony_ciint rtw_regd_hint(struct rtw_dev *rtwdev);
6962306a36Sopenharmony_ciu8 rtw_regd_get(struct rtw_dev *rtwdev);
7062306a36Sopenharmony_cibool rtw_regd_has_alt(u8 regd, u8 *regd_alt);
7162306a36Sopenharmony_ci#endif
72