Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 0/5] Infrastructure for 60g (802.11ad)

These patches add minimal infrastructure for the 60gHz (802.11ad)
band WiFi drivers.

This change enables offload drivers for the 60GHz devices that implement
the 802.11 MAC functionality in the device itself.

Addressed comments form Johannes Berg. Since no significant issues raised,
change it from RFC to PATCH.

Driver based on this infrastructure see at:
http://wireless.kernel.org/en/users/Drivers/wil6210

Vladimir Kondratiev (5):
  wireless: add 802.11ad (60gHz band)
  wireless: rate check logic for 60g
  wireless: regulatory for 60g
  wireless: 60g protocol constants
  wireless: bitrate calculation for 60g

 include/linux/ieee80211.h |   89 ++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/nl80211.h   |    2 +
 include/net/cfg80211.h    |    4 ++
 net/mac80211/tx.c         |    2 +
 net/wireless/core.c       |   10 ++++-
 net/wireless/reg.c        |    5 ++-
 net/wireless/util.c       |   84 ++++++++++++++++++++++++++++++++++++++----
 7 files changed, 184 insertions(+), 12 deletions(-)

--

-- 
1.7.9.5
(Continue reading)

Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 1/5] wireless: add 802.11ad (60gHz band)

Add enumerations for both cfg80211 and nl80211.
This expands wiphy.bands etc. arrays.

Extend channel <-> frequency translation to cover 60g band

Small fix for mac80211/tx.c required to fix compiler warning

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@...>
---
 include/linux/nl80211.h |    2 ++
 include/net/cfg80211.h  |    2 ++
 net/mac80211/tx.c       |    2 ++
 net/wireless/util.c     |   30 ++++++++++++++++++++++--------
 4 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index c0fc5d2..679831e 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
 <at>  <at>  -2539,10 +2539,12  <at>  <at>  enum nl80211_tx_rate_attributes {
  * enum nl80211_band - Frequency band
  *  <at> NL80211_BAND_2GHZ: 2.4 GHz ISM band
  *  <at> NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
+ *  <at> NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
  */
 enum nl80211_band {
 	NL80211_BAND_2GHZ,
 	NL80211_BAND_5GHZ,
+	NL80211_BAND_60GHZ,
 };
(Continue reading)

Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 2/5] wireless: rate check logic for 60g

On the 60g band, there is no 'basic rates'. Only MCS used.
Instead of mandatory basic rates, standard requires support for
mandatory MCS 1..4

Modify logic to comply with 60g requirements

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@...>
---
 net/wireless/core.c |   10 ++++++++--
 net/wireless/util.c |    5 +++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/net/wireless/core.c b/net/wireless/core.c
index 907f62c..e25234d 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
 <at>  <at>  -458,8 +458,14  <at>  <at>  int wiphy_register(struct wiphy *wiphy)
 			continue;

 		sband->band = band;
-
-		if (WARN_ON(!sband->n_channels || !sband->n_bitrates))
+		if (WARN_ON(!sband->n_channels))
+			return -EINVAL;
+		/*
+		 * on 60gHz band, there are no legacy rates, so
+		 * n_bitrates is 0
+		 */
+		if (WARN_ON((band != IEEE80211_BAND_60GHZ) &&
+				!sband->n_bitrates))
(Continue reading)

Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 4/5] wireless: 60g protocol constants

Provide various constants as defined by the 802.11ad:
frame types, IE's, capability bits, action categories

Introduce GCMP cipher, mandatory by 802.11ad

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@...>
---
 include/linux/ieee80211.h |   89 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 88 insertions(+), 1 deletion(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 318fc1f..90145bd 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
 <at>  <at>  -47,6 +47,7  <at>  <at> 
 #define IEEE80211_FCTL_MOREDATA		0x2000
 #define IEEE80211_FCTL_PROTECTED	0x4000
 #define IEEE80211_FCTL_ORDER		0x8000
+#define IEEE80211_FCTL_CTL_EXT		0x0f00

 #define IEEE80211_SCTL_FRAG		0x000F
 #define IEEE80211_SCTL_SEQ		0xFFF0
 <at>  <at>  -54,6 +55,7  <at>  <at> 
 #define IEEE80211_FTYPE_MGMT		0x0000
 #define IEEE80211_FTYPE_CTL		0x0004
 #define IEEE80211_FTYPE_DATA		0x0008
+#define IEEE80211_FTYPE_EXT		0x000c

 /* management */
 #define IEEE80211_STYPE_ASSOC_REQ	0x0000
(Continue reading)

Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 5/5] wireless: bitrate calculation for 60g

