Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH v4 32/34] wireless: make mac80211 select cfg80211
From: Johannes Berg @ 2009-08-15 12:15 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Luis R. Rodriguez, linville, linux-wireless, Larry.Finger
In-Reply-To: <69e28c910908150512o68c51875j2dc644e9c5ce3359@mail.gmail.com>

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

[please trim your quotes]

On Sat, 2009-08-15 at 14:12 +0200, Gábor Stefanik wrote:

> > NAK this change, because with it, it's possible to select
> > mac80211 = Y
> > -> cfg80211 = Y
> > while rfkill = M

> Why not make cfg80211 select rfkill?

Because it doesn't require it. See net/wireless/Kconfig.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH v4 23/34] wireless: downgrade TI driver from menuconfig to config
From: Gábor Stefanik @ 2009-08-15 12:13 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Larry.Finger, Kalle Valo
In-Reply-To: <1250281559-13041-24-git-send-email-lrodriguez@atheros.com>

On Fri, Aug 14, 2009 at 10:25 PM, Luis R.
Rodriguez<lrodriguez@atheros.com> wrote:
> There's only a few options here so let this expand upon
> selection.
>
> Cc: Kalle Valo <kalle.valo@nokia.com>
> Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>  drivers/net/wireless/wl12xx/Kconfig |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig
> index 1818e45..78029fd 100644
> --- a/drivers/net/wireless/wl12xx/Kconfig
> +++ b/drivers/net/wireless/wl12xx/Kconfig
> @@ -1,10 +1,12 @@
> -menuconfig WL12XX
> +config WL12XX
>        boolean "TI wl12xx driver support"
>        depends on MAC80211 && EXPERIMENTAL
>        ---help---
>          This will enable TI wl12xx driver support. The drivers make
>          use of the mac80211 stack.
>
> +if WL12XX
> +
>  config WL1251
>        tristate "TI wl1251 support"
>        depends on WL12XX && GENERIC_HARDIRQS

If "if WL12XX", then no need to depend on WL12XX.

> @@ -50,3 +52,5 @@ config WL1271
>
>          If you choose to build a module, it'll be called wl1271. Say N if
>          unsure.
> +
> +endif # WL12XX
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* Re: [PATCH v4 32/34] wireless: make mac80211 select cfg80211
From: Gábor Stefanik @ 2009-08-15 12:12 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Luis R. Rodriguez, linville, linux-wireless, Larry.Finger
In-Reply-To: <1250283993.4411.1.camel@johannes.local>

On Fri, Aug 14, 2009 at 11:06 PM, Johannes
Berg<johannes@sipsolutions.net> wrote:
> On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:
>> We can now remove that comment about mac80211 requiring
>> cfg80211 and do that for the user.
>
> "now"? What changed to make this possible?
>
> NAK this change, because with it, it's possible to select
> mac80211 = Y
> -> cfg80211 = Y
> while rfkill = M
>
> which will break the kernel build.
>
> johannes
>

Why not make cfg80211 select rfkill?

-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* Re: [PATCH v4 10/34] wireless: group Broadcom drivers on kconfig
From: Gábor Stefanik @ 2009-08-15 12:09 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, linux-wireless, Larry.Finger, Michael Buesch,
	Johannes Berg
In-Reply-To: <1250281559-13041-11-git-send-email-lrodriguez@atheros.com>

On Fri, Aug 14, 2009 at 10:25 PM, Luis R.
Rodriguez<lrodriguez@atheros.com> wrote:
> This moves Broadcom wireless drivers into their own menu.
> There are only 2 Broadcom specific drivers so we group
> them into a menu which can expand. Although rndis_wlan
> also supports Broadcom devices, RNDIS is a spec and other
> vendors could technically implement solutions with it
> as well so we keep that separate as users most likely
> won't look for those devices under a Broadcom tag.
>
> Cc: Michael Buesch <mb@bu3sch.de>
> Cc: Gábor Stefanik <netrolller.3d@gmail.com>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>  drivers/net/wireless/Kconfig |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
> index c2e88dc..150565d 100644
> --- a/drivers/net/wireless/Kconfig
> +++ b/drivers/net/wireless/Kconfig
> @@ -561,8 +561,21 @@ source "drivers/net/wireless/iwmc3200wifi/Kconfig"
>  endif # INTEL_80211
>
>  source "drivers/net/wireless/hostap/Kconfig"
> +
> +config BROADCOM_80211
> +       bool "Broadcom"
> +       depends on WLAN_80211
> +       ---help---
> +         This will enable the support for Broadcom wireless drivers. This
> +         includes b43 driver, b43legacy driver and the rndis_wlan driver.

NAK. Again, rndis_wlan is Microsoft, not Broadcom.

> +
> +if BROADCOM_80211
> +
>  source "drivers/net/wireless/b43/Kconfig"
>  source "drivers/net/wireless/b43legacy/Kconfig"
> +
> +endif # BROADCOM_80211
> +
>  source "drivers/net/wireless/rt2x00/Kconfig"
>  source "drivers/net/wireless/orinoco/Kconfig"
>  source "drivers/net/wireless/wl12xx/Kconfig"
> --
> 1.6.2.5
>
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Michael Buesch @ 2009-08-15 10:08 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Larry Finger, John W Linville, bcm43xx-dev, linux-wireless
In-Reply-To: <1250286414.8137.55.camel@mj>

On Friday 14 August 2009 23:46:54 Pavel Roskin wrote:
> On Fri, 2009-08-14 at 17:29 -0400, Pavel Roskin wrote:
> > On Fri, 2009-08-14 at 23:00 +0200, Michael Buesch wrote:
> > > On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> > > > On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> > > > 
> > > > > > -			b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> > > > > > +			b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> > > > > 
> > > 
> > > > I would just use 0x7fff here.
> > > 
> > > That does not work if 0x8000 is a #defined bit.
> > 
> > One approach would be to use a macro and tell sparse to ignore it
> > 
> > #define NEGATE(x) (__force typeof(x))(~x)
> 
> Scratch that.  It has no change to work for constants unless we hardcode
> the size, e.g. by having NEGATE16, NEGATE32 etc.
> 
> The best I could do is:
> 
> #define NEGATE16(x) (0xFFFF & ~x)
> b43_phy_mask(dev, 0x048A, NEGATE16(0x8000));

I think the real question is whether this does really prevent any bugs or whether
it just introduces new possibilities for bugs.

void my_func(u32 x);

my_func(NEGATE16(0x8000));

-- 
Greetings, Michael.

^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Michael Buesch @ 2009-08-15 10:04 UTC (permalink / raw)
  To: Pavel Roskin
  Cc: Gábor Stefanik, linux-wireless, bcm43xx-dev, Larry Finger
In-Reply-To: <1250285729.8137.48.camel@mj>

On Friday 14 August 2009 23:35:29 Pavel Roskin wrote:
> On Fri, 2009-08-14 at 23:04 +0200, Gábor Stefanik wrote:
> > On Fri, Aug 14, 2009 at 11:00 PM, Michael Buesch<mb@bu3sch.de> wrote:
> > > On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> > >> On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> > >>
> > >> > > -                 b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> > >> > > +                 b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> > >> >
> > >
> > >> I would just use 0x7fff here.
> > >
> > > That does not work if 0x8000 is a #defined bit.
> > 
> > What about ~((u16)0x8000)?
> 
> phy_g.c:974: warning: large integer implicitly truncated to unsigned
> type
> 
> >  (Or maybe ~(u16)0x8000 is enough, without
> > the extra parentheses.)
> 
> Same thing.  Sparse complains whether the cast is explicit or implicit.
> 

I still do not understand why it does complain about an _explicit_ truncation.
That's simply stupid. If I program an explicit truncation I _do_ mean to truncate the value.

-- 
Greetings, Michael.

^ permalink raw reply

* Re: [PATCH v4 34/34] wireless: mark prism54.ko as deprecated and mark for removal
From: Johannes Berg @ 2009-08-15  7:59 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, linux-wireless, Larry.Finger, aquilaver, linux-kernel,
	Dan Williams, Kai Engert, Jean Tourrilhes, Tim de Waal,
	Roy Marples, Alan Cox, Christian Lamparter, Björn Steinbrink,
	Tim Gardner
