ath9k: add a temporary uci option for setting the channel bandwidth
[openwrt.git] / package / mac80211 / patches / 405-world_regd_fixup.patch
1 --- a/drivers/net/wireless/ath/regd.c
2 +++ b/drivers/net/wireless/ath/regd.c
3 @@ -37,7 +37,8 @@
4 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)
5
6 /* We allow IBSS on these on a case by case basis by regulatory domain */
7 -#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 40, 0, 30,\
8 +#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5250, 40, 0, 30, 0), \
9 + REG_RULE(5250, 5350+10, 40, 0, 30,\
10 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
11 #define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 40, 0, 30,\
12 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
13 @@ -55,57 +56,56 @@
14 #define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
15 ATH9K_5GHZ_5725_5850
16
17 +#define REGD_RULES(...) \
18 + .reg_rules = { __VA_ARGS__ }, \
19 + .n_reg_rules = ARRAY_SIZE(((struct ieee80211_reg_rule[]) { __VA_ARGS__ }))
20 +
21 /* Can be used for:
22 * 0x60, 0x61, 0x62 */
23 static const struct ieee80211_regdomain ath_world_regdom_60_61_62 = {
24 - .n_reg_rules = 5,
25 .alpha2 = "99",
26 - .reg_rules = {
27 + REGD_RULES(
28 ATH9K_2GHZ_ALL,
29 ATH9K_5GHZ_ALL,
30 - }
31 + )
32 };
33
34 /* Can be used by 0x63 and 0x65 */
35 static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
36 - .n_reg_rules = 4,
37 .alpha2 = "99",
38 - .reg_rules = {
39 + REGD_RULES(
40 ATH9K_2GHZ_CH01_11,
41 ATH9K_2GHZ_CH12_13,
42 ATH9K_5GHZ_NO_MIDBAND,
43 - }
44 + )
45 };
46
47 /* Can be used by 0x64 only */
48 static const struct ieee80211_regdomain ath_world_regdom_64 = {
49 - .n_reg_rules = 3,
50 .alpha2 = "99",
51 - .reg_rules = {
52 + REGD_RULES(
53 ATH9K_2GHZ_CH01_11,
54 ATH9K_5GHZ_NO_MIDBAND,
55 - }
56 + )
57 };
58
59 /* Can be used by 0x66 and 0x69 */
60 static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
61 - .n_reg_rules = 3,
62 .alpha2 = "99",
63 - .reg_rules = {
64 + REGD_RULES(
65 ATH9K_2GHZ_CH01_11,
66 ATH9K_5GHZ_ALL,
67 - }
68 + )
69 };
70
71 /* Can be used by 0x67, 0x68, 0x6A and 0x6C */
72 static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
73 - .n_reg_rules = 4,
74 .alpha2 = "99",
75 - .reg_rules = {
76 + REGD_RULES(
77 ATH9K_2GHZ_CH01_11,
78 ATH9K_2GHZ_CH12_13,
79 ATH9K_5GHZ_ALL,
80 - }
81 + )
82 };
83
84 static inline bool is_wwr_sku(u16 regd)
This page took 0.048463 seconds and 5 git commands to generate.