403-world_regd_fixup.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --- a/drivers/net/wireless/ath/regd.c
  2. +++ b/drivers/net/wireless/ath/regd.c
  3. @@ -44,7 +44,8 @@ static struct reg_dmn_pair_mapping *ath_
  4. NL80211_RRF_NO_OFDM)
  5. /* We allow IBSS on these on a case by case basis by regulatory domain */
  6. -#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
  7. +#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5240+10, 80, 0, 30, 0),\
  8. + REG_RULE(5260-10, 5350+10, 80, 0, 30,\
  9. NL80211_RRF_NO_IR)
  10. #define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
  11. NL80211_RRF_NO_IR)
  12. @@ -62,57 +63,56 @@ static struct reg_dmn_pair_mapping *ath_
  13. #define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
  14. ATH9K_5GHZ_5725_5850
  15. +#define REGD_RULES(...) \
  16. + .reg_rules = { __VA_ARGS__ }, \
  17. + .n_reg_rules = ARRAY_SIZE(((struct ieee80211_reg_rule[]) { __VA_ARGS__ }))
  18. +
  19. /* Can be used for:
  20. * 0x60, 0x61, 0x62 */
  21. static const struct ieee80211_regdomain ath_world_regdom_60_61_62 = {
  22. - .n_reg_rules = 5,
  23. .alpha2 = "99",
  24. - .reg_rules = {
  25. + REGD_RULES(
  26. ATH9K_2GHZ_ALL,
  27. ATH9K_5GHZ_ALL,
  28. - }
  29. + )
  30. };
  31. /* Can be used by 0x63 and 0x65 */
  32. static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
  33. - .n_reg_rules = 4,
  34. .alpha2 = "99",
  35. - .reg_rules = {
  36. + REGD_RULES(
  37. ATH9K_2GHZ_CH01_11,
  38. ATH9K_2GHZ_CH12_13,
  39. ATH9K_5GHZ_NO_MIDBAND,
  40. - }
  41. + )
  42. };
  43. /* Can be used by 0x64 only */
  44. static const struct ieee80211_regdomain ath_world_regdom_64 = {
  45. - .n_reg_rules = 3,
  46. .alpha2 = "99",
  47. - .reg_rules = {
  48. + REGD_RULES(
  49. ATH9K_2GHZ_CH01_11,
  50. ATH9K_5GHZ_NO_MIDBAND,
  51. - }
  52. + )
  53. };
  54. /* Can be used by 0x66 and 0x69 */
  55. static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
  56. - .n_reg_rules = 3,
  57. .alpha2 = "99",
  58. - .reg_rules = {
  59. + REGD_RULES(
  60. ATH9K_2GHZ_CH01_11,
  61. ATH9K_5GHZ_ALL,
  62. - }
  63. + )
  64. };
  65. /* Can be used by 0x67, 0x68, 0x6A and 0x6C */
  66. static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
  67. - .n_reg_rules = 4,
  68. .alpha2 = "99",
  69. - .reg_rules = {
  70. + REGD_RULES(
  71. ATH9K_2GHZ_CH01_11,
  72. ATH9K_2GHZ_CH12_13,
  73. ATH9K_5GHZ_ALL,
  74. - }
  75. + )
  76. };
  77. static bool dynamic_country_user_possible(struct ath_regulatory *reg)