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