b43legacy: Partial Fix for Range issue
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 b43legacy: Partial Fix for Range issue
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.
---
John,
This is 2.6.25 material.
Larry
drivers/net/wireless/b43legacy/main.c +1 -0
@@ -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 ),
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.
---
John,
This is 2.6.25 material.
Larry
drivers/net/wireless/b43legacy/main.c +1 -0
@@ -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 ),
Quoted 25 lines · On Thursday 03 April 2008 20:38:37 Larry Finger wrote:
When the mac80211 channel tables were recently changed, the
power_levelmember was removed. As a result, the value passed to b43legacy inconf->power_levelbecame zero. This value is transferred tophy->power_leveland 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 <[email protected]>---
John,
This is 2.6.25 material.
Larry
Index:
wireless-testing/drivers/net/wireless/b43legacy/main.c
===================================================================
drivers/net/wireless/b43legacy/main.c static struct ieee80211_rate __b43legacy · line 133
Quoted 7 lines
drivers/net/wireless/b43legacy/main.c +1
-0@@ -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).
Signature · 1 line
Greetings Michael.
Quoted 6 lines · Michael Buesch
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
PATCH 1/1 cfg80211: default to regulatory max power for channel
In reply to Larry FingerIf the driver does not specify a maximum power output, default to the regulatory max.
---
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(-)
net/wireless/reg.c +4 -1
@@ -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,
Signature · 1 line
1.5.3.3
Re: [PATCH] cfg80211: default to regulatory max power for channel
Quoted 6 lines · 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 <[email protected]>---
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.
Quoted 21 lines
ath5k wasn't setting
max_powereither -- how does it work?net/wireless/reg.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)net/wireless/reg.c +4
-1@@ -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,
Signature · 1 line
Greetings Michael.
Re: [PATCH] cfg80211: default to regulatory max power for channel
In reply to John W. LinvilleQuoted 7 lines · John W. Linville
If the driver does not specify a maximum power output, default to the regulatory max.
Signed-off-by John W. Linville <[email protected]>---
Is this a worth alternative to Larry's b43legacy patch? It looked like ath5k wasn't settingmax_powereither -- how does it work?
It works the same as my patch did. Yours is clearly better as it "fixes" all drivers.
Larry