* [PATCH 1/2] mac80211: add MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig option @ 2008-06-18 14:53 Tomas Winkler 2008-06-18 14:53 ` [PATCH 2/2] mac80211: add spectrum capabilities Tomas Winkler 0 siblings, 1 reply; 8+ messages in thread From: Tomas Winkler @ 2008-06-18 14:53 UTC (permalink / raw) To: linville, johannes, yi.zhu; +Cc: linux-wireless From: Yi Zhu <yi.zhu@intel.com> The patch introduces MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig option to suppress Spectrum Management 802.11h related debug logs. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- net/mac80211/Kconfig | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 590e00b..979fcec 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig @@ -177,3 +177,10 @@ config MAC80211_VERBOSE_MPL_DEBUG ---help--- Say Y here to print out verbose mesh peer link debug messages. + +config MAC80211_VERBOSE_SPECT_MGMT_DEBUG + bool "Verbose Spectrum Management (IEEE 802.11h)debugging" + depends on MAC80211_DEBUG + ---help--- + Say Y here to print out verbose Spectrum Management (IEEE 802.11h) + debug messages. -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 14:53 [PATCH 1/2] mac80211: add MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig option Tomas Winkler @ 2008-06-18 14:53 ` Tomas Winkler 2008-06-18 15:37 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Tomas Winkler @ 2008-06-18 14:53 UTC (permalink / raw) To: linville, johannes, yi.zhu; +Cc: linux-wireless, Tomas Winkler This patch add spectrum capability and required information elements to association request providing AP has requested it and it is supported by the driver Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> --- include/net/mac80211.h | 5 +++++ net/mac80211/mlme.c | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7ab4ff6..6178c32 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -705,6 +705,10 @@ enum ieee80211_tkip_key_type { * @IEEE80211_HW_NOISE_DBM: * Hardware can provide noise (radio interference) values in units dBm, * decibel difference from one milliwatt. + * + * @IEEE80211_HW_SPECTRUM_MGMT: + * Hardware supports spectrum management defined in 802.11h + * Measurement, Channel Switch, Quieting, TPC */ enum ieee80211_hw_flags { IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE = 1<<0, @@ -716,6 +720,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_SIGNAL_DB = 1<<6, IEEE80211_HW_SIGNAL_DBM = 1<<7, IEEE80211_HW_NOISE_DBM = 1<<8, + IEEE80211_HW_SPECTRUM_MGMT = 1<<9, }; /** diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 0b79d92..bfd0919 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -747,6 +747,10 @@ static void ieee80211_send_assoc(struct net_device *dev, * b-only mode) */ rates_len = ieee80211_compatible_rates(bss, sband, &rates); + if ((bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && + (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT)) + capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; + ieee80211_rx_bss_put(dev, bss); } else { rates = ~0; @@ -814,6 +818,26 @@ static void ieee80211_send_assoc(struct net_device *dev, } } + if (capab & WLAN_CAPABILITY_SPECTRUM_MGMT) { + /* 1. power capabilities */ + pos = skb_put(skb, 4); + *pos++ = WLAN_EID_PWR_CAPABILITY; + *pos++ = 2; + *pos++ = 0; /* min tx power */ + *pos++ = local->hw.conf.channel->max_power; /* max tx power */ + + /* 2. supported channels */ + /* TODO: get this in reg domain format */ + pos = skb_put(skb, 2 * sband->n_channels + 2); + *pos++ = WLAN_EID_SUPPORTED_CHANNELS; + *pos++ = 2 * sband->n_channels; + for (i = 0; i < sband->n_channels; i++) { + *pos++ = ieee80211_frequency_to_channel( + sband->channels[i].center_freq); + *pos++ = 1; /* one channel in the subband*/ + } + } + if (ifsta->extra_ie) { pos = skb_put(skb, ifsta->extra_ie_len); memcpy(pos, ifsta->extra_ie, ifsta->extra_ie_len); -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 14:53 ` [PATCH 2/2] mac80211: add spectrum capabilities Tomas Winkler @ 2008-06-18 15:37 ` Johannes Berg 2008-06-18 16:17 ` Tomas Winkler 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2008-06-18 15:37 UTC (permalink / raw) To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless [-- Attachment #1: Type: text/plain, Size: 989 bytes --] On Wed, 2008-06-18 at 17:53 +0300, Tomas Winkler wrote: > This patch add spectrum capability and required information > elements to association request providing AP has requested it and > it is supported by the driver Why bother splitting this up into two patches, the Kconfig option isn't even being used? > + if ((bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && > + (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT)) > + capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; Why do we need a hardware capability flag for this? The only thing you seem to be doing with it is determine whether to send the power capability IE? Will you follow up with more patches to enable radar detection and things like that, and shouldn't we merge that as one series? This looks sane enough, but it seems hard to judge whether or not it's actually the best way to do things. What else will depend on the hw capability flag? [and yes, I should read 11h/-2007 again] johannes [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 15:37 ` Johannes Berg @ 2008-06-18 16:17 ` Tomas Winkler 2008-06-18 17:23 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Tomas Winkler @ 2008-06-18 16:17 UTC (permalink / raw) To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless On Wed, Jun 18, 2008 at 6:37 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > On Wed, 2008-06-18 at 17:53 +0300, Tomas Winkler wrote: >> This patch add spectrum capability and required information >> elements to association request providing AP has requested it and >> it is supported by the driver > > Why bother splitting this up into two patches, the Kconfig option isn't > even being used? It will be. >> + if ((bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) && >> + (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT)) >> + capab |= WLAN_CAPABILITY_SPECTRUM_MGMT; > > Why do we need a hardware capability flag for this? The only thing you > seem to be doing with it is determine whether to send the power > capability IE? > Will you follow up with more patches to enable radar detection and > things like that, and shouldn't we merge that as one series? This looks > sane enough, but it seems hard to judge whether or not it's actually the > best way to do things. > > What else will depend on the hw capability flag? > We need driver support mainly for quiet period and channel switch.(patches will follow) Not sure how the precise timing will be handled in mac80211. So we don't advertise spectrum capability to AP if we cannot handle 11h actions. Don't mind that this will be applied as series. Just sending this out to get some feedback on the way maybe I should mark them as RFCs Thanks for review Tomas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 16:17 ` Tomas Winkler @ 2008-06-18 17:23 ` Johannes Berg 2008-06-18 21:11 ` Tomas Winkler 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2008-06-18 17:23 UTC (permalink / raw) To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless [-- Attachment #1: Type: text/plain, Size: 640 bytes --] > We need driver support mainly for quiet period and channel > switch.(patches will follow) > Not sure how the precise timing will be handled in mac80211. So we > don't advertise spectrum capability to AP if we cannot handle 11h > actions. Channel switch is interesting. Do you actually handle that in firmware? Most drivers don't. Also, does your firmware implement full radar detection? Broadcom and Atheros hardware seem to only pass information about pulse edges up to the driver (in different ways, obviously) and pulse/radar detection needs to be done in software, I'd like that to be somehow shareable. johannes [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 17:23 ` Johannes Berg @ 2008-06-18 21:11 ` Tomas Winkler 2008-06-18 21:17 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Tomas Winkler @ 2008-06-18 21:11 UTC (permalink / raw) To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless On Wed, Jun 18, 2008 at 8:23 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > >> We need driver support mainly for quiet period and channel >> switch.(patches will follow) >> Not sure how the precise timing will be handled in mac80211. So we >> don't advertise spectrum capability to AP if we cannot handle 11h >> actions. > > Channel switch is interesting. Do you actually handle that in firmware? > Most drivers don't. Yes, this is handled by firmware, What is important is to make switch on beacon edge. Still our implementation uses also timer in mac rather then some mac to driver over complicated synchronization. Other thing is that the firmware enforce the switching, traffic on the old channel is not allowed after the switch. > > Also, does your firmware implement full radar detection? Broadcom and > Atheros hardware seem to only pass information about pulse edges up to > the driver (in different ways, obviously) and pulse/radar detection > needs to be done in software, I'd like that to be somehow shareable. > iwl drivers were designed for laptop marked mostly unlike like other vendors that plays in AP market so the radar awareness is in slave mode. I think the hw actually support radar detection but I'm not sure it was ever employed in a product. Tomas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 21:11 ` Tomas Winkler @ 2008-06-18 21:17 ` Johannes Berg 2008-06-18 21:58 ` Tomas Winkler 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2008-06-18 21:17 UTC (permalink / raw) To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless [-- Attachment #1: Type: text/plain, Size: 1292 bytes --] > Yes, this is handled by firmware, What is important is to make switch > on beacon edge. > Still our implementation uses also timer in mac rather then some mac > to driver over complicated synchronization. > Other thing is that the firmware enforce the switching, traffic on the > old channel is not allowed after the switch. Yeah, ok. As for enforcing the traffic, true as well. However, I'd like mac80211 to help out with this for those drivers that don't do it all in firmware (all others, I'd assume); it's not overly important that you switch instantly after receiving the switch beacon, if you take a bit longer to do that you'll just potentially miss a few packets. No big deal. > > Also, does your firmware implement full radar detection? Broadcom and > > Atheros hardware seem to only pass information about pulse edges up to > > the driver (in different ways, obviously) and pulse/radar detection > > needs to be done in software, I'd like that to be somehow shareable. > > > iwl drivers were designed for laptop marked mostly unlike like other > vendors that plays in AP market so the radar awareness is in slave > mode. I think the hw actually support radar detection but I'm not sure > it was ever employed in a product. Oh, right, ok. johannes [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mac80211: add spectrum capabilities 2008-06-18 21:17 ` Johannes Berg @ 2008-06-18 21:58 ` Tomas Winkler 0 siblings, 0 replies; 8+ messages in thread From: Tomas Winkler @ 2008-06-18 21:58 UTC (permalink / raw) To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless On Thu, Jun 19, 2008 at 12:17 AM, Johannes Berg <johannes@sipsolutions.net> wrote: > >> Yes, this is handled by firmware, What is important is to make switch >> on beacon edge. >> Still our implementation uses also timer in mac rather then some mac >> to driver over complicated synchronization. >> Other thing is that the firmware enforce the switching, traffic on the >> old channel is not allowed after the switch. > > Yeah, ok. As for enforcing the traffic, true as well. However, I'd like > mac80211 to help out with this for those drivers that don't do it all in > firmware (all others, I'd assume); it's not overly important that you > switch instantly after receiving the switch beacon, if you take a bit > longer to do that you'll just potentially miss a few packets. No big > deal. Sending few packets on the old channel would be the spec violation meaning it will fail the certification if you would be interested in one. Anyhow I hope that our patch takes care of the cases with not supporting fimrware as well. Thanks Tomas ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-18 21:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-06-18 14:53 [PATCH 1/2] mac80211: add MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig option Tomas Winkler 2008-06-18 14:53 ` [PATCH 2/2] mac80211: add spectrum capabilities Tomas Winkler 2008-06-18 15:37 ` Johannes Berg 2008-06-18 16:17 ` Tomas Winkler 2008-06-18 17:23 ` Johannes Berg 2008-06-18 21:11 ` Tomas Winkler 2008-06-18 21:17 ` Johannes Berg 2008-06-18 21:58 ` Tomas Winkler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox