Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /* Copyright(c) 2018-2019  Realtek Corporation
0003  */
0004 
0005 #ifndef __RTW_REGD_H_
0006 #define __RTW_REGD_H_
0007 
0008 #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
0009 #define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR
0010 enum rtw_chplan_id {
0011     RTW_CHPLAN_ETSI1_NULL = 0x21,
0012     RTW_CHPLAN_WORLD_ETSI1 = 0x26,
0013     RTW_CHPLAN_MKK1_MKK1 = 0x27,
0014     RTW_CHPLAN_IC1_IC2 = 0x2B,
0015     RTW_CHPLAN_WORLD_CHILE1 = 0x2D,
0016     RTW_CHPLAN_WORLD_FCC3 = 0x30,
0017     RTW_CHPLAN_WORLD_FCC5 = 0x32,
0018     RTW_CHPLAN_FCC1_FCC7 = 0x34,
0019     RTW_CHPLAN_WORLD_ETSI2 = 0x35,
0020     RTW_CHPLAN_WORLD_ETSI3 = 0x36,
0021     RTW_CHPLAN_ETSI1_ETSI12 = 0x3D,
0022     RTW_CHPLAN_KCC1_KCC2 = 0x3E,
0023     RTW_CHPLAN_ETSI1_ETSI4 = 0x42,
0024     RTW_CHPLAN_FCC1_NCC3 = 0x44,
0025     RTW_CHPLAN_WORLD_ACMA1 = 0x45,
0026     RTW_CHPLAN_WORLD_ETSI6 = 0x47,
0027     RTW_CHPLAN_WORLD_ETSI7 = 0x48,
0028     RTW_CHPLAN_WORLD_ETSI8 = 0x49,
0029     RTW_CHPLAN_KCC1_KCC3 = 0x4B,
0030     RTW_CHPLAN_WORLD_ETSI10 = 0x51,
0031     RTW_CHPLAN_WORLD_ETSI14 = 0x59,
0032     RTW_CHPLAN_FCC2_FCC7 = 0x61,
0033     RTW_CHPLAN_FCC2_FCC1 = 0x62,
0034     RTW_CHPLAN_WORLD_ETSI15 = 0x63,
0035     RTW_CHPLAN_WORLD_FCC7 = 0x73,
0036     RTW_CHPLAN_FCC2_FCC17 = 0x74,
0037     RTW_CHPLAN_WORLD_ETSI20 = 0x75,
0038     RTW_CHPLAN_FCC2_FCC11 = 0x76,
0039     RTW_CHPLAN_REALTEK_DEFINE = 0x7f,
0040 };
0041 
0042 struct country_code_to_enum_rd {
0043     u16 countrycode;
0044     const char *iso_name;
0045 };
0046 
0047 enum country_code_type {
0048     COUNTRY_CODE_FCC = 0,
0049     COUNTRY_CODE_IC = 1,
0050     COUNTRY_CODE_ETSI = 2,
0051     COUNTRY_CODE_SPAIN = 3,
0052     COUNTRY_CODE_FRANCE = 4,
0053     COUNTRY_CODE_MKK = 5,
0054     COUNTRY_CODE_MKK1 = 6,
0055     COUNTRY_CODE_ISRAEL = 7,
0056     COUNTRY_CODE_TELEC = 8,
0057     COUNTRY_CODE_MIC = 9,
0058     COUNTRY_CODE_GLOBAL_DOMAIN = 10,
0059     COUNTRY_CODE_WORLD_WIDE_13 = 11,
0060     COUNTRY_CODE_TELEC_NETGEAR = 12,
0061     COUNTRY_CODE_WORLD_WIDE_13_5G_ALL = 13,
0062 
0063     /* new channel plan above this */
0064     COUNTRY_CODE_MAX
0065 };
0066 
0067 int rtw_regd_init(struct rtw_dev *rtwdev);
0068 int rtw_regd_hint(struct rtw_dev *rtwdev);
0069 u8 rtw_regd_get(struct rtw_dev *rtwdev);
0070 bool rtw_regd_has_alt(u8 regd, u8 *regd_alt);
0071 #endif