In-Reply-To: <1250281559-13041-35-git-send-email-lrodriguez@atheros.com>

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

On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:
> The preferred modules is p54.ko, which also supports FullMAC
> PCI / Cardbus devices. We schedule removal for 2.6.34. Reason
> to remove this is no one really is testing prism54.ko anymore,
> and while it works p54.ko provides support for the same hardware.
> It should be noted I have been told some FullMAC devices may not
> have worked with the SoftMAC driver but to date we have yet to
> recieve a single bug report regarding this. If there are users
> out there please let us know!

Not that I care about the changelog, but I do find it illogical to refer
to modules w/o .ko everywhere and then with .ko in the changelog. Of
course you were consistent ;)

> -	  The module will be called prism54.
> +	  When built as module you get prism54.ko

NAK this change.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* [PATCH] Don't build PCMCIA modules when PCMCIA isn't present
From: Philip A. Prindeville @ 2009-08-15  5:46 UTC (permalink / raw)
  To: John Linville; +Cc: wireless, Luis R. Rodriguez, Pavel Roskin

From: Philip A Prindeville <philipp@redfish-solutions.com>

If you're building for a platform that has (for example) no PCMCIA/
Cardbus, then having a single knob to turn to disable this is a
major win.  Especially if more devices get add later that are
PCMCIA-based.

Tested.

Signed-off-by: Philip A Prindeville <philipp@redfish-solutions.com>
---
 config.mk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 0c3ea98..a24b7bd 100644
--- a/config.mk
+++ b/config.mk
@@ -191,7 +191,9 @@ CONFIG_B43=m
 CONFIG_B43_HWRNG=y
 CONFIG_B43_PCI_AUTOSELECT=y
 CONFIG_B43_PCICORE_AUTOSELECT=y
+ifneq ($(CONFIG_PCMCIA),)
 CONFIG_B43_PCMCIA=y
+endif
 CONFIG_B43_PIO=y
 CONFIG_B43_LEDS=y
 CONFIG_B43_RFKILL=y
@@ -242,8 +244,10 @@ CONFIG_SSB_BLOCKIO=y
 CONFIG_SSB_PCIHOST_POSSIBLE=y
 CONFIG_SSB_PCIHOST=y
 CONFIG_SSB_B43_PCI_BRIDGE=y
+ifneq ($(CONFIG_PCMCIA),)
 CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
 CONFIG_SSB_PCMCIAHOST=y
+endif
 # CONFIG_SSB_DEBUG=y
 CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
 CONFIG_SSB_DRIVER_PCICORE=y
@@ -258,7 +262,9 @@ CONFIG_B44_PCI=y
 CONFIG_RTL8180=m
 
 CONFIG_ADM8211=m
+ifneq ($(CONFIG_PCMCIA),)
 CONFIG_PCMCIA_ATMEL=m
+endif
 
 CONFIG_RT2X00_LIB_PCI=m
 CONFIG_RT2400PCI=m


^ permalink raw reply related

* Re: [PATCH v4 00/34] wireless: update/re-arrange kconfigs
From: Luis R. Rodriguez @ 2009-08-15  0:49 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Larry.Finger, Luis R. Rodriguez
In-Reply-To: <1250281559-13041-1-git-send-email-lrodriguez@atheros.com>

On Fri, Aug 14, 2009 at 1:25 PM, Luis R.
Rodriguez<lrodriguez@atheros.com> wrote:
> Here is the 4th iteration of this series

John please ignore 28-33 but please do consider 1-32 and 34 unless
there are objections raised.

  Luis

^ permalink raw reply

* [PATCH v5 13/34] wireless: move AIRO_CS closer to AIRO
From: Luis R. Rodriguez @ 2009-08-15  0:45 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---

This v5 changes AIRO_CS to AIRO in the commit log subject
line as noted by Pavel.

 drivers/net/wireless/Kconfig |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 32f3203..f5d9dba 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -213,6 +213,26 @@ config AIRO
 
 	  The driver can be compiled as a module and will be named "airo".
 
