regd.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
  2. /* Copyright(c) 2018-2019 Realtek Corporation
  3. */
  4. #ifndef __RTW_REGD_H_
  5. #define __RTW_REGD_H_
  6. #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
  7. #define IEEE80211_CHAN_PASSIVE_SCAN IEEE80211_CHAN_NO_IR
  8. enum rtw_chplan_id {
  9. RTW_CHPLAN_ETSI1_NULL = 0x21,
  10. RTW_CHPLAN_WORLD_ETSI1 = 0x26,
  11. RTW_CHPLAN_MKK1_MKK1 = 0x27,
  12. RTW_CHPLAN_IC1_IC2 = 0x2B,
  13. RTW_CHPLAN_WORLD_CHILE1 = 0x2D,
  14. RTW_CHPLAN_WORLD_FCC3 = 0x30,
  15. RTW_CHPLAN_WORLD_FCC5 = 0x32,
  16. RTW_CHPLAN_FCC1_FCC7 = 0x34,
  17. RTW_CHPLAN_WORLD_ETSI2 = 0x35,
  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_KCC1_KCC3 = 0x4B,
  28. RTW_CHPLAN_WORLD_ETSI10 = 0x51,
  29. RTW_CHPLAN_WORLD_ETSI14 = 0x59,
  30. RTW_CHPLAN_FCC2_FCC7 = 0x61,
  31. RTW_CHPLAN_FCC2_FCC1 = 0x62,
  32. RTW_CHPLAN_WORLD_ETSI15 = 0x63,
  33. RTW_CHPLAN_WORLD_FCC7 = 0x73,
  34. RTW_CHPLAN_FCC2_FCC17 = 0x74,
  35. RTW_CHPLAN_WORLD_ETSI20 = 0x75,
  36. RTW_CHPLAN_FCC2_FCC11 = 0x76,
  37. RTW_CHPLAN_REALTEK_DEFINE = 0x7f,
  38. };
  39. struct country_code_to_enum_rd {
  40. u16 countrycode;
  41. const char *iso_name;
  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. /* new channel plan above this */
  59. COUNTRY_CODE_MAX
  60. };
  61. int rtw_regd_init(struct rtw_dev *rtwdev);
  62. int rtw_regd_hint(struct rtw_dev *rtwdev);
  63. u8 rtw_regd_get(struct rtw_dev *rtwdev);
  64. bool rtw_regd_has_alt(u8 regd, u8 *regd_alt);
  65. #endif