linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: adapt slot time in IBSS mode
@ 2012-12-03 21:21 Simon Wunderlich
  2012-12-03 23:00 ` Julian Calaby
  2012-12-04 14:54 ` Johannes Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Wunderlich @ 2012-12-03 21:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes, Simon Wunderlich, Mathias Kretschmer

In 5GHz/802.11a, we are allowed to use short slot times. Doing this
may increases performance by 20% for legacy connections (54 MBit/s).
I can confirm this in my tests (27% more throughput using iperf), and
also have a small positive effect (5% more throughput) for HT rates,
tested on 1 stream.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
 net/mac80211/ibss.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index fa862b2..1a5d29c 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -201,6 +201,19 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	bss_change |= BSS_CHANGED_BASIC_RATES;
 	bss_change |= BSS_CHANGED_HT;
 	bss_change |= BSS_CHANGED_IBSS;
+
+	/* In 5 GHz/802.11a, we can always use short slot time.
+	 * (IEEE 802.11-2012 18.3.8.7)
+	 *
+	 * In 2.4GHz, we must always use long slots in IBSS for compatibility
+	 * reasons.
+	 * (IEEE 802.11-2012 19.4.5)
+	 *
+	 * HT follows these specifications (IEEE 802.11-2012 20.3.18)
+	 */
+	sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
+	bss_change |= BSS_CHANGED_ERP_SLOT;
+
 	sdata->vif.bss_conf.ibss_joined = true;
 	sdata->vif.bss_conf.ibss_creator = creator;
 	ieee80211_bss_info_change_notify(sdata, bss_change);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: adapt slot time in IBSS mode
  2012-12-03 21:21 [PATCH] mac80211: adapt slot time in IBSS mode Simon Wunderlich
@ 2012-12-03 23:00 ` Julian Calaby
  2012-12-04  8:08   ` Nicolas Cavallari
  2012-12-04 10:42   ` Simon Wunderlich
  2012-12-04 14:54 ` Johannes Berg
  1 sibling, 2 replies; 6+ messages in thread
From: Julian Calaby @ 2012-12-03 23:00 UTC (permalink / raw)
  To: Simon Wunderlich
  Cc: linux-wireless, linville, johannes, Simon Wunderlich,
	Mathias Kretschmer

Hi Simon,

On Tue, Dec 4, 2012 at 8:21 AM, Simon Wunderlich
<simon.wunderlich@s2003.tu-chemnitz.de> wrote:
> In 5GHz/802.11a, we are allowed to use short slot times. Doing this
> may increases performance by 20% for legacy connections (54 MBit/s).
> I can confirm this in my tests (27% more throughput using iperf), and
> also have a small positive effect (5% more throughput) for HT rates,
> tested on 1 stream.
>
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
> ---
>  net/mac80211/ibss.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index fa862b2..1a5d29c 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -201,6 +201,19 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>         bss_change |= BSS_CHANGED_BASIC_RATES;
>         bss_change |= BSS_CHANGED_HT;
>         bss_change |= BSS_CHANGED_IBSS;
> +
> +       /* In 5 GHz/802.11a, we can always use short slot time.
> +        * (IEEE 802.11-2012 18.3.8.7)
> +        *
> +        * In 2.4GHz, we must always use long slots in IBSS for compatibility
> +        * reasons.
> +        * (IEEE 802.11-2012 19.4.5)
> +        *
> +        * HT follows these specifications (IEEE 802.11-2012 20.3.18)
> +        */
> +       sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
> +       bss_change |= BSS_CHANGED_ERP_SLOT;
> +

I don't know if this is done elsewhere, but this code doesn't match
the comment - there is no test for IBSS mode.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: adapt slot time in IBSS mode
  2012-12-03 23:00 ` Julian Calaby
@ 2012-12-04  8:08   ` Nicolas Cavallari
  2012-12-04 22:07     ` Julian Calaby
  2012-12-04 10:42   ` Simon Wunderlich
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Cavallari @ 2012-12-04  8:08 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Simon Wunderlich, linux-wireless, linville, johannes,
	Simon Wunderlich, Mathias Kretschmer

On 04/12/2012 00:00, Julian Calaby wrote:
> Hi Simon,
> 
> On Tue, Dec 4, 2012 at 8:21 AM, Simon Wunderlich
> <simon.wunderlich@s2003.tu-chemnitz.de> wrote:
>> In 5GHz/802.11a, we are allowed to use short slot times. Doing this
>> may increases performance by 20% for legacy connections (54 MBit/s).
>> I can confirm this in my tests (27% more throughput using iperf), and
>> also have a small positive effect (5% more throughput) for HT rates,
>> tested on 1 stream.
>>
>> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
>> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
>> ---
>>  net/mac80211/ibss.c |   13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
>> index fa862b2..1a5d29c 100644
>> --- a/net/mac80211/ibss.c
>> +++ b/net/mac80211/ibss.c
>> @@ -201,6 +201,19 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>>         bss_change |= BSS_CHANGED_BASIC_RATES;
>>         bss_change |= BSS_CHANGED_HT;
>>         bss_change |= BSS_CHANGED_IBSS;
>> +
>> +       /* In 5 GHz/802.11a, we can always use short slot time.
>> +        * (IEEE 802.11-2012 18.3.8.7)
>> +        *
>> +        * In 2.4GHz, we must always use long slots in IBSS for compatibility
>> +        * reasons.
>> +        * (IEEE 802.11-2012 19.4.5)
>> +        *
>> +        * HT follows these specifications (IEEE 802.11-2012 20.3.18)
>> +        */
>> +       sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
>> +       bss_change |= BSS_CHANGED_ERP_SLOT;
>> +
> 
> I don't know if this is done elsewhere, but this code doesn't match
> the comment - there is no test for IBSS mode.
> 
> Thanks,
> 

Do you happen to know any code path that calls
__ieee80211_sta_join_ibss() without being in IBSS mode ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: adapt slot time in IBSS mode
  2012-12-03 23:00 ` Julian Calaby
  2012-12-04  8:08   ` Nicolas Cavallari
@ 2012-12-04 10:42   ` Simon Wunderlich
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Wunderlich @ 2012-12-04 10:42 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Simon Wunderlich, linux-wireless, linville, johannes,
	Simon Wunderlich, Mathias Kretschmer

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hey Julian,

On Tue, Dec 04, 2012 at 10:00:33AM +1100, Julian Calaby wrote:
> 
> I don't know if this is done elsewhere, but this code doesn't match
> the comment - there is no test for IBSS mode.

As Nicolas pointed out, this is only called in IBSS - it is part of the
ibss join/initialization code, so this is not a problem. :)

Cheers,
	Simon

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: adapt slot time in IBSS mode
  2012-12-03 21:21 [PATCH] mac80211: adapt slot time in IBSS mode Simon Wunderlich
  2012-12-03 23:00 ` Julian Calaby
@ 2012-12-04 14:54 ` Johannes Berg
  1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2012-12-04 14:54 UTC (permalink / raw)
  To: Simon Wunderlich
  Cc: linux-wireless, linville, Simon Wunderlich, Mathias Kretschmer

On Mon, 2012-12-03 at 22:21 +0100, Simon Wunderlich wrote:
> In 5GHz/802.11a, we are allowed to use short slot times. Doing this
> may increases performance by 20% for legacy connections (54 MBit/s).
> I can confirm this in my tests (27% more throughput using iperf), and
> also have a small positive effect (5% more throughput) for HT rates,
> tested on 1 stream.

Applied.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mac80211: adapt slot time in IBSS mode
  2012-12-04  8:08   ` Nicolas Cavallari
@ 2012-12-04 22:07     ` Julian Calaby
  0 siblings, 0 replies; 6+ messages in thread
From: Julian Calaby @ 2012-12-04 22:07 UTC (permalink / raw)
  To: Nicolas Cavallari
  Cc: Simon Wunderlich, linux-wireless, linville, johannes,
	Simon Wunderlich, Mathias Kretschmer

Hi Nicolas,

On Tue, Dec 4, 2012 at 7:08 PM, Nicolas Cavallari
<Nicolas.Cavallari@lri.fr> wrote:
> On 04/12/2012 00:00, Julian Calaby wrote:
>> Hi Simon,
>>
>> On Tue, Dec 4, 2012 at 8:21 AM, Simon Wunderlich
>> <simon.wunderlich@s2003.tu-chemnitz.de> wrote:
>>> In 5GHz/802.11a, we are allowed to use short slot times. Doing this
>>> may increases performance by 20% for legacy connections (54 MBit/s).
>>> I can confirm this in my tests (27% more throughput using iperf), and
>>> also have a small positive effect (5% more throughput) for HT rates,
>>> tested on 1 stream.
>>>
>>> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
>>> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
>>> ---
>>>  net/mac80211/ibss.c |   13 +++++++++++++
>>>  1 file changed, 13 insertions(+)
>>>
>>> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
>>> index fa862b2..1a5d29c 100644
>>> --- a/net/mac80211/ibss.c
>>> +++ b/net/mac80211/ibss.c
>>> @@ -201,6 +201,19 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>>>         bss_change |= BSS_CHANGED_BASIC_RATES;
>>>         bss_change |= BSS_CHANGED_HT;
>>>         bss_change |= BSS_CHANGED_IBSS;
>>> +
>>> +       /* In 5 GHz/802.11a, we can always use short slot time.
>>> +        * (IEEE 802.11-2012 18.3.8.7)
>>> +        *
>>> +        * In 2.4GHz, we must always use long slots in IBSS for compatibility
>>> +        * reasons.
>>> +        * (IEEE 802.11-2012 19.4.5)
>>> +        *
>>> +        * HT follows these specifications (IEEE 802.11-2012 20.3.18)
>>> +        */
>>> +       sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
>>> +       bss_change |= BSS_CHANGED_ERP_SLOT;
>>> +
>>
>> I don't know if this is done elsewhere, but this code doesn't match
>> the comment - there is no test for IBSS mode.
>>
>> Thanks,
>>
>
> Do you happen to know any code path that calls
> __ieee80211_sta_join_ibss() without being in IBSS mode ?

Groan.

I clearly need to read patches better.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-04 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 21:21 [PATCH] mac80211: adapt slot time in IBSS mode Simon Wunderlich
2012-12-03 23:00 ` Julian Calaby
2012-12-04  8:08   ` Nicolas Cavallari
2012-12-04 22:07     ` Julian Calaby
2012-12-04 10:42   ` Simon Wunderlich
2012-12-04 14:54 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).