60g band uses different from .11n MCS scheme, so bitrate should be calculated
differently

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@...>
---
 include/net/cfg80211.h |    2 ++
 net/wireless/util.c    |   49 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 56e840d..f760520 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
 <at>  <at>  -563,11 +563,13  <at>  <at>  enum station_info_flags {
  *  <at> RATE_INFO_FLAGS_MCS:  <at> tx_bitrate_mcs filled
  *  <at> RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission
  *  <at> RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
+ *  <at> RATE_INFO_FLAGS_60G: 60gHz MCS
  */
 enum rate_info_flags {
 	RATE_INFO_FLAGS_MCS		= 1<<0,
 	RATE_INFO_FLAGS_40_MHZ_WIDTH	= 1<<1,
 	RATE_INFO_FLAGS_SHORT_GI	= 1<<2,
+	RATE_INFO_FLAGS_60G		= 1<<3,
 };

 /**
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 11188c6..4fe1766 100644
--- a/net/wireless/util.c
(Continue reading)

Vladimir Kondratiev | 1 Jul 2012 08:45
Favicon

[PATCH 60g v1 3/5] wireless: regulatory for 60g

Add regulatory rule for the 60g band

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@...>
---
 net/wireless/reg.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index baf5704..b2b3222 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
 <at>  <at>  -129,7 +129,7  <at>  <at>  static DECLARE_DELAYED_WORK(reg_timeout, reg_timeout_work);

 /* We keep a static world regulatory domain in case of the absence of CRDA */
 static const struct ieee80211_regdomain world_regdom = {
-	.n_reg_rules = 5,
+	.n_reg_rules = 6,
 	.alpha2 =  "00",
 	.reg_rules = {
 		/* IEEE 802.11b/g, channels 1..11 */
 <at>  <at>  -156,6 +156,9  <at>  <at>  static const struct ieee80211_regdomain world_regdom = {
 		REG_RULE(5745-10, 5825+10, 40, 6, 20,
 			NL80211_RRF_PASSIVE_SCAN |
 			NL80211_RRF_NO_IBSS),
+
+		/* IEEE 802.11ad (60gHz), channels 1..3 */
+		REG_RULE(56160+2160*1-1080, 56160+2160*3+1080, 2160, 0, 0, 0),
 	}
 };

(Continue reading)

Johannes Berg | 1 Jul 2012 13:23
Favicon

Re: [PATCH 60g v1 0/5] Infrastructure for 60g (802.11ad)

On Sun, 2012-07-01 at 09:45 +0300, Vladimir Kondratiev wrote:
> These patches add minimal infrastructure for the 60gHz (802.11ad)
> band WiFi drivers.
> 
> This change enables offload drivers for the 60GHz devices that implement
> the 802.11 MAC functionality in the device itself.
> 
> Addressed comments form Johannes Berg. Since no significant issues raised,
> change it from RFC to PATCH.

Please fix indentation better :-)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Vladimir Kondratiev | 1 Jul 2012 18:28

Re: [PATCH 60g v1 0/5] Infrastructure for 60g (802.11ad)

On Sunday, July 01, 2012 01:23:28 PM Johannes Berg wrote:
> 
> Please fix indentation better :-)
> 
> johannes

I am confused a bit. What is "proper" identation for this case?
Immediately following code idents with 4 spaces:

                if (cfg80211_disable_40mhz_24ghz &&
                    band == IEEE80211_BAND_2GHZ &&
                    sband->ht_cap.ht_supported) {
                        sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
                        sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
                }

This is what I did initially, to comply with surrounding code style.
Fragment in question is:

		if (WARN_ON((band != IEEE80211_BAND_60GHZ) &&
				!sband->n_bitrates))
			return -EINVAL;

Should I ident line containing
!sband->n_bitrates))
with:
 - 4 spaces as next code fragment,
 - one tab (same level as 'return')
 - 2 tabs (one level more then 'return')
 - other (what?)
(Continue reading)

Joe Perches | 1 Jul 2012 18:55

Re: [PATCH 60g v1 0/5] Infrastructure for 60g (802.11ad)

On Sun, 2012-07-01 at 19:28 +0300, Vladimir Kondratiev wrote:
> On Sunday, July 01, 2012 01:23:28 PM Johannes Berg wrote:
> > Please fix indentation better :-)
> I am confused a bit. What is "proper" identation for this case?
> Immediately following code idents with 4 spaces:
> 
>                 if (cfg80211_disable_40mhz_24ghz &&
>                     band == IEEE80211_BAND_2GHZ &&
>                     sband->ht_cap.ht_supported) {
>                         sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
>                         sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
>                 }

Yes.

> This is what I did initially, to comply with surrounding code style.
> Fragment in question is:
> 
> 		if (WARN_ON((band != IEEE80211_BAND_60GHZ) &&
> 				!sband->n_bitrates))
> 			return -EINVAL;
> 
> 
> Should I ident line containing
> !sband->n_bitrates))
> with:
>  - 4 spaces as next code fragment,
>  - one tab (same level as 'return')
>  - 2 tabs (one level more then 'return')
>  - other (what?)
(Continue reading)


Gmane