* Re: [PATCH] b43: Implement antenna diversity support for LP-PHY
From: Gábor Stefanik @ 2009-08-27 20:41 UTC (permalink / raw)
To: Michael Buesch
Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <200908272231.19632.mb@bu3sch.de>
2009/8/27 Michael Buesch <mb@bu3sch.de>:
> On Thursday 27 August 2009 20:56:22 Gábor Stefanik wrote:
>> The A/G-PHY changes are fallout fixes from the enum change,
>> which in turn allows the LP-PHY code to be much simpler.
>> The antenna_to_phyctl change is a fix for a potential
>> existing bug that this patch may otherwise trigger.
>>
>> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
>> ---
>> Note that according to recent spec changes, the A/G-PHY
>> antenna diversity routines also need to be updated.
>> However, I'm not lumping those changes into this patch
>> (this is for LP-PHY).
>>
>> drivers/net/wireless/b43/main.c | 3 ++-
>> drivers/net/wireless/b43/phy_a.c | 2 +-
>> drivers/net/wireless/b43/phy_common.h | 10 +++++-----
>> drivers/net/wireless/b43/phy_g.c | 2 +-
>> drivers/net/wireless/b43/phy_lp.c | 11 ++++++++++-
>> 5 files changed, 19 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>> index 289e06c..3b038c9 100644
>> --- a/drivers/net/wireless/b43/main.c
>> +++ b/drivers/net/wireless/b43/main.c
>> @@ -1456,7 +1456,8 @@ static u16 b43_antenna_to_phyctl(int antenna)
>> return B43_TXH_PHY_ANT2;
>> case B43_ANTENNA3:
>> return B43_TXH_PHY_ANT3;
>> - case B43_ANTENNA_AUTO:
>> + case B43_ANTENNA_AUTO0:
>> + case B43_ANTENNA_AUTO1:
>> return B43_TXH_PHY_ANT01AUTO;
>> }
>> B43_WARN_ON(1);
>> diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
>> index 816e028..809ec97 100644
>> --- a/drivers/net/wireless/b43/phy_a.c
>> +++ b/drivers/net/wireless/b43/phy_a.c
>> @@ -531,7 +531,7 @@ static void b43_aphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
>>
>> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
>> tmp &= ~B43_PHY_BBANDCFG_RXANT;
>> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
>> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
>> << B43_PHY_BBANDCFG_RXANT_SHIFT;
>> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>>
>> diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
>> index b47a0f5..28e3846 100644
>> --- a/drivers/net/wireless/b43/phy_common.h
>> +++ b/drivers/net/wireless/b43/phy_common.h
>> @@ -49,11 +49,11 @@ enum b43_interference_mitigation {
>>
>> /* Antenna identifiers */
>> enum {
>> - B43_ANTENNA0, /* Antenna 0 */
>> - B43_ANTENNA1, /* Antenna 0 */
>> - B43_ANTENNA_AUTO1, /* Automatic, starting with antenna 1 */
>> - B43_ANTENNA_AUTO0, /* Automatic, starting with antenna 0 */
>> - B43_ANTENNA2,
>> + B43_ANTENNA0 = 0, /* Antenna 0 */
>> + B43_ANTENNA1 = 1, /* Antenna 1 */
>> + B43_ANTENNA_AUTO0 = 2, /* Automatic, starting with antenna 0 */
>> + B43_ANTENNA_AUTO1 = 3, /* Automatic, starting with antenna 1 */
>> + B43_ANTENNA2 = 4,
>> B43_ANTENNA3 = 8,
>>
>> B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0,
>> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
>> index c6c9d2f..c6d639d 100644
>> --- a/drivers/net/wireless/b43/phy_g.c
>> +++ b/drivers/net/wireless/b43/phy_g.c
>> @@ -2651,7 +2651,7 @@ static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
>>
>> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
>> tmp &= ~B43_PHY_BBANDCFG_RXANT;
>> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
>> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
>> << B43_PHY_BBANDCFG_RXANT_SHIFT;
>> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>>
>> diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
>> index 837d952..055c0f7 100644
>> --- a/drivers/net/wireless/b43/phy_lp.c
>> +++ b/drivers/net/wireless/b43/phy_lp.c
>> @@ -2204,7 +2204,16 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
>>
>> static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
>> {
>> - //TODO
>> + int autodiv = ;
>
> Does this compile?
That's a typo. Also, the autodiv variable shouldn't be there at all.
Will respin.
>
>> +
>> + if (dev->phy.rev >= 2)
>> + return; // rev2+ doesn't support antenna diversity
>> +
>> + if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
>> + return;
>> +
>> + b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
>> + b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
>> }
>>
>> static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
>
>
>
> --
> Greetings, Michael.
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply
* Re: [PATCH] b43: Implement antenna diversity support for LP-PHY
From: Michael Buesch @ 2009-08-27 20:31 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <4A96D6D6.3050201@gmail.com>
On Thursday 27 August 2009 20:56:22 Gábor Stefanik wrote:
> The A/G-PHY changes are fallout fixes from the enum change,
> which in turn allows the LP-PHY code to be much simpler.
> The antenna_to_phyctl change is a fix for a potential
> existing bug that this patch may otherwise trigger.
>
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> Note that according to recent spec changes, the A/G-PHY
> antenna diversity routines also need to be updated.
> However, I'm not lumping those changes into this patch
> (this is for LP-PHY).
>
> drivers/net/wireless/b43/main.c | 3 ++-
> drivers/net/wireless/b43/phy_a.c | 2 +-
> drivers/net/wireless/b43/phy_common.h | 10 +++++-----
> drivers/net/wireless/b43/phy_g.c | 2 +-
> drivers/net/wireless/b43/phy_lp.c | 11 ++++++++++-
> 5 files changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index 289e06c..3b038c9 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -1456,7 +1456,8 @@ static u16 b43_antenna_to_phyctl(int antenna)
> return B43_TXH_PHY_ANT2;
> case B43_ANTENNA3:
> return B43_TXH_PHY_ANT3;
> - case B43_ANTENNA_AUTO:
> + case B43_ANTENNA_AUTO0:
> + case B43_ANTENNA_AUTO1:
> return B43_TXH_PHY_ANT01AUTO;
> }
> B43_WARN_ON(1);
> diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
> index 816e028..809ec97 100644
> --- a/drivers/net/wireless/b43/phy_a.c
> +++ b/drivers/net/wireless/b43/phy_a.c
> @@ -531,7 +531,7 @@ static void b43_aphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
>
> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
> tmp &= ~B43_PHY_BBANDCFG_RXANT;
> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
> << B43_PHY_BBANDCFG_RXANT_SHIFT;
> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>
> diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
> index b47a0f5..28e3846 100644
> --- a/drivers/net/wireless/b43/phy_common.h
> +++ b/drivers/net/wireless/b43/phy_common.h
> @@ -49,11 +49,11 @@ enum b43_interference_mitigation {
>
> /* Antenna identifiers */
> enum {
> - B43_ANTENNA0, /* Antenna 0 */
> - B43_ANTENNA1, /* Antenna 0 */
> - B43_ANTENNA_AUTO1, /* Automatic, starting with antenna 1 */
> - B43_ANTENNA_AUTO0, /* Automatic, starting with antenna 0 */
> - B43_ANTENNA2,
> + B43_ANTENNA0 = 0, /* Antenna 0 */
> + B43_ANTENNA1 = 1, /* Antenna 1 */
> + B43_ANTENNA_AUTO0 = 2, /* Automatic, starting with antenna 0 */
> + B43_ANTENNA_AUTO1 = 3, /* Automatic, starting with antenna 1 */
> + B43_ANTENNA2 = 4,
> B43_ANTENNA3 = 8,
>
> B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0,
> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> index c6c9d2f..c6d639d 100644
> --- a/drivers/net/wireless/b43/phy_g.c
> +++ b/drivers/net/wireless/b43/phy_g.c
> @@ -2651,7 +2651,7 @@ static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
>
> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
> tmp &= ~B43_PHY_BBANDCFG_RXANT;
> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
> << B43_PHY_BBANDCFG_RXANT_SHIFT;
> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>
> diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
> index 837d952..055c0f7 100644
> --- a/drivers/net/wireless/b43/phy_lp.c
> +++ b/drivers/net/wireless/b43/phy_lp.c
> @@ -2204,7 +2204,16 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
>
> static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
> {
> - //TODO
> + int autodiv = ;
Does this compile?
> +
> + if (dev->phy.rev >= 2)
> + return; // rev2+ doesn't support antenna diversity
> +
> + if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
> + return;
> +
> + b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
> + b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
> }
>
> static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
--
Greetings, Michael.
^ permalink raw reply
* Re: [PATCH 4/4] ath5k: add hardware CCMP encyption support
From: Bob Copeland @ 2009-08-27 19:17 UTC (permalink / raw)
To: Pavel Roskin
Cc: linville, jirislaby, mickflemm, lrodriguez, linux-wireless,
ath5k-devel
In-Reply-To: <1251338971.17295.17.camel@mj>
Subject: [PATCH] ath5k: clarify srev comparison for CCMP check
As Pavel Roskin noted, the check for mac version as copied from
legacy_hal made no sense. This replaces it with the equivalent
and makes up a suitable #define for the mac version legacy_hal
checked.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
On Wed, Aug 26, 2009 at 10:09:31PM -0400, Pavel Roskin wrote:
> On Mon, 2009-08-24 at 23:00 -0400, Bob Copeland wrote:
> > + ah->ah_aes_support =
> > + (ee->ee_version >= AR5K_EEPROM_VERSION_5_0 &&
> > + !AR5K_EEPROM_AES_DIS(ee->ee_misc5) &&
> > + (ah->ah_mac_version > (AR5K_SREV_AR5212 >> 4) ||
> > + (ah->ah_mac_version == (AR5K_SREV_AR5212 >> 4) &&
> > + ah->ah_mac_revision >= (AR5K_SREV_AR5211 >> 4))));
>
> The above use of ah->ah_mac_revision is clearly incorrect. You are
> comparing a revision with a symbol for a version.
>
> I suggest that you use ah_mac_srev instead. Before this patch,
> ah_mac_revision was a write-only variable and was a good candidate for
> removal.
>
> The last three quoted lines are equivalent to (ah->ah_mac_srev >= 0x54)
Ok, here's a fixup. I'm not sure if 0x54 was really intended since we
don't know what srev that is, but this assumes legacy hal is correct.
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
drivers/net/wireless/ath/ath5k/attach.c | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index cdc79cd..1275ba0 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -306,6 +306,7 @@ struct ath5k_srev_name {
#define AR5K_SREV_AR5311B 0x30 /* Spirit */
#define AR5K_SREV_AR5211 0x40 /* Oahu */
#define AR5K_SREV_AR5212 0x50 /* Venice */
+#define AR5K_SREV_AR5212_V4 0x54 /* ??? */
#define AR5K_SREV_AR5213 0x55 /* ??? */
#define AR5K_SREV_AR5213A 0x59 /* Hainan */
#define AR5K_SREV_AR2413 0x78 /* Griffin lite */
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index 109ab7b..4819f39 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -318,12 +318,9 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
/* Crypto settings */
ee = &ah->ah_capabilities.cap_eeprom;
- ah->ah_aes_support =
+ ah->ah_aes_support = srev >= AR5K_SREV_AR5212_V4 &&
(ee->ee_version >= AR5K_EEPROM_VERSION_5_0 &&
- !AR5K_EEPROM_AES_DIS(ee->ee_misc5) &&
- (ah->ah_mac_version > (AR5K_SREV_AR5212 >> 4) ||
- (ah->ah_mac_version == (AR5K_SREV_AR5212 >> 4) &&
- ah->ah_mac_revision >= (AR5K_SREV_AR5211 >> 4))));
+ !AR5K_EEPROM_AES_DIS(ee->ee_misc5));
if (srev >= AR5K_SREV_AR2414) {
ah->ah_combined_mic = true;
--
1.6.2.5
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply related
* [PATCH] b43: Implement antenna diversity support for LP-PHY
From: Gábor Stefanik @ 2009-08-27 18:56 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless
The A/G-PHY changes are fallout fixes from the enum change,
which in turn allows the LP-PHY code to be much simpler.
The antenna_to_phyctl change is a fix for a potential
existing bug that this patch may otherwise trigger.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
Note that according to recent spec changes, the A/G-PHY
antenna diversity routines also need to be updated.
However, I'm not lumping those changes into this patch
(this is for LP-PHY).
drivers/net/wireless/b43/main.c | 3 ++-
drivers/net/wireless/b43/phy_a.c | 2 +-
drivers/net/wireless/b43/phy_common.h | 10 +++++-----
drivers/net/wireless/b43/phy_g.c | 2 +-
drivers/net/wireless/b43/phy_lp.c | 11 ++++++++++-
5 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 289e06c..3b038c9 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1456,7 +1456,8 @@ static u16 b43_antenna_to_phyctl(int antenna)
return B43_TXH_PHY_ANT2;
case B43_ANTENNA3:
return B43_TXH_PHY_ANT3;
- case B43_ANTENNA_AUTO:
+ case B43_ANTENNA_AUTO0:
+ case B43_ANTENNA_AUTO1:
return B43_TXH_PHY_ANT01AUTO;
}
B43_WARN_ON(1);
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 816e028..809ec97 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -531,7 +531,7 @@ static void b43_aphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
tmp &= ~B43_PHY_BBANDCFG_RXANT;
- tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
+ tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
<< B43_PHY_BBANDCFG_RXANT_SHIFT;
b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index b47a0f5..28e3846 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -49,11 +49,11 @@ enum b43_interference_mitigation {
/* Antenna identifiers */
enum {
- B43_ANTENNA0, /* Antenna 0 */
- B43_ANTENNA1, /* Antenna 0 */
- B43_ANTENNA_AUTO1, /* Automatic, starting with antenna 1 */
- B43_ANTENNA_AUTO0, /* Automatic, starting with antenna 0 */
- B43_ANTENNA2,
+ B43_ANTENNA0 = 0, /* Antenna 0 */
+ B43_ANTENNA1 = 1, /* Antenna 1 */
+ B43_ANTENNA_AUTO0 = 2, /* Automatic, starting with antenna 0 */
+ B43_ANTENNA_AUTO1 = 3, /* Automatic, starting with antenna 1 */
+ B43_ANTENNA2 = 4,
B43_ANTENNA3 = 8,
B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0,
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index c6c9d2f..c6d639d 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -2651,7 +2651,7 @@ static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
tmp &= ~B43_PHY_BBANDCFG_RXANT;
- tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
+ tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
<< B43_PHY_BBANDCFG_RXANT_SHIFT;
b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 837d952..055c0f7 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -2204,7 +2204,16 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
{
- //TODO
+ int autodiv = ;
+
+ if (dev->phy.rev >= 2)
+ return; // rev2+ doesn't support antenna diversity
+
+ if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
+ return;
+
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
}
static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
--
1.6.2.4
^ permalink raw reply related
* Re: [PATCH] rt2x00: Cleanup rt2x00mac_bss_info_changed()
From: Ivo van Doorn @ 2009-08-27 18:49 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
In-Reply-To: <1251358806.20531.9.camel@johannes.local>
On Thursday 27 August 2009, Johannes Berg wrote:
> On Wed, 2009-08-26 at 21:04 +0200, Ivo van Doorn wrote:
> > Since patch "rt2x00: bss_info_changed() callback is allowed to sleep" the
> > variable delayed wasn't used anymore. This means it can be removed
> > along with the call to schedule_work which depended on that variable.
>
> I just wanted to say thanks for doing all the cleanups. It's really nice
> to see all my work on making callbacks non-atomic pay off in that way :)
yeah those kind of optimizations really help with the drivers. :)
I still have some other cleanups, but this was the easiest and most obvious one,
the others involve changing locking mechanisms so need better verification.
Ivo
^ permalink raw reply
* Re: [RFC/RFT] b43: Implement antenna diversity support for LP-PHY
From: Larry Finger @ 2009-08-27 18:39 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Michael Buesch, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <4A96CE28.3040800@gmail.com>
Gábor Stefanik wrote:
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> This intentionally deviates slightly from the spec (writing
> the antenna ID in one pass instead of two) - please test if
> this works. (I don't have the tools to test if it actually
> selects the right antenna.)
>
> The A/G-PHY changes are fallout fixes from the enum change,
> which in turn allows the LP-PHY code to be much simpler.
> The antenna_to_phyctl change is a fix for a potential
> existing bug that this patch may otherwise trigger.
>
> drivers/net/wireless/b43/main.c | 3 ++-
> drivers/net/wireless/b43/phy_a.c | 2 +-
> drivers/net/wireless/b43/phy_common.h | 10 +++++-----
> drivers/net/wireless/b43/phy_g.c | 2 +-
> drivers/net/wireless/b43/phy_lp.c | 11 ++++++++++-
> 5 files changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c
> b/drivers/net/wireless/b43/main.c
> index 289e06c..3b038c9 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -1456,7 +1456,8 @@ static u16 b43_antenna_to_phyctl(int antenna)
> return B43_TXH_PHY_ANT2;
> case B43_ANTENNA3:
> return B43_TXH_PHY_ANT3;
> - case B43_ANTENNA_AUTO:
> + case B43_ANTENNA_AUTO0:
> + case B43_ANTENNA_AUTO1:
> return B43_TXH_PHY_ANT01AUTO;
> }
> B43_WARN_ON(1);
> diff --git a/drivers/net/wireless/b43/phy_a.c
> b/drivers/net/wireless/b43/phy_a.c
> index 816e028..809ec97 100644
> --- a/drivers/net/wireless/b43/phy_a.c
> +++ b/drivers/net/wireless/b43/phy_a.c
> @@ -531,7 +531,7 @@ static void b43_aphy_op_set_rx_antenna(struct
> b43_wldev *dev, int antenna)
>
> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
> tmp &= ~B43_PHY_BBANDCFG_RXANT;
> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
> << B43_PHY_BBANDCFG_RXANT_SHIFT;
> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>
> diff --git a/drivers/net/wireless/b43/phy_common.h
> b/drivers/net/wireless/b43/phy_common.h
> index b47a0f5..a6a90df 100644
> --- a/drivers/net/wireless/b43/phy_common.h
> +++ b/drivers/net/wireless/b43/phy_common.h
> @@ -49,11 +49,11 @@ enum b43_interference_mitigation {
>
> /* Antenna identifiers */
> enum {
> - B43_ANTENNA0, /* Antenna 0 */
> - B43_ANTENNA1, /* Antenna 0 */
> - B43_ANTENNA_AUTO1, /* Automatic, starting with antenna 1 */
> - B43_ANTENNA_AUTO0, /* Automatic, starting with antenna 0 */
> - B43_ANTENNA2,
> + B43_ANTENNA0 = 0, /* Antenna 0 */
> + B43_ANTENNA1 = 1, /* Antenna 1 */
> + B43_ANTENNA_AUTO0 = 2, /* Automatic, starting with antenna 0 */
> + B43_ANTENNA_AUTO1 = 3, /* Automatic, starting with antenna 1 */
> + B43_ANTENNA2 = 4,
> B43_ANTENNA3 = 8,
>
> B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0,
> diff --git a/drivers/net/wireless/b43/phy_g.c
> b/drivers/net/wireless/b43/phy_g.c
> index c6c9d2f..c6d639d 100644
> --- a/drivers/net/wireless/b43/phy_g.c
> +++ b/drivers/net/wireless/b43/phy_g.c
> @@ -2651,7 +2651,7 @@ static void b43_gphy_op_set_rx_antenna(struct
> b43_wldev *dev, int antenna)
>
> tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
> tmp &= ~B43_PHY_BBANDCFG_RXANT;
> - tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
> + tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
> << B43_PHY_BBANDCFG_RXANT_SHIFT;
> b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
>
> diff --git a/drivers/net/wireless/b43/phy_lp.c
> b/drivers/net/wireless/b43/phy_lp.c
> index 837d952..457357a 100644
> --- a/drivers/net/wireless/b43/phy_lp.c
> +++ b/drivers/net/wireless/b43/phy_lp.c
> @@ -2204,7 +2204,16 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
>
> static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
> {
> - //TODO
> + int autodiv = ;
> +
> + if (dev->phy.rev >= 2)
> + return; // rev2+ doesn't support antenna diversity
> +
> + if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
> + return;
> +
> + /* NOTE: The spec breaks this up into 2 writes - please test */
> + b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFC, antenna);
> }
>
> static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
Sorry, but the spec for this routine was updated 1.5 hours ago.
As to the two-stage write, the spec does match the original code. Who
knows what happens in the device. As it adds little to the routine, I
would suggest implementing it the way the original code does.
Larry
^ permalink raw reply
* Re: [ath5k-devel] [PATCH 1/2] ath5k: fix uninitialized value use in ath5k_eeprom_read_turbo_modes()
From: Luis R. Rodriguez @ 2009-08-27 18:25 UTC (permalink / raw)
To: Bob Copeland
Cc: Nick Kossifidis, Pavel Roskin, ath5k-devel, linux-wireless,
John W. Linville
In-Reply-To: <b6c5339f0908271117q3a893d4dma9df0ac441091dbf@mail.gmail.com>
On Thu, Aug 27, 2009 at 11:17 AM, Bob Copeland<bcopeland@gmail.com> wrote:
> On Thu, Aug 27, 2009 at 8:58 AM, Nick Kossifidis<mickflemm@gmail.com> wrote:
>> 2009/8/27 Pavel Roskin <proski@gnu.org>:
>
>> Current code works fine (i 've checked it against various cards),
>> there is nothing wrong
>> with having another function for reading turbo modes, i find it's
>> cleaner that way.
>
> Well, we also don't use the turbo modes at all and that's where the
> error is (IIRC) so it shouldn't have any impact. :)
Again, why don't we just remove all that fucking turbo cruft?
Luis
^ permalink raw reply
* Re: [PATCH] iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump
From: Johannes Berg @ 2009-08-27 18:22 UTC (permalink / raw)
To: Brian Cavagnolo; +Cc: linux-wireless
In-Reply-To: <1251396920-3954-1-git-send-email-brian@cozybit.com>
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
On Thu, 2009-08-27 at 11:15 -0700, Brian Cavagnolo wrote:
> NL80211_STA_INFO_PLINK_STATE is a u8, not a u16. This bug was causing
> unexpected output on big endian machines.
Applied, thanks.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [RFC/RFT] b43: Implement antenna diversity support for LP-PHY
From: Gábor Stefanik @ 2009-08-27 18:19 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
This intentionally deviates slightly from the spec (writing
the antenna ID in one pass instead of two) - please test if
this works. (I don't have the tools to test if it actually
selects the right antenna.)
The A/G-PHY changes are fallout fixes from the enum change,
which in turn allows the LP-PHY code to be much simpler.
The antenna_to_phyctl change is a fix for a potential
existing bug that this patch may otherwise trigger.
drivers/net/wireless/b43/main.c | 3 ++-
drivers/net/wireless/b43/phy_a.c | 2 +-
drivers/net/wireless/b43/phy_common.h | 10 +++++-----
drivers/net/wireless/b43/phy_g.c | 2 +-
drivers/net/wireless/b43/phy_lp.c | 11 ++++++++++-
5 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 289e06c..3b038c9 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1456,7 +1456,8 @@ static u16 b43_antenna_to_phyctl(int antenna)
return B43_TXH_PHY_ANT2;
case B43_ANTENNA3:
return B43_TXH_PHY_ANT3;
- case B43_ANTENNA_AUTO:
+ case B43_ANTENNA_AUTO0:
+ case B43_ANTENNA_AUTO1:
return B43_TXH_PHY_ANT01AUTO;
}
B43_WARN_ON(1);
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 816e028..809ec97 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -531,7 +531,7 @@ static void b43_aphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
tmp &= ~B43_PHY_BBANDCFG_RXANT;
- tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
+ tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
<< B43_PHY_BBANDCFG_RXANT_SHIFT;
b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index b47a0f5..a6a90df 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -49,11 +49,11 @@ enum b43_interference_mitigation {
/* Antenna identifiers */
enum {
- B43_ANTENNA0, /* Antenna 0 */
- B43_ANTENNA1, /* Antenna 0 */
- B43_ANTENNA_AUTO1, /* Automatic, starting with antenna 1 */
- B43_ANTENNA_AUTO0, /* Automatic, starting with antenna 0 */
- B43_ANTENNA2,
+ B43_ANTENNA0 = 0, /* Antenna 0 */
+ B43_ANTENNA1 = 1, /* Antenna 1 */
+ B43_ANTENNA_AUTO0 = 2, /* Automatic, starting with antenna 0 */
+ B43_ANTENNA_AUTO1 = 3, /* Automatic, starting with antenna 1 */
+ B43_ANTENNA2 = 4,
B43_ANTENNA3 = 8,
B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0,
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index c6c9d2f..c6d639d 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -2651,7 +2651,7 @@ static void b43_gphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
tmp = b43_phy_read(dev, B43_PHY_BBANDCFG);
tmp &= ~B43_PHY_BBANDCFG_RXANT;
- tmp |= (autodiv ? B43_ANTENNA_AUTO0 : antenna)
+ tmp |= (autodiv ? B43_ANTENNA_AUTO1 : antenna)
<< B43_PHY_BBANDCFG_RXANT_SHIFT;
b43_phy_write(dev, B43_PHY_BBANDCFG, tmp);
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 837d952..457357a 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -2204,7 +2204,16 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
{
- //TODO
+ int autodiv = ;
+
+ if (dev->phy.rev >= 2)
+ return; // rev2+ doesn't support antenna diversity
+
+ if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
+ return;
+
+ /* NOTE: The spec breaks this up into 2 writes - please test */
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFC, antenna);
}
static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
--
1.6.2.4
^ permalink raw reply related
* Re: [ath5k-devel] [PATCH 1/2] ath5k: fix uninitialized value use in ath5k_eeprom_read_turbo_modes()
From: Bob Copeland @ 2009-08-27 18:17 UTC (permalink / raw)
To: Nick Kossifidis
Cc: Pavel Roskin, ath5k-devel, linux-wireless, John W. Linville
In-Reply-To: <40f31dec0908270558y2a3a565bvcc7e470b7f2644c6@mail.gmail.com>
On Thu, Aug 27, 2009 at 8:58 AM, Nick Kossifidis<mickflemm@gmail.com> wrote:
> 2009/8/27 Pavel Roskin <proski@gnu.org>:
> Current code works fine (i 've checked it against various cards),
> there is nothing wrong
> with having another function for reading turbo modes, i find it's
> cleaner that way.
Well, we also don't use the turbo modes at all and that's where the
error is (IIRC) so it shouldn't have any impact. :)
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* [PATCH] iw: fix NL80211_STA_INFO_PLINK_STATE printing in station dump
From: Brian Cavagnolo @ 2009-08-27 18:15 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Brian Cavagnolo
In-Reply-To: <iw1>
NL80211_STA_INFO_PLINK_STATE is a u8, not a u16. This bug was causing
unexpected output on big endian machines.
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
---
station.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/station.c b/station.c
index 0fff92d..a4865f9 100644
--- a/station.c
+++ b/station.c
@@ -127,7 +127,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
printf("\n\tmesh plid:\t%d",
nla_get_u16(sinfo[NL80211_STA_INFO_PLID]));
if (sinfo[NL80211_STA_INFO_PLINK_STATE]) {
- switch (nla_get_u16(sinfo[NL80211_STA_INFO_PLINK_STATE])) {
+ switch (nla_get_u8(sinfo[NL80211_STA_INFO_PLINK_STATE])) {
case LISTEN:
strcpy(state_name, "LISTEN");
break;
--
1.6.0.4
^ permalink raw reply related
* Re: [PATCH] rndis_wlan: increase scan timer delay
From: Jussi Kivilinna @ 2009-08-27 18:06 UTC (permalink / raw)
To: Dan Williams; +Cc: linux-wireless, John W. Linville
In-Reply-To: <1251382153.11788.3.camel@localhost.localdomain>
Quoting "Dan Williams" <dcbw@redhat.com>:
> On Thu, 2009-08-27 at 13:43 +0300, Jussi Kivilinna wrote:
>> Please, don't merge this after all. Blocks scan too long and breaks
>> NetworkManager/wpa_supplicant.
>
> Hmm, it shouldn't. I've seen other cards (ath5k a/b/g) take 5 to 8
> seconds to scan when they scan all the bands. iwlwifi sometimes takes 5
> seconds to scan as well. That should all be valid.
>
You're right, increasing delay exposed bug that caused reconnects.
With short delay (re)scans didn't block so long and connection was
established faster. With 6 sec connection was established eventually.
I'll send bug fix (workaround really, hw sometimes sends extra media
connect events when setting WPA keys, which needs to be ignored) and
resend this patch in two patch set after more testing.
-Jussi
^ permalink raw reply
* Re: [PATCH] iwlagn: show_version() displays confusing/wrong firmware version
From: Bjørn Mork @ 2009-08-27 16:50 UTC (permalink / raw)
To: reinette chatre; +Cc: Zhu, Yi, linux-wireless@vger.kernel.org
In-Reply-To: <1251386952.3805.23.camel@rc-desk>
reinette chatre <reinette.chatre@intel.com> writes:
> Since 2.6.31 is considered a done deal and this is surely not the
> required "earth shattering" fix (see [1]) I cannot push this as a fix
> into Linus's repo at this time. This display problem will not exist in
> 2.6.32.
Ah, I see. Yes, that looks even better. I feel a bit stupid for not
checking iwlwifi-2.6.git before sending this. Thanks for your patience.
Bjørn
^ permalink raw reply
* Re: [PATCH] iwlagn: show_version() displays confusing/wrong firmware version
From: reinette chatre @ 2009-08-27 15:29 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Zhu, Yi, linux-wireless@vger.kernel.org
In-Reply-To: <87r5uxb8fi.fsf@nemi.mork.no>
Hi Bjørn,
On Thu, 2009-08-27 at 08:09 -0700, Bjørn Mork wrote:
> reinette chatre <reinette.chatre@intel.com> writes:
> > Which kernel/repo is your patch based on?
>
> Oh, sorry for not including that vital information. I'm afraid it is
> against Linus' tree at
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> and not any of the wireless/networking trees.
Since 2.6.31 is considered a done deal and this is surely not the
required "earth shattering" fix (see [1]) I cannot push this as a fix
into Linus's repo at this time. This display problem will not exist in
2.6.32.
Reinette
[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/38579
^ permalink raw reply
* Re: [PATCH] iwlagn: show_version() displays confusing/wrong firmware version
From: Bjørn Mork @ 2009-08-27 15:09 UTC (permalink / raw)
To: reinette chatre; +Cc: Zhu, Yi, linux-wireless@vger.kernel.org
In-Reply-To: <1251385041.3805.17.camel@rc-desk>
reinette chatre <reinette.chatre@intel.com> writes:
> Hi Bjørn,
>
> Which kernel/repo is your patch based on?
Oh, sorry for not including that vital information. I'm afraid it is
against Linus' tree at
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
and not any of the wireless/networking trees.
"git log drivers/net/wireless/iwlwifi/iwl-agn.c" shows this as the last
commit affecting iwl-agn.c before my change:
commit 872ed1902f511a8947021c562f5728a5bf0640b5
Author: Reinette Chatre <reinette.chatre@intel.com>
Date: Thu Jul 9 10:33:37 2009 -0700
iwlwifi: only show active power level via sysfs
Bjørn
^ permalink raw reply
* [PATCH v2] b43: Enable LP-PHY support by default and remove Kconfig warning
From: Gábor Stefanik @ 2009-08-27 15:24 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless
The most common LP-PHY device, BCM4312, is now fully functional.
So, no need to say "probably won't work for you" anymore.
It's also not "for debuggers and developers only", as it is
perfectly usable for end-users now (at least for BCM4312).
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
This replaces the "remove scary message" patch.
V2: Fix pastebin damage.
drivers/net/wireless/b43/Kconfig | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index 237b1aa..2af3b35 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -82,15 +82,13 @@ config B43_NPHY
config B43_PHY_LP
bool "Support for low-power (LP-PHY) devices (EXPERIMENTAL)"
depends on B43 && EXPERIMENTAL
+ default y
---help---
Support for the LP-PHY.
The LP-PHY is a low-power PHY built into some notebooks
and embedded devices. It supports 802.11a/g
(802.11a support is optional, and currently disabled).
- This is heavily experimental, and probably will not work for you.
- Say N unless you want to help debug the driver.
-
# This config option automatically enables b43 LEDS support,
# if it's possible.
config B43_LEDS
--
1.6.2.4
^ permalink raw reply related
* Re: [PATCH] b43: Enable LP-PHY support by default and remove Kconfig warning
From: Gábor Stefanik @ 2009-08-27 15:19 UTC (permalink / raw)
To: Larry Finger
Cc: John Linville, Michael Buesch, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <4A96A239.9000406@lwfinger.net>
2009/8/27 Larry Finger <Larry.Finger@lwfinger.net>:
> Gábor Stefanik wrote:
>> The most common LP-PHY device, BCM4312, is now fully functional.
>> So, no need to say "probably won't work for you" anymore.
>> It's also not "for debuggers and developers only", as it is
>> perfectly usable for end-users now (at least for BCM4312).
>>
>> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
>> ---
>> This replaces the "remove scary message" patch.
>>
>> drivers/net/wireless/b43/Kconfig | 4 +---
>> 1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/Kconfig
>> b/drivers/net/wireless/b43/Kconfig
>> index 237b1aa..2af3b35 100644
>> --- a/drivers/net/wireless/b43/Kconfig
>> +++ b/drivers/net/wireless/b43/Kconfig
>> -82,15 +82,13 @@ config B43_NPHY
> ===
>
> My copy of this patch is missing the @@ here. Is that true for everyone?
>
> Larry
>
Ah... the joy of Pastebin.
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply
* Re: [PATCH] b43: Enable LP-PHY support by default and remove Kconfig warning
From: Larry Finger @ 2009-08-27 15:11 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Michael Buesch, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <4A969572.7060807@gmail.com>
Gábor Stefanik wrote:
> The most common LP-PHY device, BCM4312, is now fully functional.
> So, no need to say "probably won't work for you" anymore.
> It's also not "for debuggers and developers only", as it is
> perfectly usable for end-users now (at least for BCM4312).
>
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> This replaces the "remove scary message" patch.
>
> drivers/net/wireless/b43/Kconfig | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/Kconfig
> b/drivers/net/wireless/b43/Kconfig
> index 237b1aa..2af3b35 100644
> --- a/drivers/net/wireless/b43/Kconfig
> +++ b/drivers/net/wireless/b43/Kconfig
> -82,15 +82,13 @@ config B43_NPHY
===
My copy of this patch is missing the @@ here. Is that true for everyone?
Larry
^ permalink raw reply
* Re: [PATCH] iwlagn: show_version() displays confusing/wrong firmware version
From: reinette chatre @ 2009-08-27 14:57 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Zhu, Yi, linux-wireless@vger.kernel.org
In-Reply-To: <1251379989-20728-1-git-send-email-bjorn@mork.no>
Hi Bjørn,
Which kernel/repo is your patch based on?
On Thu, 2009-08-27 at 06:33 -0700, Bjørn Mork wrote:
> The output of show_version() is confusing at best, and can also be
> considered wrong
Correct. Since this information is already printed in the system logs we
determined that the version sysfs file is not needed and has been
removed. Your patch is thus not relevant to the recent code
(wireless-testing repository).
Here is the patch for your reference:
commit 44f313c2e63dcf93b17e6a43769105e487e2e49d
Author: Jay Sternberg <jay.e.sternberg@intel.com>
Date: Fri Jul 31 14:28:09 2009 -0700
iwlwifi: remove duplicated version info from sysfs
version info in sysfs had been determined to be unnecessary as it
is already provided in syslog info. nvm version is added to syslog
version info as a debug level message to provide all info that was
in the version sysfs data.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette
^ permalink raw reply
* [PATCH] b43: Enable LP-PHY support by default and remove Kconfig warning
From: Gábor Stefanik @ 2009-08-27 14:17 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless
The most common LP-PHY device, BCM4312, is now fully functional.
So, no need to say "probably won't work for you" anymore.
It's also not "for debuggers and developers only", as it is
perfectly usable for end-users now (at least for BCM4312).
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
This replaces the "remove scary message" patch.
drivers/net/wireless/b43/Kconfig | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index 237b1aa..2af3b35 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
-82,15 +82,13 @@ config B43_NPHY
config B43_PHY_LP
bool "Support for low-power (LP-PHY) devices (EXPERIMENTAL)"
depends on B43 && EXPERIMENTAL
+ default y
---help---
Support for the LP-PHY.
The LP-PHY is a low-power PHY built into some notebooks
and embedded devices. It supports 802.11a/g
(802.11a support is optional, and currently disabled).
- This is heavily experimental, and probably will not work for you.
- Say N unless you want to help debug the driver.
-
# This config option automatically enables b43 LEDS support,
# if it's possible.
config B43_LEDS
--
1.6.2.4
^ permalink raw reply
* Re: [PATCH] rndis_wlan: increase scan timer delay
From: Dan Williams @ 2009-08-27 14:09 UTC (permalink / raw)
To: Jussi Kivilinna; +Cc: linux-wireless, John W. Linville
In-Reply-To: <20090827134340.190465b7qixz4wao@naisho.dyndns.info>
On Thu, 2009-08-27 at 13:43 +0300, Jussi Kivilinna wrote:
> Please, don't merge this after all. Blocks scan too long and breaks
> NetworkManager/wpa_supplicant.
Hmm, it shouldn't. I've seen other cards (ath5k a/b/g) take 5 to 8
seconds to scan when they scan all the bands. iwlwifi sometimes takes 5
seconds to scan as well. That should all be valid.
Can you get some wpa_supplicant runs with "-dddt" that show the problem
you're having? NM uses the supplicant for all scanning activity. It
shouldn't really "break" NM, so if it does I'd like to fix that.
Dan
^ permalink raw reply
* Re: libertas wext.c: IW_ENCODE_NOKEY for WEP keys [resend as plain text]
From: Dan Williams @ 2009-08-27 14:06 UTC (permalink / raw)
To: Bing Zhao
Cc: libertas-dev@lists.infradead.org, dwmw2@infradead.org,
linux-wireless@vger.kernel.org
In-Reply-To: <477F20668A386D41ADCC57781B1F704306D2369E90@SC-VEXCH1.marvell.com>
On Wed, 2009-08-26 at 12:11 -0700, Bing Zhao wrote:
> Hi all,
>
> There was a commit to unset the IW_ENCODE_NOKEY flag for WEP keys.
>
> "libertas: Don't set IW_ENCODE_NOKEY when returning WEP keys."
>
>
> Without this change, the IW_ENCODE_NOKEY flag is set for WEP keys and then iwconfig command would display "****-****-**" as "Encryption key".
>
> After this change, the IW_ENCODE_NOKEY flag is NOT set for WEP keys and then iwconfig command will display plain text of the WEP key ("1234-5678-90" in my case, below).
mac82011 doesn't set NOKEY in cfg80211_wext_giwencode(). I guess we
should ask if *all* drivers should set NOKEY and then be consistent.
Dan
> eth1 IEEE 802.11b/g ESSID:"Cisco1-G"
> Mode:Managed Frequency:2.462 GHz Access Point: 00:1D:45:CE:20:D0
> Bit Rate:54 Mb/s Tx-Power=15 dBm
> Retry short limit:8 RTS thr=2347 B Fragment thr=2346 B
>
> Encryption key:1234-5678-90 Security mode:open
>
> Power Management:off
> Link Quality=92/100 Signal level=-66 dBm Noise level=-94 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>
>
>
> Was there any reason to not set IW_ENCODE_NOKEY for WEP keys?
> Is it feasible to set IW_ENCODE_NOKEY for WEP switch case?
>
> --- a/drivers/net/wireless/libertas/wext.c
> +++ b/drivers/net/wireless/libertas/wext.c
> @@ -1165,6 +1165,7 @@ static int lbs_get_encode(struct net_device *dev,
> dwrq->flags |= (index + 1);
> /* Return WEP enabled */
> dwrq->flags &= ~IW_ENCODE_DISABLED;
> + dwrq->flags |= IW_ENCODE_NOKEY;
> } else if ((priv->secinfo.WPAenabled)
> || (priv->secinfo.WPA2enabled)) {
> /* return WPA enabled */
>
>
> Thanks for your help,
>
> Bing
>
^ permalink raw reply
* Re: Nokia N900 running mac80211
From: John W. Linville @ 2009-08-27 13:52 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
In-Reply-To: <87k50plbd8.fsf@nokia.com>
On Thu, Aug 27, 2009 at 02:55:31PM +0300, Kalle Valo wrote:
> Hello,
>
> wanted to tell you that just released Nokia N900 is using mac80211 and
> wl1251 driver. The kernel is 2.6.28 with few wireless related patches
> backported from newer releases and some hacks related to roaming.
>
> http://www.nokia.com/press/press-releases/showpressrelease?newsid=1337594
Hey, that is cool! Let's hope other manufacturers learn to embrace
the open code in the kernel and abandon closed-source options that
merely reimplement functionality that we already provide.
Let's also hope that this continues to motivate Nokia to support you
are your coworkers in making strong contributions to the kernel in
wireless and other areas.
Thanks!
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [PATCH] iwlagn: show_version() displays confusing/wrong firmware version
From: Bjørn Mork @ 2009-08-27 13:33 UTC (permalink / raw)
To: Zhu Yi, Reinette Chatre; +Cc: linux-wireless, Bjørn Mork
The output of show_version() is confusing at best, and can also be
considered wrong if you don't know that the order of the API and
SERIAL number has been switched. The unusual dotted hex is also
unecessary unreadable and different from the filename convention and
outout from iwl_read_ucode():
bjorn@nemi:~$ cat /sys/class/net/wlan0/device/version
fw version: 0x8.0x18.0xC.0x2
fw type: 0x1 0x0
EEPROM version: 0x11e
iwl_read_ucode() prints this when loading the same firmware:
[ 21.406218] iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode
[ 21.453118] iwlagn 0000:03:00.0: loaded firmware version 8.24.2.12
Note that I have no documentation on the intended usage of the
u8 sw_rev[8] array in struct iwl_alive_resp. sw_rev[0] and sw_rev[1]
have been switched to make the output match iwl_read_ucode(). Nothing
more, nothing less.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 355f50e..1a1ccb4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2498,10 +2498,10 @@ static ssize_t show_version(struct device *d,
if (palive->is_valid)
pos += sprintf(buf + pos,
- "fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n"
+ "fw version: %u.%u.%u.%u\n"
"fw type: 0x%01X 0x%01X\n",
palive->ucode_major, palive->ucode_minor,
- palive->sw_rev[0], palive->sw_rev[1],
+ palive->sw_rev[1], palive->sw_rev[0],
palive->ver_type, palive->ver_subtype);
else
pos += sprintf(buf + pos, "fw not loaded\n");
--
1.5.6.5
^ permalink raw reply related
* Re: [ath5k-devel] [PATCH 2/2] ath5k: don't use PCI ID to find the chip revision
From: Nick Kossifidis @ 2009-08-27 13:10 UTC (permalink / raw)
To: Pavel Roskin; +Cc: ath5k-devel, linux-wireless, John W. Linville
In-Reply-To: <20090827023009.21926.49329.stgit@mj.roinet.com>
2009/8/27 Pavel Roskin <proski@gnu.org>:
> AR5K_SREV is available even if the chip has been put to sleep. Relying
> on the chip register allows binding non-standard PCI IDs by
>
> echo VENDOR_ID PRODUCT_ID >/sys/bus/pci/drivers/ath5k/new_id
>
> without having to specify the driver data as well.
>
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
> drivers/net/wireless/ath/ath5k/ath5k.h | 2 +-
> drivers/net/wireless/ath/ath5k/attach.c | 14 +++++++----
> drivers/net/wireless/ath/ath5k/base.c | 38 ++++++++++++++++---------------
> 3 files changed, 29 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
> index cdc79cd..c2d4c6a 100644
> --- a/drivers/net/wireless/ath/ath5k/ath5k.h
> +++ b/drivers/net/wireless/ath/ath5k/ath5k.h
> @@ -1159,7 +1159,7 @@ struct ath5k_hw {
> */
>
> /* Attach/Detach Functions */
> -extern struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version);
> +extern struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc);
> extern void ath5k_hw_detach(struct ath5k_hw *ah);
>
> /* LED functions */
> diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
> index 109ab7b..0d789ef 100644
> --- a/drivers/net/wireless/ath/ath5k/attach.c
> +++ b/drivers/net/wireless/ath/ath5k/attach.c
> @@ -95,14 +95,13 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
> * ath5k_hw_attach - Check if hw is supported and init the needed structs
> *
> * @sc: The &struct ath5k_softc we got from the driver's attach function
> - * @mac_version: The mac version id (check out ath5k.h) based on pci id
> *
> * Check if the device is supported, perform a POST and initialize the needed
> * structs. Returns -ENOMEM if we don't have memory for the needed structs,
> * -ENODEV if the device is not supported or prints an error msg if something
> * else went wrong.
> */
> -struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
> +struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc)
> {
> struct ath5k_hw *ah;
> struct pci_dev *pdev = sc->pdev;
> @@ -136,9 +135,15 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
> ah->ah_software_retry = false;
>
> /*
> - * Set the mac version based on the pci id
> + * Find the mac version
> */
> - ah->ah_version = mac_version;
> + srev = ath5k_hw_reg_read(ah, AR5K_SREV);
> + if (srev < AR5K_SREV_AR5311)
> + ah->ah_version = AR5K_AR5210;
> + else if (srev < AR5K_SREV_AR5212)
> + ah->ah_version = AR5K_AR5211;
> + else
> + ah->ah_version = AR5K_AR5212;
>
> /*Fill the ath5k_hw struct with the needed functions*/
> ret = ath5k_hw_init_desc_functions(ah);
> @@ -151,7 +156,6 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
> goto err_free;
>
> /* Get MAC, PHY and RADIO revisions */
> - srev = ath5k_hw_reg_read(ah, AR5K_SREV);
> ah->ah_mac_srev = srev;
> ah->ah_mac_version = AR5K_REG_MS(srev, AR5K_SREV_VER);
> ah->ah_mac_revision = AR5K_REG_MS(srev, AR5K_SREV_REV);
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index 94d46fd..9c6ab53 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -84,24 +84,24 @@ MODULE_VERSION("0.6.0 (EXPERIMENTAL)");
>
> /* Known PCI ids */
> static const struct pci_device_id ath5k_pci_id_table[] = {
> - { PCI_VDEVICE(ATHEROS, 0x0207), .driver_data = AR5K_AR5210 }, /* 5210 early */
> - { PCI_VDEVICE(ATHEROS, 0x0007), .driver_data = AR5K_AR5210 }, /* 5210 */
> - { PCI_VDEVICE(ATHEROS, 0x0011), .driver_data = AR5K_AR5211 }, /* 5311 - this is on AHB bus !*/
> - { PCI_VDEVICE(ATHEROS, 0x0012), .driver_data = AR5K_AR5211 }, /* 5211 */
> - { PCI_VDEVICE(ATHEROS, 0x0013), .driver_data = AR5K_AR5212 }, /* 5212 */
> - { PCI_VDEVICE(3COM_2, 0x0013), .driver_data = AR5K_AR5212 }, /* 3com 5212 */
> - { PCI_VDEVICE(3COM, 0x0013), .driver_data = AR5K_AR5212 }, /* 3com 3CRDAG675 5212 */
> - { PCI_VDEVICE(ATHEROS, 0x1014), .driver_data = AR5K_AR5212 }, /* IBM minipci 5212 */
> - { PCI_VDEVICE(ATHEROS, 0x0014), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x0015), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x0016), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x0017), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x0018), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x0019), .driver_data = AR5K_AR5212 }, /* 5212 combatible */
> - { PCI_VDEVICE(ATHEROS, 0x001a), .driver_data = AR5K_AR5212 }, /* 2413 Griffin-lite */
> - { PCI_VDEVICE(ATHEROS, 0x001b), .driver_data = AR5K_AR5212 }, /* 5413 Eagle */
> - { PCI_VDEVICE(ATHEROS, 0x001c), .driver_data = AR5K_AR5212 }, /* PCI-E cards */
> - { PCI_VDEVICE(ATHEROS, 0x001d), .driver_data = AR5K_AR5212 }, /* 2417 Nala */
> + { PCI_VDEVICE(ATHEROS, 0x0207) }, /* 5210 early */
> + { PCI_VDEVICE(ATHEROS, 0x0007) }, /* 5210 */
> + { PCI_VDEVICE(ATHEROS, 0x0011) }, /* 5311 - this is on AHB bus !*/
> + { PCI_VDEVICE(ATHEROS, 0x0012) }, /* 5211 */
> + { PCI_VDEVICE(ATHEROS, 0x0013) }, /* 5212 */
> + { PCI_VDEVICE(3COM_2, 0x0013) }, /* 3com 5212 */
> + { PCI_VDEVICE(3COM, 0x0013) }, /* 3com 3CRDAG675 5212 */
> + { PCI_VDEVICE(ATHEROS, 0x1014) }, /* IBM minipci 5212 */
> + { PCI_VDEVICE(ATHEROS, 0x0014) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x0015) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x0016) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x0017) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x0018) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x0019) }, /* 5212 combatible */
> + { PCI_VDEVICE(ATHEROS, 0x001a) }, /* 2413 Griffin-lite */
> + { PCI_VDEVICE(ATHEROS, 0x001b) }, /* 5413 Eagle */
> + { PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
> + { PCI_VDEVICE(ATHEROS, 0x001d) }, /* 2417 Nala */
> { 0 }
> };
> MODULE_DEVICE_TABLE(pci, ath5k_pci_id_table);
> @@ -566,7 +566,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
> }
>
> /* Initialize device */
> - sc->ah = ath5k_hw_attach(sc, id->driver_data);
> + sc->ah = ath5k_hw_attach(sc);
> if (IS_ERR(sc->ah)) {
> ret = PTR_ERR(sc->ah);
> goto err_irq;
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox