* [PATCH] b43legacy: Partial Fix for Range issue
[not found] ` <200804031719.44026.mb@bu3sch.de>
@ 2008-04-03 18:38 ` Larry Finger
2008-04-03 18:50 ` Michael Buesch
2008-04-03 19:32 ` [PATCH] cfg80211: default to regulatory max power for channel John W. Linville
0 siblings, 2 replies; 6+ messages in thread
From: Larry Finger @ 2008-04-03 18:38 UTC (permalink / raw)
To: John Linville, wireless; +Cc: Michael Buesch, bcm43xx-dev, KURT PETERS
[-- Attachment #1: Type: text/plain, Size: 992 bytes --]
When the mac80211 channel tables were recently changed,
the power_level member was removed. As a result, the value
passed to b43legacy in conf->power_level became zero. This
value is transferred to phy->power_level and used in calculating
the desired TX power, which thus became zero. This patch does not
fix all the power problems with b43legacy, but it will be needed
anyway.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
John,
This is 2.6.25 material.
Larry
Index: wireless-testing/drivers/net/wireless/b43legacy/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43legacy/main.c
+++ wireless-testing/drivers/net/wireless/b43legacy/main.c
@@ -127,6 +127,7 @@ static struct ieee80211_rate __b43legacy
{ \
.center_freq = (_freq), \
.hw_value = (_chanid), \
+ .max_power = 0x14, \
}
static struct ieee80211_channel b43legacy_bg_chantable[] = {
CHANTAB_ENT(1, 2412),
[-- Attachment #2: monitor --]
[-- Type: text/plain, Size: 890 bytes --]
When the mac80211 channel tables were recently changed,
the power_level member was removed. As a result, the value
passed to b43legacy in conf->power_level became zero. This
value is transferred to phy->power_level and used in calculating
the desired power, which thus became zero.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
John,
This is 2.6.25 material.
Larry
Index: wireless-testing/drivers/net/wireless/b43legacy/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43legacy/main.c
+++ wireless-testing/drivers/net/wireless/b43legacy/main.c
@@ -127,6 +127,7 @@ static struct ieee80211_rate __b43legacy
{ \
.center_freq = (_freq), \
.hw_value = (_chanid), \
+ .max_power = 0x14, \
}
static struct ieee80211_channel b43legacy_bg_chantable[] = {
CHANTAB_ENT(1, 2412),
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] b43legacy: Partial Fix for Range issue
2008-04-03 18:38 ` [PATCH] b43legacy: Partial Fix for Range issue Larry Finger
@ 2008-04-03 18:50 ` Michael Buesch
2008-04-03 20:10 ` Larry Finger
2008-04-03 19:32 ` [PATCH] cfg80211: default to regulatory max power for channel John W. Linville
1 sibling, 1 reply; 6+ messages in thread
From: Michael Buesch @ 2008-04-03 18:50 UTC (permalink / raw)
To: bcm43xx-dev; +Cc: Larry Finger, John Linville, wireless, KURT PETERS
On Thursday 03 April 2008 20:38:37 Larry Finger wrote:
> When the mac80211 channel tables were recently changed,
> the power_level member was removed. As a result, the value
> passed to b43legacy in conf->power_level became zero. This
> value is transferred to phy->power_level and used in calculating
> the desired TX power, which thus became zero. This patch does not
> fix all the power problems with b43legacy, but it will be needed
> anyway.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> John,
>
> This is 2.6.25 material.
>
> Larry
>
>
> Index: wireless-testing/drivers/net/wireless/b43legacy/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/b43legacy/main.c
> +++ wireless-testing/drivers/net/wireless/b43legacy/main.c
> @@ -127,6 +127,7 @@ static struct ieee80211_rate __b43legacy
> { \
> .center_freq = (_freq), \
> .hw_value = (_chanid), \
> + .max_power = 0x14, \
> }
> static struct ieee80211_channel b43legacy_bg_chantable[] = {
> CHANTAB_ENT(1, 2412),
>
>
In b43 I set this value to 30.
I dunno what the real HW upper limit is, so I set it so something
that's way above the actual value mac80211 will ever try anyway (because
mac80211 won't try illegal rates, if implemented correctly).
--
Greetings Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] cfg80211: default to regulatory max power for channel
2008-04-03 18:38 ` [PATCH] b43legacy: Partial Fix for Range issue Larry Finger
2008-04-03 18:50 ` Michael Buesch
@ 2008-04-03 19:32 ` John W. Linville
2008-04-03 20:08 ` Michael Buesch
2008-04-03 21:01 ` Larry Finger
1 sibling, 2 replies; 6+ messages in thread
From: John W. Linville @ 2008-04-03 19:32 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, Larry.Finger, mcgrof, John W. Linville
If the driver does not specify a maximum power output, default to the
regulatory max.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Is this a worth alternative to Larry's b43legacy patch? It looked like
ath5k wasn't setting max_power either -- how does it work?
net/wireless/reg.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 8cc6037..185488d 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -136,7 +136,10 @@ static void handle_channel(struct ieee80211_channel *chan,
chan->flags = flags;
chan->max_antenna_gain = min(chan->orig_mag,
rg->max_antenna_gain);
- chan->max_power = min(chan->orig_mpwr, rg->max_power);
+ if (chan->orig_mpwr)
+ chan->max_power = min(chan->orig_mpwr, rg->max_power);
+ else
+ chan->max_power = rg->max_power;
}
static void handle_band(struct ieee80211_supported_band *sband,
--
1.5.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] cfg80211: default to regulatory max power for channel
2008-04-03 19:32 ` [PATCH] cfg80211: default to regulatory max power for channel John W. Linville
@ 2008-04-03 20:08 ` Michael Buesch
2008-04-03 21:01 ` Larry Finger
1 sibling, 0 replies; 6+ messages in thread
From: Michael Buesch @ 2008-04-03 20:08 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, johannes, Larry.Finger, mcgrof
On Thursday 03 April 2008 21:32:54 John W. Linville wrote:
> If the driver does not specify a maximum power output, default to the
> regulatory max.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> Is this a worth alternative to Larry's b43legacy patch? It looked like
Yeah, I like this one much better.
The b43 devices can all be configured up to regulatory limits.
So it doesn't really make sense to define a hardware limit.
And I think we currently don't even know the real HW limit. One might
try to calculate it, but that seems difficult.
> ath5k wasn't setting max_power either -- how does it work?
>
> net/wireless/reg.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 8cc6037..185488d 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -136,7 +136,10 @@ static void handle_channel(struct ieee80211_channel *chan,
> chan->flags = flags;
> chan->max_antenna_gain = min(chan->orig_mag,
> rg->max_antenna_gain);
> - chan->max_power = min(chan->orig_mpwr, rg->max_power);
> + if (chan->orig_mpwr)
> + chan->max_power = min(chan->orig_mpwr, rg->max_power);
> + else
> + chan->max_power = rg->max_power;
> }
>
> static void handle_band(struct ieee80211_supported_band *sband,
--
Greetings Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] b43legacy: Partial Fix for Range issue
2008-04-03 18:50 ` Michael Buesch
@ 2008-04-03 20:10 ` Larry Finger
0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2008-04-03 20:10 UTC (permalink / raw)
To: Michael Buesch; +Cc: bcm43xx-dev, John Linville, wireless, KURT PETERS
Michael Buesch wrote:
>
> In b43 I set this value to 30.
> I dunno what the real HW upper limit is, so I set it so something
> that's way above the actual value mac80211 will ever try anyway (because
> mac80211 won't try illegal rates, if implemented correctly).
>
I used 20 (0x14) because 20 dBm is the regulatory maximum for almost
all regions. In fact, the value of desired_pwr (in Q5.2) that results
is 37, or 9.25 dBm. My guess is that this value is too low; however,
changing the initialization value to 30 as it is in b43 did not change
anything.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cfg80211: default to regulatory max power for channel
2008-04-03 19:32 ` [PATCH] cfg80211: default to regulatory max power for channel John W. Linville
2008-04-03 20:08 ` Michael Buesch
@ 2008-04-03 21:01 ` Larry Finger
1 sibling, 0 replies; 6+ messages in thread
From: Larry Finger @ 2008-04-03 21:01 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, johannes, mcgrof
John W. Linville wrote:
> If the driver does not specify a maximum power output, default to the
> regulatory max.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> Is this a worth alternative to Larry's b43legacy patch? It looked like
> ath5k wasn't setting max_power either -- how does it work?
It works the same as my patch did. Yours is clearly better as it
"fixes" all drivers.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-03 21:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <BAY103-F373BE8D28C2F2A21BC15E0D8F70@phx.gbl>
[not found] ` <200804031719.44026.mb@bu3sch.de>
2008-04-03 18:38 ` [PATCH] b43legacy: Partial Fix for Range issue Larry Finger
2008-04-03 18:50 ` Michael Buesch
2008-04-03 20:10 ` Larry Finger
2008-04-03 19:32 ` [PATCH] cfg80211: default to regulatory max power for channel John W. Linville
2008-04-03 20:08 ` Michael Buesch
2008-04-03 21:01 ` Larry Finger
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).