+config AIRO_CS
+	tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
+	depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211
+	select WIRELESS_EXT
+	select CRYPTO
+	select CRYPTO_AES
+	---help---
+	  This is the standard Linux driver to support Cisco/Aironet PCMCIA
+	  802.11 wireless cards.  This driver is the same as the Aironet
+	  driver part of the Linux Pcmcia package.
+	  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
+	  - with or without encryption) as well as card before the Cisco
+	  acquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also
+	  supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom
+	  802.11b cards.
+
+	  This driver support both the standard Linux Wireless Extensions
+	  and Cisco proprietary API, so both the Linux Wireless Tools and the
+	  Cisco Linux utilities can be used to configure the card.
+
 config ATMEL_80211
 	bool "Atmel"
 	depends on WLAN_80211
@@ -265,26 +285,6 @@ config AT76C50X_USB
 
 endif # ATMEL_80211
 
-config AIRO_CS
-	tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
-	depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211
-	select WIRELESS_EXT
-	select CRYPTO
-	select CRYPTO_AES
-	---help---
-	  This is the standard Linux driver to support Cisco/Aironet PCMCIA
-	  802.11 wireless cards.  This driver is the same as the Aironet
-	  driver part of the Linux Pcmcia package.
-	  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
-	  - with or without encryption) as well as card before the Cisco
-	  acquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also
-	  supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom
-	  802.11b cards.
-
-	  This driver support both the standard Linux Wireless Extensions
-	  and Cisco proprietary API, so both the Linux Wireless Tools and the
-	  Cisco Linux utilities can be used to configure the card.
-
 config PCMCIA_WL3501
       tristate "Planet WL3501 PCMCIA cards"
       depends on EXPERIMENTAL && PCMCIA && WLAN_80211
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH] b43: Handle B43_PHYTYPE_LP in RX path
From: Gábor Stefanik @ 2009-08-14 22:52 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

Don't drop all packets received from an LP-PHY with WARN_ON.
Also update a comment with LP-specific information.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
 drivers/net/wireless/b43/wa.c   |    2 +-
 drivers/net/wireless/b43/xmit.c |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c
index 73e97fa..97c7916 100644
--- a/drivers/net/wireless/b43/wa.c
+++ b/drivers/net/wireless/b43/wa.c
@@ -628,7 +628,7 @@ void b43_wa_all(struct b43_wldev *dev)
 			B43_WARN_ON(1);
 		}
 		b43_wa_boards_g(dev);
-	} else { /* No N PHY support so far */
+	} else { /* No N PHY support so far, LP PHY is in phy_lp.c */
 		B43_WARN_ON(1);
 	}
 
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 5280ebc..be1c53e 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -655,6 +655,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
 		status.freq = chanid + 2400;
 		break;
 	case B43_PHYTYPE_N:
+	case B43_PHYTYPE_LP:
 		/* chanid is the SHM channel cookie. Which is the plain
 		 * channel number in b43. */
 		if (chanstat & B43_RX_CHAN_5GHZ) {
-- 
1.6.2.4




^ permalink raw reply related

* Re: [PATCH] b43: LP-PHY: Fix another TX power control abuse
From: Larry Finger @ 2009-08-14 22:12 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Broadcom Wireless, linux-wireless, Michael Buesch, Mark Huijgen
In-Reply-To: <69e28c910908141500s2e6ee71avcebffd6107fe5a1@mail.gmail.com>

Gábor Stefanik wrote:
> 2009/8/14 Larry Finger <Larry.Finger@lwfinger.net>:
>> Yes, this one got rid of the warnings.
>>
>> Larry
>>
>>
> 
> I guess the device still doesn't TX/RX.
> 

Not yet. The fact that it keeps getting shut down/restarted indicates
that the TX operations are not completing. I'm currently tracking the
path of operations.

Larry

^ permalink raw reply

* Re: [PATCH] b43: LP-PHY: Fix another TX power control abuse
From: Gábor Stefanik @ 2009-08-14 22:00 UTC (permalink / raw)
  To: Larry Finger
  Cc: John Linville, Michael Buesch, Mark Huijgen, Broadcom Wireless,
	linux-wireless
In-Reply-To: <4A85D7A3.9020009@lwfinger.net>

2009/8/14 Larry Finger <Larry.Finger@lwfinger.net>:
> Gábor Stefanik wrote:
>> This should fix the remaining WARN_ON.
>>
>> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
>> ---
>> drivers/net/wireless/b43/phy_lp.c |    7 ++++---
>> 1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/phy_lp.c
>> b/drivers/net/wireless/b43/phy_lp.c
>> index bf89173..3872a31 100644
>> --- a/drivers/net/wireless/b43/phy_lp.c
>> +++ b/drivers/net/wireless/b43/phy_lp.c
>> @@ -1059,7 +1059,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev
>> *dev)
>>     bool old_txg_ovr;
>>     u8 old_bbmult;
>>     u16 old_rf_ovr, old_rf_ovrval, old_afe_ovr, old_afe_ovrval,
>> -        old_rf2_ovr, old_rf2_ovrval, old_phy_ctl, old_txpctl;
>> +        old_rf2_ovr, old_rf2_ovrval, old_phy_ctl;
>> +    enum b43_lpphy_txpctl_mode old_txpctl;
>>     u32 normal_pwr, ideal_pwr, mean_sq_pwr, tmp = 0, mean_sq_pwr_min = 0;
>>     int loopback, i, j, inner_sum;
>>
>> @@ -1077,8 +1078,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev
>> *dev)
>>     old_rf2_ovr = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2);
>>     old_rf2_ovrval = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2_VAL);
>>     old_phy_ctl = b43_phy_read(dev, B43_LPPHY_LP_PHY_CTL);
>> -    old_txpctl = b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_CMD) &
>> -                    B43_LPPHY_TX_PWR_CTL_CMD_MODE;
>> +    lpphy_read_tx_pctl_mode_from_hardware(dev);
>> +    old_txpctl = lpphy->txpctl_mode;
>>
>>     lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
>>     lpphy_disable_crs(dev);
>
> Yes, this one got rid of the warnings.
>
> Larry
>
>

I guess the device still doesn't TX/RX.

-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* iwlwifi 1000 uCode available
From: reinette chatre @ 2009-08-14 21:55 UTC (permalink / raw)
  To: linux-wireless, ipw3945-devel

Hi,

uCode for Intel WiFi Link 1000BGN is now available for download
from http://intellinuxwireless.org/?n=Downloads

Reinette



^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Pavel Roskin @ 2009-08-14 21:46 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Larry Finger, John W Linville, bcm43xx-dev, linux-wireless
In-Reply-To: <1250285371.8137.44.camel@mj>

On Fri, 2009-08-14 at 17:29 -0400, Pavel Roskin wrote:
> On Fri, 2009-08-14 at 23:00 +0200, Michael Buesch wrote:
> > On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> > > On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> > > 
> > > > > -			b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> > > > > +			b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> > > > 
> > 
> > > I would just use 0x7fff here.
> > 
> > That does not work if 0x8000 is a #defined bit.
> 
> One approach would be to use a macro and tell sparse to ignore it
> 
> #define NEGATE(x) (__force typeof(x))(~x)

Scratch that.  It has no change to work for constants unless we hardcode
the size, e.g. by having NEGATE16, NEGATE32 etc.

The best I could do is:

#define NEGATE16(x) (0xFFFF & ~x)
b43_phy_mask(dev, 0x048A, NEGATE16(0x8000));

> Another approach would be to have b43_phy_mask() and similar functions
> accept int and do the bit cutting in one place.

I tend to think that it would be the best approach.

> It should also be possible to have separate functions e.g.
> b43_phy_unmask() that would do the negation, so that the caller won't
> need to do it.

This could make the code hard to read.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Pavel Roskin @ 2009-08-14 21:35 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Michael Buesch, linux-wireless, bcm43xx-dev, Larry Finger
In-Reply-To: <69e28c910908141404q42685aebo93718a7504020c06@mail.gmail.com>

On Fri, 2009-08-14 at 23:04 +0200, Gábor Stefanik wrote:
> On Fri, Aug 14, 2009 at 11:00 PM, Michael Buesch<mb@bu3sch.de> wrote:
> > On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> >> On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> >>
> >> > > -                 b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> >> > > +                 b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> >> >
> >
> >> I would just use 0x7fff here.
> >
> > That does not work if 0x8000 is a #defined bit.
> 
> What about ~((u16)0x8000)?

phy_g.c:974: warning: large integer implicitly truncated to unsigned
type

>  (Or maybe ~(u16)0x8000 is enough, without
> the extra parentheses.)

Same thing.  Sparse complains whether the cast is explicit or implicit.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Larry Finger @ 2009-08-14 21:33 UTC (permalink / raw)
  To: Michael Buesch, John W Linville; +Cc: bcm43xx-dev, linux-wireless
In-Reply-To: <200908142215.38112.mb@bu3sch.de>

Michael Buesch wrote:
> On Friday 14 August 2009 00:15:07 Larry Finger wrote:
>> The b43 driver generates the following sparse warnings:
>>
>>   CHECK   drivers/net/wireless/b43/phy_g.c
>> drivers/net/wireless/b43/phy_g.c:974:35: warning: cast truncates bits from constant value (ffff7fff becomes 7fff)
>>   CHECK   drivers/net/wireless/b43/wa.c
>> drivers/net/wireless/b43/wa.c:385:53: warning: cast truncates bits from constant value (ffff00ff becomes ff)
>> drivers/net/wireless/b43/wa.c:403:48: warning: cast truncates bits from constant value (ffff00ff becomes ff)
>> drivers/net/wireless/b43/wa.c:405:48: warning: cast truncates bits from constant value (ffff00ff becomes ff)
>> drivers/net/wireless/b43/wa.c:415:50: warning: cast truncates bits from constant value (ffff0fff becomes fff)
>>
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> ---
>>
>> John,
>>
>> There is no hurry for this material.
>>
>> Larry
>> ---
>>
>> Index: wireless-testing/drivers/net/wireless/b43/phy_g.c
>> ===================================================================
>> --- wireless-testing.orig/drivers/net/wireless/b43/phy_g.c
>> +++ wireless-testing/drivers/net/wireless/b43/phy_g.c
>> @@ -971,7 +971,7 @@ b43_radio_interference_mitigation_enable
>>  		b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
>>  
>>  		if (phy->rev >= 3) {
>> -			b43_phy_mask(dev, 0x048A, (u16)~0x8000);
>> +			b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> 
> Uh come on...
> The u16 cast already is stupid as hell, but this is becoming braindead.
> The code is perfectly fine. Sparse should instead provide an option to disable
> this fragile check.

John,

Just drop this patch. The code is OK as is.

Larry

^ permalink raw reply

* Re: [PATCH] b43: LP-PHY: Fix another TX power control abuse
From: Larry Finger @ 2009-08-14 21:31 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: John Linville, Michael Buesch, Mark Huijgen, Broadcom Wireless,
	linux-wireless
In-Reply-To: <4A85D070.6070702@gmail.com>

Gábor Stefanik wrote:
> This should fix the remaining WARN_ON.
> 
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> drivers/net/wireless/b43/phy_lp.c |    7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/b43/phy_lp.c
> b/drivers/net/wireless/b43/phy_lp.c
> index bf89173..3872a31 100644
> --- a/drivers/net/wireless/b43/phy_lp.c
> +++ b/drivers/net/wireless/b43/phy_lp.c
> @@ -1059,7 +1059,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev
> *dev)
>     bool old_txg_ovr;
>     u8 old_bbmult;
>     u16 old_rf_ovr, old_rf_ovrval, old_afe_ovr, old_afe_ovrval,
> -        old_rf2_ovr, old_rf2_ovrval, old_phy_ctl, old_txpctl;
> +        old_rf2_ovr, old_rf2_ovrval, old_phy_ctl;
> +    enum b43_lpphy_txpctl_mode old_txpctl;
>     u32 normal_pwr, ideal_pwr, mean_sq_pwr, tmp = 0, mean_sq_pwr_min = 0;
>     int loopback, i, j, inner_sum;
> 
> @@ -1077,8 +1078,8 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev
> *dev)
>     old_rf2_ovr = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2);
>     old_rf2_ovrval = b43_phy_read(dev, B43_LPPHY_RF_OVERRIDE_2_VAL);
>     old_phy_ctl = b43_phy_read(dev, B43_LPPHY_LP_PHY_CTL);
> -    old_txpctl = b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_CMD) &
> -                    B43_LPPHY_TX_PWR_CTL_CMD_MODE;
> +    lpphy_read_tx_pctl_mode_from_hardware(dev);
> +    old_txpctl = lpphy->txpctl_mode;
> 
>     lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
>     lpphy_disable_crs(dev);

Yes, this one got rid of the warnings.

Larry


^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Pavel Roskin @ 2009-08-14 21:29 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Larry Finger, John W Linville, bcm43xx-dev, linux-wireless
In-Reply-To: <200908142300.01397.mb@bu3sch.de>

On Fri, 2009-08-14 at 23:00 +0200, Michael Buesch wrote:
> On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
> > On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
> > 
> > > > -			b43_phy_mask(dev, 0x048A, (u16)~0x8000);
> > > > +			b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
> > > 
> 
> > I would just use 0x7fff here.
> 
> That does not work if 0x8000 is a #defined bit.

One approach would be to use a macro and tell sparse to ignore it

#define NEGATE(x) (__force typeof(x))(~x)

Another approach would be to have b43_phy_mask() and similar functions
accept int and do the bit cutting in one place.

It should also be possible to have separate functions e.g.
b43_phy_unmask() that would do the negation, so that the caller won't
need to do it.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: [PATCH v4 28/34] wireless: update cfg80211 kconfig entry
From: Johannes Berg @ 2009-08-14 21:13 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Larry.Finger
In-Reply-To: <1250281559-13041-29-git-send-email-lrodriguez@atheros.com>

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

On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:

>  config CFG80211
> -	tristate "Improved wireless configuration API"
> +	tristate "cfg80211 - wireless configuration API"
> +	---help---
> +	  cfg80211 is the Linux wireless LAN (802.11) configuration API.
> +	  Enable this if you have a wireless device or if you just want
> +	  to test the wireless subsystem (see mac80211_hwsim).

This is not really correct, hwsim depends on mac80211, not cfg80211 --
the latter only implicitly.

>  cfg80211
> +	  allows for device drivers to register themselves with the
> +	  networking subsystem and allows for userspace configuration
> +	  through a generic netlink family for wireless called nl80211.

Again, too much background information. Nobody cares at this point -- it
should answer the question "will this help get my hardware working?"

> +	  For more information refer to documentation on the wireless wiki:
> +
> +	  http://wireless.kernel.org/en/developers/Documentation/cfg80211
> +
> +	  When built as a module cfg80211 will be built as cfg80211.ko

Again -- don't mention .ko.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH v4 31/34] wireless: update mac80211 kconfig entry
From: Johannes Berg @ 2009-08-14 21:12 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Larry.Finger, Jouni Malinen
In-Reply-To: <1250281559-13041-32-git-send-email-lrodriguez@atheros.com>

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


> -	  This option enables the hardware independent IEEE 802.11
> -	  networking stack.
> +	  This option enables support for a framework used by IEEE-802.11
> +	  SoftMAC devices. SoftMAC devices allow for a finer control of the
> +	  hardware, allowing for 802.11 frame management to be done in software
> +	  for them, for both parsing and generation of 802.11 wireless frames.
> +	  Most 802.11 devices today tend to be of this type.


> +	  mac8011 implements the cfg80211 callbacks for SoftMAC devices,

mac80211

> +	  mac80211 then depends on cfg80211 for both registration to the networking
> +	  subsystem and for configuration. Configuration is handled by cfg80211 both
> +	  through nl80211 and wireless extensions.
> +
> +	  If you have new userspace utitlities which support nl80211 you do not

utilities

> +	  need wireless-extensions to support a mac80211 device.

And in any case I really don't see a need to explain the wireless
configuration stuff in a Kconfig entry.


IMHO the text should be short and to the point, your texts give too much
background information that doesn't help anyone except people who
already know about wireless stuff to make a choice.


> +	  For more information refer the the wireless wiki entry on mac80211:
> +
> +	  http://wireless.kernel.org/en/developers/Documentation/mac80211
> +
> +	  When built as a module mac80211 will be built as mac80211.ko, if not sure
> +	  you should build this as a module.

We do not include the '.ko' in the module name, just say "The module
will be named mac80211" or so.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH v4 30/34] wireless: update WIRELESS_EXT kconfig entry
From: Johannes Berg @ 2009-08-14 21:09 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Larry.Finger
In-Reply-To: <1250281559-13041-31-git-send-email-lrodriguez@atheros.com>

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

On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:
> Provide more documentation as to why its being deprecated.
> 
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>  net/wireless/Kconfig |   12 ++++++++++--
>  1 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
> index 60dd09e..b07ed2c 100644
> --- a/net/wireless/Kconfig
> +++ b/net/wireless/Kconfig
> @@ -86,8 +86,16 @@ config WIRELESS_EXT
>  	bool "Wireless extensions"
>  	default y
>  	---help---
> -	  This option enables the legacy wireless extensions
> -	  (wireless network interface configuration via ioctls.)
> +	  This option enables the legacy wireless extensions.
> +	  Wireless extensions was the first 802.11 wireless configuration
> +	  API used by the networking subsystem. You will not need this unless
> +	  you have old userspace utilities or old wireless devices which
> +	  have not yet been ported to cfg80211.

I cannot agree with this wording -- all current tools still use wext
unless you go really experimental.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH v4 32/34] wireless: make mac80211 select cfg80211
From: Johannes Berg @ 2009-08-14 21:06 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Larry.Finger
In-Reply-To: <1250281559-13041-33-git-send-email-lrodriguez@atheros.com>

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

On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:
> We can now remove that comment about mac80211 requiring
> cfg80211 and do that for the user.

"now"? What changed to make this possible?

NAK this change, because with it, it's possible to select
mac80211 = Y
-> cfg80211 = Y
while rfkill = M

which will break the kernel build.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH] b43: Fix sparse warnings
From: Gábor Stefanik @ 2009-08-14 21:04 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Pavel Roskin, linux-wireless, bcm43xx-dev, Larry Finger
In-Reply-To: <200908142300.01397.mb@bu3sch.de>

On Fri, Aug 14, 2009 at 11:00 PM, Michael Buesch<mb@bu3sch.de> wrote:
> On Friday 14 August 2009 22:52:13 Pavel Roskin wrote:
>> On Fri, 2009-08-14 at 22:15 +0200, Michael Buesch wrote:
>>
>> > > -                 b43_phy_mask(dev, 0x048A, (u16)~0x8000);
>> > > +                 b43_phy_mask(dev, 0x048A, (u16)(~0x8000 & 0xFFFF));
>> >
>
>> I would just use 0x7fff here.
>
> That does not work if 0x8000 is a #defined bit.

What about ~((u16)0x8000)? (Or maybe ~(u16)0x8000 is enough, without
the extra parentheses.)

>
> --
> Greetings, Michael.
> _______________________________________________
> Bcm43xx-dev mailing list
> Bcm43xx-dev@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* Re: [PATCH v4 13/34] wireless: move AIRO_CS closer to AIRO_CS
From: Gábor Stefanik @ 2009-08-14 21:02 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Luis R. Rodriguez, linville, linux-wireless, Larry.Finger
In-Reply-To: <1250283432.8137.19.camel@mj>

On Fri, Aug 14, 2009 at 10:57 PM, Pavel Roskin<proski@gnu.org> wrote:
> On Fri, 2009-08-14 at 16:25 -0400, Luis R. Rodriguez wrote:
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>
> You mean "wireless: move AIRO_CS closer to AIRO"
>
> Otherwise it's sort of pointless :-)
>

Unless AIRO_CS has a split personality. :-)

-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox