1*e3037485SYan-Hsuan Chuang /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2*e3037485SYan-Hsuan Chuang /* Copyright(c) 2018-2019 Realtek Corporation 3*e3037485SYan-Hsuan Chuang */ 4*e3037485SYan-Hsuan Chuang 5*e3037485SYan-Hsuan Chuang #ifndef __RTW_REGD_H_ 6*e3037485SYan-Hsuan Chuang #define __RTW_REGD_H_ 7*e3037485SYan-Hsuan Chuang 8*e3037485SYan-Hsuan Chuang #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR 9*e3037485SYan-Hsuan Chuang #define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR 10*e3037485SYan-Hsuan Chuang enum rtw_chplan_id { 11*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI1 = 0x26, 12*e3037485SYan-Hsuan Chuang RTW_CHPLAN_MKK1_MKK1 = 0x27, 13*e3037485SYan-Hsuan Chuang RTW_CHPLAN_IC1_IC2 = 0x2B, 14*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_CHILE1 = 0x2D, 15*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_FCC3 = 0x30, 16*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_FCC5 = 0x32, 17*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC1_FCC7 = 0x34, 18*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI3 = 0x36, 19*e3037485SYan-Hsuan Chuang RTW_CHPLAN_ETSI1_ETSI12 = 0x3D, 20*e3037485SYan-Hsuan Chuang RTW_CHPLAN_KCC1_KCC2 = 0x3E, 21*e3037485SYan-Hsuan Chuang RTW_CHPLAN_ETSI1_ETSI4 = 0x42, 22*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC1_NCC3 = 0x44, 23*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ACMA1 = 0x45, 24*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI6 = 0x47, 25*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI7 = 0x48, 26*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI8 = 0x49, 27*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI10 = 0x51, 28*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI14 = 0x59, 29*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC2_FCC7 = 0x61, 30*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC2_FCC1 = 0x62, 31*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_FCC7 = 0x73, 32*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC2_FCC17 = 0x74, 33*e3037485SYan-Hsuan Chuang RTW_CHPLAN_WORLD_ETSI20 = 0x75, 34*e3037485SYan-Hsuan Chuang RTW_CHPLAN_FCC2_FCC11 = 0x76, 35*e3037485SYan-Hsuan Chuang RTW_CHPLAN_REALTEK_DEFINE = 0x7f, 36*e3037485SYan-Hsuan Chuang }; 37*e3037485SYan-Hsuan Chuang 38*e3037485SYan-Hsuan Chuang struct country_code_to_enum_rd { 39*e3037485SYan-Hsuan Chuang u16 countrycode; 40*e3037485SYan-Hsuan Chuang const char *iso_name; 41*e3037485SYan-Hsuan Chuang }; 42*e3037485SYan-Hsuan Chuang 43*e3037485SYan-Hsuan Chuang enum country_code_type { 44*e3037485SYan-Hsuan Chuang COUNTRY_CODE_FCC = 0, 45*e3037485SYan-Hsuan Chuang COUNTRY_CODE_IC = 1, 46*e3037485SYan-Hsuan Chuang COUNTRY_CODE_ETSI = 2, 47*e3037485SYan-Hsuan Chuang COUNTRY_CODE_SPAIN = 3, 48*e3037485SYan-Hsuan Chuang COUNTRY_CODE_FRANCE = 4, 49*e3037485SYan-Hsuan Chuang COUNTRY_CODE_MKK = 5, 50*e3037485SYan-Hsuan Chuang COUNTRY_CODE_MKK1 = 6, 51*e3037485SYan-Hsuan Chuang COUNTRY_CODE_ISRAEL = 7, 52*e3037485SYan-Hsuan Chuang COUNTRY_CODE_TELEC = 8, 53*e3037485SYan-Hsuan Chuang COUNTRY_CODE_MIC = 9, 54*e3037485SYan-Hsuan Chuang COUNTRY_CODE_GLOBAL_DOMAIN = 10, 55*e3037485SYan-Hsuan Chuang COUNTRY_CODE_WORLD_WIDE_13 = 11, 56*e3037485SYan-Hsuan Chuang COUNTRY_CODE_TELEC_NETGEAR = 12, 57*e3037485SYan-Hsuan Chuang COUNTRY_CODE_WORLD_WIDE_13_5G_ALL = 13, 58*e3037485SYan-Hsuan Chuang 59*e3037485SYan-Hsuan Chuang /* new channel plan above this */ 60*e3037485SYan-Hsuan Chuang COUNTRY_CODE_MAX 61*e3037485SYan-Hsuan Chuang }; 62*e3037485SYan-Hsuan Chuang 63*e3037485SYan-Hsuan Chuang int rtw_regd_init(struct rtw_dev *rtwdev, 64*e3037485SYan-Hsuan Chuang void (*reg_notifier)(struct wiphy *wiphy, 65*e3037485SYan-Hsuan Chuang struct regulatory_request *request)); 66*e3037485SYan-Hsuan Chuang void rtw_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request); 67*e3037485SYan-Hsuan Chuang #endif 68