* [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) @ 2015-10-16 11:28 Jan Kaisrlik 2015-10-16 11:28 ` [RFC PATCH 2/2] ath9k: " Jan Kaisrlik 2015-10-16 12:06 ` [RFC PATCH 1/2] cfg80211: " Johannes Berg 0 siblings, 2 replies; 6+ messages in thread From: Jan Kaisrlik @ 2015-10-16 11:28 UTC (permalink / raw) To: kaisrja1; +Cc: sojkam1, linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander The patch adds support for Intelligent Transportation System (ITS-G5) band as defined by ETSI EN 302 663 standard. This band is enabled by a new configuration option CFG80211_REG_ITSG5_BAND, which depends on CFG80211_CERTIFICATION_ONUS. Signed-off-by: Jan Kaisrlik <kaisrja1@fel.cvut.cz> Cc: Michal Sojka <sojkam1@fel.cvut.cz> --- include/uapi/linux/nl80211.h | 2 ++ net/wireless/Kconfig | 21 +++++++++++++++++++++ net/wireless/reg.c | 4 ++++ 3 files changed, 27 insertions(+) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index c0ab6b0..9defe0a 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2838,6 +2838,7 @@ enum nl80211_sched_scan_match_attr { * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed + * @NL80211_RRF_ITSG5: band is reserved for Intelligent Transportation System */ enum nl80211_reg_rule_flags { NL80211_RRF_NO_OFDM = 1<<0, @@ -2855,6 +2856,7 @@ enum nl80211_reg_rule_flags { NL80211_RRF_NO_HT40PLUS = 1<<14, NL80211_RRF_NO_80MHZ = 1<<15, NL80211_RRF_NO_160MHZ = 1<<16, + NL80211_RRF_ITSG5 = 1<<17, }; #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig index 4f5543d..2f7767c 100644 --- a/net/wireless/Kconfig +++ b/net/wireless/Kconfig @@ -132,6 +132,27 @@ config CFG80211_REG_RELAX_NO_IR support this feature by declaring the appropriate channel flags and capabilities in their registration flow. +config CFG80211_REG_ITSG5_BAND + bool "cfg80211 support for ITS-G5 bands (5.9 GHz)" + def_bool n + depends on CFG80211_CERTIFICATION_ONUS + ---help--- + This option enables support for Inteligent Transportation System (ITS) + band 5.855 to 5.925 GHz. The band is standardized for Europe in the ETSI + EN 302 663 standard. This band is split into several sub-bands: + + - ITS-G5A (5.875 to 5.905 GHz) band is reserved for ITS road safety + related applications and is regulated by Commission Decision 2008/671/EC. + + - ITS-G5B (5.855 to 5.875 GHz) band is reserved for ITS non-safety + applications and is regulated by ECC Recommendation ECC/REC/(08)01. + + - ITS-G5D (5.905 to 5.925 GHz) band is reserved for future ITS + applications and is regulated by ECC Decision ECC/DEC(02)01. + + Enable this option only if you work on the above mentioned applications + and comply with the regulatory documents. + config CFG80211_DEFAULT_PS bool "enable powersave by default" depends on CFG80211 diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2510b231..82e7b3b 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1020,6 +1020,10 @@ freq_reg_info_regd(struct wiphy *wiphy, u32 center_freq, rr = ®d->reg_rules[i]; fr = &rr->freq_range; + if (!config_enabled(CONFIG_CFG80211_REG_ITSG5_BAND) && + (rr->flags & NL80211_RRF_ITSG5)) + return ERR_PTR(-EPERM); + /* * We only need to know if one frequency rule was * was in center_freq's band, that's enough, so lets -- 2.1.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC PATCH 2/2] ath9k: Add support for ITS-G5 band (5.9 GHz) 2015-10-16 11:28 [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) Jan Kaisrlik @ 2015-10-16 11:28 ` Jan Kaisrlik 2015-10-16 12:06 ` [RFC PATCH 1/2] cfg80211: " Johannes Berg 1 sibling, 0 replies; 6+ messages in thread From: Jan Kaisrlik @ 2015-10-16 11:28 UTC (permalink / raw) To: kaisrja1; +Cc: sojkam1, linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander The patch adds support for Inteligent Transportation System (ITS-G5) band to the ath9k drivers. Signed-off-by: Jan Kaisrlik <kaisrja1@fel.cvut.cz> Cc: Michal Sojka <sojkam1@fel.cvut.cz> --- drivers/net/wireless/ath/ath9k/common-init.c | 21 +++++++++++++++++++++ drivers/net/wireless/ath/ath9k/hw.h | 6 +++++- drivers/net/wireless/ath/regd.c | 18 +++++++++++++----- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/common-init.c b/drivers/net/wireless/ath/ath9k/common-init.c index a006c14..0f630b1 100644 --- a/drivers/net/wireless/ath/ath9k/common-init.c +++ b/drivers/net/wireless/ath/ath9k/common-init.c @@ -86,6 +86,27 @@ static const struct ieee80211_channel ath9k_5ghz_chantable[] = { CHAN5G(5785, 35), /* Channel 157 */ CHAN5G(5805, 36), /* Channel 161 */ CHAN5G(5825, 37), /* Channel 165 */ + +#ifdef CONFIG_CFG80211_REG_ITSG5_BAND + /* ITS-G5B */ + CHAN5G(5855, 38), /* Channel 171 */ + CHAN5G(5860, 39), /* Channel 172 */ + CHAN5G(5865, 40), /* Channel 173 */ + CHAN5G(5870, 41), /* Channel 174 */ + /* ITS-G5A */ + CHAN5G(5875, 42), /* Channel 175 */ + CHAN5G(5880, 43), /* Channel 176 */ + CHAN5G(5885, 44), /* Channel 177 */ + CHAN5G(5890, 45), /* Channel 178 */ + CHAN5G(5895, 46), /* Channel 179 */ + CHAN5G(5900, 47), /* Channel 180 */ + CHAN5G(5905, 48), /* Channel 181 */ + /* ITS-G5D */ + CHAN5G(5910, 49), /* Channel 182 */ + CHAN5G(5915, 50), /* Channel 183 */ + CHAN5G(5920, 51), /* Channel 184 */ + CHAN5G(5925, 52), /* Channel 185 */ +#endif }; /* Atheros hardware rate code addition for short premble */ diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index e8454db..38da6780 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h @@ -73,7 +73,11 @@ #define ATH9K_RSSI_BAD -128 -#define ATH9K_NUM_CHANNELS 38 +#ifdef CONFIG_CFG80211_REG_ITSG5_BAND +#define ATH9K_NUM_CHANNELS 53 +#else +#define ATH9K_NUM_CHANNELS 38 +#endif /* Register read/write primitives */ #define REG_WRITE(_ah, _reg, _val) \ diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 06ea6cc..28bbbe0 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c @@ -50,6 +50,9 @@ static int __ath_regd_init(struct ath_regulatory *reg); #define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\ NL80211_RRF_NO_IR) +#define ATH9K_5GHZ_ITSG5 REG_RULE(5855-5, 5925+5, 10, 0, 33,\ + NL80211_RRF_ITSG5) + #define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \ ATH9K_2GHZ_CH12_13, \ ATH9K_2GHZ_CH14 @@ -64,53 +67,58 @@ static int __ath_regd_init(struct ath_regulatory *reg); /* Can be used for: * 0x60, 0x61, 0x62 */ static const struct ieee80211_regdomain ath_world_regdom_60_61_62 = { - .n_reg_rules = 5, + .n_reg_rules = 6, .alpha2 = "99", .reg_rules = { ATH9K_2GHZ_ALL, ATH9K_5GHZ_ALL, + ATH9K_5GHZ_ITSG5, } }; /* Can be used by 0x63 and 0x65 */ static const struct ieee80211_regdomain ath_world_regdom_63_65 = { - .n_reg_rules = 4, + .n_reg_rules = 5, .alpha2 = "99", .reg_rules = { ATH9K_2GHZ_CH01_11, ATH9K_2GHZ_CH12_13, ATH9K_5GHZ_NO_MIDBAND, + ATH9K_5GHZ_ITSG5, } }; /* Can be used by 0x64 only */ static const struct ieee80211_regdomain ath_world_regdom_64 = { - .n_reg_rules = 3, + .n_reg_rules = 4, .alpha2 = "99", .reg_rules = { ATH9K_2GHZ_CH01_11, ATH9K_5GHZ_NO_MIDBAND, + ATH9K_5GHZ_ITSG5, } }; /* Can be used by 0x66 and 0x69 */ static const struct ieee80211_regdomain ath_world_regdom_66_69 = { - .n_reg_rules = 3, + .n_reg_rules = 4, .alpha2 = "99", .reg_rules = { ATH9K_2GHZ_CH01_11, ATH9K_5GHZ_ALL, + ATH9K_5GHZ_ITSG5, } }; /* Can be used by 0x67, 0x68, 0x6A and 0x6C */ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = { - .n_reg_rules = 4, + .n_reg_rules = 5, .alpha2 = "99", .reg_rules = { ATH9K_2GHZ_CH01_11, ATH9K_2GHZ_CH12_13, ATH9K_5GHZ_ALL, + ATH9K_5GHZ_ITSG5, } }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) 2015-10-16 11:28 [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) Jan Kaisrlik 2015-10-16 11:28 ` [RFC PATCH 2/2] ath9k: " Jan Kaisrlik @ 2015-10-16 12:06 ` Johannes Berg 2015-10-16 16:38 ` Michal Sojka 1 sibling, 1 reply; 6+ messages in thread From: Johannes Berg @ 2015-10-16 12:06 UTC (permalink / raw) To: Jan Kaisrlik Cc: sojkam1, linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander On Fri, 2015-10-16 at 13:28 +0200, Jan Kaisrlik wrote: > The patch adds support for Intelligent Transportation System (ITS-G5) > band as defined by ETSI EN 302 663 standard. This band is enabled by > a new configuration option CFG80211_REG_ITSG5_BAND, which depends on > CFG80211_CERTIFICATION_ONUS. That Kconfig option seems unnecessary - after all, the regulatory database still has a say in this? Even the NL80211_RRF_ITSG5 flag seems somewhat unnecessary - if the regulatory database did in fact provide information on these channels, then we can assume they're usable, no? IOW - I don't really see the point of this patch - can't we treat these channels just like regular ones, and rely on the regulatory information to prevent their use in all but special scenarios (where the integrator is providing a proper database)? johannes ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) 2015-10-16 12:06 ` [RFC PATCH 1/2] cfg80211: " Johannes Berg @ 2015-10-16 16:38 ` Michal Sojka 2015-10-16 20:24 ` Johannes Berg 0 siblings, 1 reply; 6+ messages in thread From: Michal Sojka @ 2015-10-16 16:38 UTC (permalink / raw) To: Johannes Berg, Jan Kaisrlik, wireless-regdb Cc: linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander Hi all, (I added wireless-regdb@lists.infradead.org to recipients, the original mail is at http://marc.info/?l=linux-wireless&m=144499490005262) On Fri, Oct 16 2015, Johannes Berg wrote: > On Fri, 2015-10-16 at 13:28 +0200, Jan Kaisrlik wrote: >> The patch adds support for Intelligent Transportation System (ITS-G5) >> band as defined by ETSI EN 302 663 standard. This band is enabled by >> a new configuration option CFG80211_REG_ITSG5_BAND, which depends on >> CFG80211_CERTIFICATION_ONUS. > > That Kconfig option seems unnecessary - after all, the regulatory > database still has a say in this? I thought that the regdb is for unlicensed bands with unrestricted use. The 5.9 GHz band is not licensed but it is restricted for ITS applications. In http://marc.info/?l=linux-wireless&m=140183393707445&w=2 Luis Rodriguez suggested that having a Kconfig option may be the way to go, but we may misread what he was saying. I assume that if this band will be in regdb, it will be too easy to use this band (e.g. by mistake) for non-ITS applications. > Even the NL80211_RRF_ITSG5 flag seems somewhat unnecessary - if the > regulatory database did in fact provide information on these channels, > then we can assume they're usable, no? > > IOW - I don't really see the point of this patch - can't we treat these > channels just like regular ones, and rely on the regulatory information > to prevent their use in all but special scenarios (where the integrator > is providing a proper database)? Our goal is to make it easier for people to experiment with ITS in controlled environment (e.g. in a university lab). So you suggest that this should be enabled by providing custom regdb rather than recompiling the kernel with CFG80211_CERTIFICATION_ONUS? -Michal ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) 2015-10-16 16:38 ` Michal Sojka @ 2015-10-16 20:24 ` Johannes Berg 2015-10-16 20:46 ` Michal Sojka 0 siblings, 1 reply; 6+ messages in thread From: Johannes Berg @ 2015-10-16 20:24 UTC (permalink / raw) To: Michal Sojka, Jan Kaisrlik, wireless-regdb Cc: linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander Hi, > I thought that the regdb is for unlicensed bands with unrestricted use. > The 5.9 GHz band is not licensed but it is restricted for ITS > applications. It kind of is, at least the current one is. > In http://marc.info/?l=linux-wireless&m=140183393707445&w=2 > Luis Rodriguez suggested that having a Kconfig option may be the way to > go, but we may misread what he was saying. I didn't really follow this. > I assume that if this band will be in regdb, it will be too easy to use > this band (e.g. by mistake) for non-ITS applications. Does the *regulatory* actually prohibit that anyway though? > Our goal is to make it easier for people to experiment with ITS in > controlled environment (e.g. in a university lab). So you suggest that > this should be enabled by providing custom regdb rather than recompiling > the kernel with CFG80211_CERTIFICATION_ONUS? Yes, that was exactly my thought. johannes ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) 2015-10-16 20:24 ` Johannes Berg @ 2015-10-16 20:46 ` Michal Sojka 0 siblings, 0 replies; 6+ messages in thread From: Michal Sojka @ 2015-10-16 20:46 UTC (permalink / raw) To: Johannes Berg, Jan Kaisrlik, wireless-regdb Cc: linux-wireless, bernd.lehmann, jan-niklas.meier, s.sander On Fri, Oct 16 2015, Johannes Berg wrote: > Hi, > >> I thought that the regdb is for unlicensed bands with unrestricted use. >> The 5.9 GHz band is not licensed but it is restricted for ITS >> applications. > > It kind of is, at least the current one is. > >> In http://marc.info/?l=linux-wireless&m=140183393707445&w=2 >> Luis Rodriguez suggested that having a Kconfig option may be the way to >> go, but we may misread what he was saying. > > I didn't really follow this. > >> I assume that if this band will be in regdb, it will be too easy to use >> this band (e.g. by mistake) for non-ITS applications. > > Does the *regulatory* actually prohibit that anyway though? Regulatory (ECC Decision (08)01) reads: ... decides ... that CEPT administrations shall designate the frequency sub-band 5875-5905 MHz on a non-exclusive basis for ITS traffic safety applications; I'm not sure about the exact meaning of words "designate" and "non-exclusive". If anyone can clarify that for me, I'd appreciate it. I tend to understand that this band can be only used by ITS applications (without license) or by other devices that have a proper license. Thanks. -Michal ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-16 20:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-16 11:28 [RFC PATCH 1/2] cfg80211: Add support for ITS-G5 band (5.9 GHz) Jan Kaisrlik 2015-10-16 11:28 ` [RFC PATCH 2/2] ath9k: " Jan Kaisrlik 2015-10-16 12:06 ` [RFC PATCH 1/2] cfg80211: " Johannes Berg 2015-10-16 16:38 ` Michal Sojka 2015-10-16 20:24 ` Johannes Berg 2015-10-16 20:46 ` Michal Sojka
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox