Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Rostislav Lisovy
On Mon, 2014-06-23 at 16:46 +0200, Felix Fietkau wrote:
> On 2014-06-23 16:38, Rostislav Lisovy wrote:
> > On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
> >> On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
> >> > On 2014-06-23 11:08, Johannes Berg wrote:
> >> > > On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
> >> > >> On 2014-04-15 14:37, Rostislav Lisovy wrote:
> >> > >> > Current code checks if the 20MHz bandwidth is allowed for
> >> > >> > particular channel -- if it is not, the channel is disabled.
> >> > >> > Since we need to use 5/10 MHz channels, this code is modified in
> >> > >> > the way that the default bandwidth to check is 5MHz. If the
> >> > >> > maximum bandwidth allowed by the channel is smaller than 5MHz,
> >> > >> > the channel is disabled. Otherwise the channel is used and the
> >> > >> > flags are set according to the bandwidth allowed by the channel.
> >> > >> > 
> >> > >> > Signed-off-by: Rostislav Lisovy 
> >> > > 
> >> > >> This change causes a regression and needs to be reverted or fixed.
> >> > > 
> >> > > Noted, I've reverted it in mac80211.git.
> >> > > 
> >> > >> It leaves Channel 12 enabled for US regdomain and does not prevent
> >> > >> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
> >> > > 
> >> > > I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
> >> > > channel? It should be disabled for other reasons for AP mode - e.g.
> >> > > NO_IR.
> >> > I was thinking it could be valid in AP mode for 5 MHz operation.
> >> 
> >> Huh, ok, maybe. I guess Rostislav can look into the details :)
> >> 
> > 
> > I am a bit confused right now. The regression is that the channel used
> > to be completely disabled and now it is not? The regulatory restrictions
> > prohibit the 20MHz BW for this channel but 5MHz BW is alright?
> Correct. The matching rule is this:
> (2402 - 2472 @ 40), (N/A, 30), (N/A)
> 
> Channel 11 (2462 MHz) is allowed, because 2472 MHz is below the limit.
> Channel 12 (2467 MHz) is not allowed, because 2477 MHz is too high.
> 
> With your change, Channel 12 was enabled and usable for AP mode.

Thank you Felix, this makes sense.

I think the issue is the call
  bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(5));
which checks if "2467 + 5" is equal or less than 2472 (which indeed is),
when the result is true, the maximum allowed BW (max_bandwidth_khz) is
wrongly used on that particular channel.

I hope I will send a fix on Friday.

Rostislav;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Felix Fietkau
On 2014-06-23 16:38, Rostislav Lisovy wrote:
> On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
>> On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
>> > On 2014-06-23 11:08, Johannes Berg wrote:
>> > > On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
>> > >> On 2014-04-15 14:37, Rostislav Lisovy wrote:
>> > >> > Current code checks if the 20MHz bandwidth is allowed for
>> > >> > particular channel -- if it is not, the channel is disabled.
>> > >> > Since we need to use 5/10 MHz channels, this code is modified in
>> > >> > the way that the default bandwidth to check is 5MHz. If the
>> > >> > maximum bandwidth allowed by the channel is smaller than 5MHz,
>> > >> > the channel is disabled. Otherwise the channel is used and the
>> > >> > flags are set according to the bandwidth allowed by the channel.
>> > >> > 
>> > >> > Signed-off-by: Rostislav Lisovy 
>> > > 
>> > >> This change causes a regression and needs to be reverted or fixed.
>> > > 
>> > > Noted, I've reverted it in mac80211.git.
>> > > 
>> > >> It leaves Channel 12 enabled for US regdomain and does not prevent
>> > >> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
>> > > 
>> > > I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
>> > > channel? It should be disabled for other reasons for AP mode - e.g.
>> > > NO_IR.
>> > I was thinking it could be valid in AP mode for 5 MHz operation.
>> 
>> Huh, ok, maybe. I guess Rostislav can look into the details :)
>> 
> 
> I am a bit confused right now. The regression is that the channel used
> to be completely disabled and now it is not? The regulatory restrictions
> prohibit the 20MHz BW for this channel but 5MHz BW is alright?
Correct. The matching rule is this:
(2402 - 2472 @ 40), (N/A, 30), (N/A)

Channel 11 (2462 MHz) is allowed, because 2472 MHz is below the limit.
Channel 12 (2467 MHz) is not allowed, because 2477 MHz is too high.

With your change, Channel 12 was enabled and usable for AP mode.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Rostislav Lisovy
On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
> On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
> > On 2014-06-23 11:08, Johannes Berg wrote:
> > > On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
> > >> On 2014-04-15 14:37, Rostislav Lisovy wrote:
> > >> > Current code checks if the 20MHz bandwidth is allowed for
> > >> > particular channel -- if it is not, the channel is disabled.
> > >> > Since we need to use 5/10 MHz channels, this code is modified in
> > >> > the way that the default bandwidth to check is 5MHz. If the
> > >> > maximum bandwidth allowed by the channel is smaller than 5MHz,
> > >> > the channel is disabled. Otherwise the channel is used and the
> > >> > flags are set according to the bandwidth allowed by the channel.
> > >> > 
> > >> > Signed-off-by: Rostislav Lisovy 
> > > 
> > >> This change causes a regression and needs to be reverted or fixed.
> > > 
> > > Noted, I've reverted it in mac80211.git.
> > > 
> > >> It leaves Channel 12 enabled for US regdomain and does not prevent
> > >> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
> > > 
> > > I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
> > > channel? It should be disabled for other reasons for AP mode - e.g.
> > > NO_IR.
> > I was thinking it could be valid in AP mode for 5 MHz operation.
> 
> Huh, ok, maybe. I guess Rostislav can look into the details :)
> 

I am a bit confused right now. The regression is that the channel used
to be completely disabled and now it is not? The regulatory restrictions
prohibit the 20MHz BW for this channel but 5MHz BW is alright?

(I am out of office for the next few days, thus I am unfortunately
unable to write/test any code.)

Rostislav;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Johannes Berg
On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
> On 2014-06-23 11:08, Johannes Berg wrote:
> > On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
> >> On 2014-04-15 14:37, Rostislav Lisovy wrote:
> >> > Current code checks if the 20MHz bandwidth is allowed for
> >> > particular channel -- if it is not, the channel is disabled.
> >> > Since we need to use 5/10 MHz channels, this code is modified in
> >> > the way that the default bandwidth to check is 5MHz. If the
> >> > maximum bandwidth allowed by the channel is smaller than 5MHz,
> >> > the channel is disabled. Otherwise the channel is used and the
> >> > flags are set according to the bandwidth allowed by the channel.
> >> > 
> >> > Signed-off-by: Rostislav Lisovy 
> > 
> >> This change causes a regression and needs to be reverted or fixed.
> > 
> > Noted, I've reverted it in mac80211.git.
> > 
> >> It leaves Channel 12 enabled for US regdomain and does not prevent
> >> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
> > 
> > I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
> > channel? It should be disabled for other reasons for AP mode - e.g.
> > NO_IR.
> I was thinking it could be valid in AP mode for 5 MHz operation.

Huh, ok, maybe. I guess Rostislav can look into the details :)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Felix Fietkau
On 2014-06-23 11:08, Johannes Berg wrote:
> On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
>> On 2014-04-15 14:37, Rostislav Lisovy wrote:
>> > Current code checks if the 20MHz bandwidth is allowed for
>> > particular channel -- if it is not, the channel is disabled.
>> > Since we need to use 5/10 MHz channels, this code is modified in
>> > the way that the default bandwidth to check is 5MHz. If the
>> > maximum bandwidth allowed by the channel is smaller than 5MHz,
>> > the channel is disabled. Otherwise the channel is used and the
>> > flags are set according to the bandwidth allowed by the channel.
>> > 
>> > Signed-off-by: Rostislav Lisovy 
> 
>> This change causes a regression and needs to be reverted or fixed.
> 
> Noted, I've reverted it in mac80211.git.
> 
>> It leaves Channel 12 enabled for US regdomain and does not prevent
>> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
> 
> I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
> channel? It should be disabled for other reasons for AP mode - e.g.
> NO_IR.
I was thinking it could be valid in AP mode for 5 MHz operation.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Johannes Berg
On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
> On 2014-04-15 14:37, Rostislav Lisovy wrote:
> > Current code checks if the 20MHz bandwidth is allowed for
> > particular channel -- if it is not, the channel is disabled.
> > Since we need to use 5/10 MHz channels, this code is modified in
> > the way that the default bandwidth to check is 5MHz. If the
> > maximum bandwidth allowed by the channel is smaller than 5MHz,
> > the channel is disabled. Otherwise the channel is used and the
> > flags are set according to the bandwidth allowed by the channel.
> > 
> > Signed-off-by: Rostislav Lisovy 

> This change causes a regression and needs to be reverted or fixed.

Noted, I've reverted it in mac80211.git.

> It leaves Channel 12 enabled for US regdomain and does not prevent
> bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).

I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
channel? It should be disabled for other reasons for AP mode - e.g.
NO_IR.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Rostislav Lisovy
On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
 On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
  On 2014-06-23 11:08, Johannes Berg wrote:
   On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
   On 2014-04-15 14:37, Rostislav Lisovy wrote:
Current code checks if the 20MHz bandwidth is allowed for
particular channel -- if it is not, the channel is disabled.
Since we need to use 5/10 MHz channels, this code is modified in
the way that the default bandwidth to check is 5MHz. If the
maximum bandwidth allowed by the channel is smaller than 5MHz,
the channel is disabled. Otherwise the channel is used and the
flags are set according to the bandwidth allowed by the channel.

Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz
   
   This change causes a regression and needs to be reverted or fixed.
   
   Noted, I've reverted it in mac80211.git.
   
   It leaves Channel 12 enabled for US regdomain and does not prevent
   bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
   
   I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
   channel? It should be disabled for other reasons for AP mode - e.g.
   NO_IR.
  I was thinking it could be valid in AP mode for 5 MHz operation.
 
 Huh, ok, maybe. I guess Rostislav can look into the details :)
 

I am a bit confused right now. The regression is that the channel used
to be completely disabled and now it is not? The regulatory restrictions
prohibit the 20MHz BW for this channel but 5MHz BW is alright?

(I am out of office for the next few days, thus I am unfortunately
unable to write/test any code.)

Rostislav;

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Felix Fietkau
On 2014-06-23 16:38, Rostislav Lisovy wrote:
 On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
 On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
  On 2014-06-23 11:08, Johannes Berg wrote:
   On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
   On 2014-04-15 14:37, Rostislav Lisovy wrote:
Current code checks if the 20MHz bandwidth is allowed for
particular channel -- if it is not, the channel is disabled.
Since we need to use 5/10 MHz channels, this code is modified in
the way that the default bandwidth to check is 5MHz. If the
maximum bandwidth allowed by the channel is smaller than 5MHz,
the channel is disabled. Otherwise the channel is used and the
flags are set according to the bandwidth allowed by the channel.

Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz
   
   This change causes a regression and needs to be reverted or fixed.
   
   Noted, I've reverted it in mac80211.git.
   
   It leaves Channel 12 enabled for US regdomain and does not prevent
   bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
   
   I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
   channel? It should be disabled for other reasons for AP mode - e.g.
   NO_IR.
  I was thinking it could be valid in AP mode for 5 MHz operation.
 
 Huh, ok, maybe. I guess Rostislav can look into the details :)
 
 
 I am a bit confused right now. The regression is that the channel used
 to be completely disabled and now it is not? The regulatory restrictions
 prohibit the 20MHz BW for this channel but 5MHz BW is alright?
Correct. The matching rule is this:
(2402 - 2472 @ 40), (N/A, 30), (N/A)

Channel 11 (2462 MHz) is allowed, because 2472 MHz is below the limit.
Channel 12 (2467 MHz) is not allowed, because 2477 MHz is too high.

With your change, Channel 12 was enabled and usable for AP mode.

- Felix
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Rostislav Lisovy
On Mon, 2014-06-23 at 16:46 +0200, Felix Fietkau wrote:
 On 2014-06-23 16:38, Rostislav Lisovy wrote:
  On Mon, 2014-06-23 at 12:05 +0200, Johannes Berg wrote:
  On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
   On 2014-06-23 11:08, Johannes Berg wrote:
On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
On 2014-04-15 14:37, Rostislav Lisovy wrote:
 Current code checks if the 20MHz bandwidth is allowed for
 particular channel -- if it is not, the channel is disabled.
 Since we need to use 5/10 MHz channels, this code is modified in
 the way that the default bandwidth to check is 5MHz. If the
 maximum bandwidth allowed by the channel is smaller than 5MHz,
 the channel is disabled. Otherwise the channel is used and the
 flags are set according to the bandwidth allowed by the channel.
 
 Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz

This change causes a regression and needs to be reverted or fixed.

Noted, I've reverted it in mac80211.git.

It leaves Channel 12 enabled for US regdomain and does not prevent
bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).

I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
channel? It should be disabled for other reasons for AP mode - e.g.
NO_IR.
   I was thinking it could be valid in AP mode for 5 MHz operation.
  
  Huh, ok, maybe. I guess Rostislav can look into the details :)
  
  
  I am a bit confused right now. The regression is that the channel used
  to be completely disabled and now it is not? The regulatory restrictions
  prohibit the 20MHz BW for this channel but 5MHz BW is alright?
 Correct. The matching rule is this:
 (2402 - 2472 @ 40), (N/A, 30), (N/A)
 
 Channel 11 (2462 MHz) is allowed, because 2472 MHz is below the limit.
 Channel 12 (2467 MHz) is not allowed, because 2477 MHz is too high.
 
 With your change, Channel 12 was enabled and usable for AP mode.

Thank you Felix, this makes sense.

I think the issue is the call
  bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(5));
which checks if 2467 + 5 is equal or less than 2472 (which indeed is),
when the result is true, the maximum allowed BW (max_bandwidth_khz) is
wrongly used on that particular channel.

I hope I will send a fix on Friday.

Rostislav;


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Johannes Berg
On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
 On 2014-04-15 14:37, Rostislav Lisovy wrote:
  Current code checks if the 20MHz bandwidth is allowed for
  particular channel -- if it is not, the channel is disabled.
  Since we need to use 5/10 MHz channels, this code is modified in
  the way that the default bandwidth to check is 5MHz. If the
  maximum bandwidth allowed by the channel is smaller than 5MHz,
  the channel is disabled. Otherwise the channel is used and the
  flags are set according to the bandwidth allowed by the channel.
  
  Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz

 This change causes a regression and needs to be reverted or fixed.

Noted, I've reverted it in mac80211.git.

 It leaves Channel 12 enabled for US regdomain and does not prevent
 bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).

I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
channel? It should be disabled for other reasons for AP mode - e.g.
NO_IR.

johannes

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Felix Fietkau
On 2014-06-23 11:08, Johannes Berg wrote:
 On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
 On 2014-04-15 14:37, Rostislav Lisovy wrote:
  Current code checks if the 20MHz bandwidth is allowed for
  particular channel -- if it is not, the channel is disabled.
  Since we need to use 5/10 MHz channels, this code is modified in
  the way that the default bandwidth to check is 5MHz. If the
  maximum bandwidth allowed by the channel is smaller than 5MHz,
  the channel is disabled. Otherwise the channel is used and the
  flags are set according to the bandwidth allowed by the channel.
  
  Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz
 
 This change causes a regression and needs to be reverted or fixed.
 
 Noted, I've reverted it in mac80211.git.
 
 It leaves Channel 12 enabled for US regdomain and does not prevent
 bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
 
 I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
 channel? It should be disabled for other reasons for AP mode - e.g.
 NO_IR.
I was thinking it could be valid in AP mode for 5 MHz operation.

- Felix
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-23 Thread Johannes Berg
On Mon, 2014-06-23 at 12:04 +0200, Felix Fietkau wrote:
 On 2014-06-23 11:08, Johannes Berg wrote:
  On Sun, 2014-06-22 at 13:41 +0200, Felix Fietkau wrote:
  On 2014-04-15 14:37, Rostislav Lisovy wrote:
   Current code checks if the 20MHz bandwidth is allowed for
   particular channel -- if it is not, the channel is disabled.
   Since we need to use 5/10 MHz channels, this code is modified in
   the way that the default bandwidth to check is 5MHz. If the
   maximum bandwidth allowed by the channel is smaller than 5MHz,
   the channel is disabled. Otherwise the channel is used and the
   flags are set according to the bandwidth allowed by the channel.
   
   Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz
  
  This change causes a regression and needs to be reverted or fixed.
  
  Noted, I've reverted it in mac80211.git.
  
  It leaves Channel 12 enabled for US regdomain and does not prevent
  bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).
  
  I'm not sure this makes sense - CHAN_NO_20MHZ shouldn't get set on that
  channel? It should be disabled for other reasons for AP mode - e.g.
  NO_IR.
 I was thinking it could be valid in AP mode for 5 MHz operation.

Huh, ok, maybe. I guess Rostislav can look into the details :)

johannes

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-22 Thread Felix Fietkau
On 2014-04-15 14:37, Rostislav Lisovy wrote:
> Current code checks if the 20MHz bandwidth is allowed for
> particular channel -- if it is not, the channel is disabled.
> Since we need to use 5/10 MHz channels, this code is modified in
> the way that the default bandwidth to check is 5MHz. If the
> maximum bandwidth allowed by the channel is smaller than 5MHz,
> the channel is disabled. Otherwise the channel is used and the
> flags are set according to the bandwidth allowed by the channel.
> 
> Signed-off-by: Rostislav Lisovy 
This change causes a regression and needs to be reverted or fixed.
It leaves Channel 12 enabled for US regdomain and does not prevent
bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).

I think the main problem with this change is that max_bandwidth_khz
(which is used to derive the no-10mhz and no-20mhz flags) does not
consider the frequency when calculating the max bandwidth.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cfg80211: Use 5MHz bandwidth by default when checking usable channels

2014-06-22 Thread Felix Fietkau
On 2014-04-15 14:37, Rostislav Lisovy wrote:
 Current code checks if the 20MHz bandwidth is allowed for
 particular channel -- if it is not, the channel is disabled.
 Since we need to use 5/10 MHz channels, this code is modified in
 the way that the default bandwidth to check is 5MHz. If the
 maximum bandwidth allowed by the channel is smaller than 5MHz,
 the channel is disabled. Otherwise the channel is used and the
 flags are set according to the bandwidth allowed by the channel.
 
 Signed-off-by: Rostislav Lisovy rostislav.lis...@fel.cvut.cz
This change causes a regression and needs to be reverted or fixed.
It leaves Channel 12 enabled for US regdomain and does not prevent
bringing up AP mode on it (IEEE80211_CHAN_NO_20MHZ does not get set).

I think the main problem with this change is that max_bandwidth_khz
(which is used to derive the no-10mhz and no-20mhz flags) does not
consider the frequency when calculating the max bandwidth.

- Felix
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/