Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] b43: LP-PHY: Update code for spec fixes, and fix a few typos
From: Michael Buesch @ 2009-08-16 13:42 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
	linux-wireless
In-Reply-To: <4A88090D.3070107@gmail.com>

On Sunday 16 August 2009 15:26:37 Gábor Stefanik wrote:
> A few typos have been discovered both in the specs in and our code.
> This patch fixes them.
> 
> Also use lpphy_op_switch_channel consistently, and make all callers
> print its return value for easier debugging.
> 
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> I think using a forward declaration is justified in this case;
> as avoiding the forward decl would require moving around huge
> blocks of code, completely breaking any logical ordering.

I don't think so, but I'll ack this anyway.

-- 
Greetings, Michael.

^ permalink raw reply

* [RFT] Threaded IRQ handlers for b43
From: Michael Buesch @ 2009-08-16 13:39 UTC (permalink / raw)
  To: bcm43xx-dev; +Cc: linux-wireless

This request-for-test patch converts the b43 driver to use threaded
interrupt handlers. This is needed to support b43 on SDIO. But it also
simplifies the locking by removal of the wl->irq_lock spinlock.

http://bu3sch.de/patches/wireless-testing/20090816-1535/patches/002-b43-threaded-irq-handler.patch

A known regression is a new race between the interrupt handler and the
beacon update handler. But as long as you don't run AP mode, it won't hurt.
I'm working on a solution...

Please test this patch whether it creates other regressions (performance and crashes).

The patch also needs the following hack to the threaded IRQ code:
http://bu3sch.de/patches/wireless-testing/20090816-1535/patches/001-hack-threaded-irqs.patch

-- 
Greetings, Michael.

^ permalink raw reply

* [PATCH] b43: LP-PHY: Fix a spec error in the B2062 channel switch routine
From: Gábor Stefanik @ 2009-08-16 13:32 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

The channel switch routine had a whole instruction missing. Add it.

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

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index a51da6e..3889519 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1939,6 +1939,10 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
 	tmp5 = tmp7 * 0x100;
 	tmp6 = tmp5 / tmp4;
 	tmp7 = tmp5 % tmp4;
+	b43_radio_write(dev, B2062_S_RFPLL_CTL27, tmp6);
+	tmp5 = tmp7 * 0x100;
+	tmp6 = tmp5 / tmp4;
+	tmp7 = tmp5 % tmp4;
 	b43_radio_write(dev, B2062_S_RFPLL_CTL28, tmp6);
 	tmp5 = tmp7 * 0x100;
 	tmp6 = tmp5 / tmp4;
-- 
1.6.2.4




^ permalink raw reply related

* [PATCH] b43: LP-PHY: Update code for spec fixes, and fix a few typos
From: Gábor Stefanik @ 2009-08-16 13:26 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

A few typos have been discovered both in the specs in and our code.
This patch fixes them.

Also use lpphy_op_switch_channel consistently, and make all callers
print its return value for easier debugging.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
I think using a forward declaration is justified in this case;
as avoiding the forward decl would require moving around huge
blocks of code, completely breaking any logical ordering.

 drivers/net/wireless/b43/phy_lp.c |   51 ++++++++++++++++++++++++------------
 1 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index e4a040b..a51da6e 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -552,7 +552,7 @@ static void lpphy_2062_init(struct b43_wldev *dev)
 	B43_WARN_ON(!(bus->chipco.capabilities & SSB_CHIPCO_CAP_PMU));
 	B43_WARN_ON(crystalfreq == 0);
 
-	if (crystalfreq >= 30000000) {
+	if (crystalfreq <= 30000000) {
 		lpphy->pdiv = 1;
 		b43_radio_mask(dev, B2062_S_RFPLL_CTL1, 0xFFFB);
 	} else {
@@ -560,14 +560,16 @@ static void lpphy_2062_init(struct b43_wldev *dev)
 		b43_radio_set(dev, B2062_S_RFPLL_CTL1, 0x4);
 	}
 
-	tmp = (800000000 * lpphy->pdiv + crystalfreq) /
-	      (32000000 * lpphy->pdiv);
-	tmp = (tmp - 1) & 0xFF;
+	tmp = (((800000000 * lpphy->pdiv + crystalfreq) /
+	      (2 * crystalfreq)) - 8) & 0xFF;
+	b43_radio_write(dev, B2062_S_RFPLL_CTL7, tmp);
+
+	tmp = (((100 * crystalfreq + 16000000 * lpphy->pdiv) /
+	      (32000000 * lpphy->pdiv)) - 1) & 0xFF;
 	b43_radio_write(dev, B2062_S_RFPLL_CTL18, tmp);
 
-	tmp = (2 * crystalfreq + 1000000 * lpphy->pdiv) /
-	      (2000000 * lpphy->pdiv);
-	tmp = ((tmp & 0xFF) - 1) & 0xFFFF;
+	tmp = (((2 * crystalfreq + 1000000 * lpphy->pdiv) /
+	      (2000000 * lpphy->pdiv)) - 1) & 0xFF;
 	b43_radio_write(dev, B2062_S_RFPLL_CTL19, tmp);
 
 	ref = (1000 * lpphy->pdiv + 2 * crystalfreq) / (2000 * lpphy->pdiv);
@@ -671,7 +673,7 @@ static void lpphy_radio_init(struct b43_wldev *dev)
 	b43_phy_mask(dev, B43_LPPHY_FOURWIRE_CTL, 0xFFFD);
 	udelay(1);
 
-	if (dev->phy.rev < 2) {
+	if (dev->phy.radio_ver == 0x2062) {
 		lpphy_2062_init(dev);
 	} else {
 		lpphy_2063_init(dev);
@@ -688,11 +690,18 @@ struct lpphy_iq_est { u32 iq_prod, i_pwr, q_pwr; };
 
 static void lpphy_set_rc_cap(struct b43_wldev *dev)
 {
-	u8 rc_cap = dev->phy.lp->rc_cap;
+	struct b43_phy_lp *lpphy = dev->phy.lp;
 
-	b43_radio_write(dev, B2062_N_RXBB_CALIB2, max_t(u8, rc_cap-4, 0x80));
-	b43_radio_write(dev, B2062_N_TX_CTL_A, ((rc_cap & 0x1F) >> 1) | 0x80);
-	b43_radio_write(dev, B2062_S_RXG_CNT16, ((rc_cap & 0x1F) >> 2) | 0x80);
+	u8 rc_cap = (lpphy->rc_cap & 0x1F) >> 1;
+	
+	if (dev->phy.rev == 1) //FIXME check channel 14!
+		rc_cap = max_t(u8, rc_cap + 5, 15);
+
+	b43_radio_write(dev, B2062_N_RXBB_CALIB2,
+			max_t(u8, lpphy->rc_cap - 4, 0x80));
+	b43_radio_write(dev, B2062_N_TX_CTL_A, rc_cap | 0x80);
+	b43_radio_write(dev, B2062_S_RXG_CNT16,
+			((lpphy->rc_cap & 0x1F) >> 2) | 0x80);
 }
 
 static u8 lpphy_get_bb_mult(struct b43_wldev *dev)
@@ -1101,6 +1110,9 @@ static void lpphy_set_tx_power_control(struct b43_wldev *dev,
 	lpphy_write_tx_pctl_mode_to_hardware(dev);
 }
 
+static int b43_lpphy_op_switch_channel(struct b43_wldev *dev,
+				       unsigned int new_channel);
+
 static void lpphy_rev0_1_rc_calib(struct b43_wldev *dev)
 {
 	struct b43_phy_lp *lpphy = dev->phy.lp;
@@ -1118,11 +1130,16 @@ static void lpphy_rev0_1_rc_calib(struct b43_wldev *dev)
 	    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;
+	int loopback, i, j, inner_sum, err;
 
 	memset(&iq_est, 0, sizeof(iq_est));
 
-	b43_switch_channel(dev, 7);
+	err = b43_lpphy_op_switch_channel(dev, 7);
+	if (err) {
+		b43dbg(dev->wl,
+		       "RC calib: Failed to switch to channel 7, error = %d",
+		       err);
+	}
 	old_txg_ovr = (b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) >> 6) & 1;
 	old_bbmult = lpphy_get_bb_mult(dev);
 	if (old_txg_ovr)
@@ -1881,14 +1898,14 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
 {
 	struct b43_phy_lp *lpphy = dev->phy.lp;
 	struct ssb_bus *bus = dev->dev->bus;
-	static const struct b206x_channel *chandata = NULL;
+	const struct b206x_channel *chandata = NULL;
 	u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000;
 	u32 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
 	int i, err = 0;
 
-	for (i = 0; i < ARRAY_SIZE(b2063_chantbl); i++) {
+	for (i = 0; i < ARRAY_SIZE(b2062_chantbl); i++) {
 		if (b2063_chantbl[i].channel == channel) {
-			chandata = &b2063_chantbl[i];
+			chandata = &b2062_chantbl[i];
 			break;
 		}
 	}
-- 
1.6.2.4




^ permalink raw reply related

* Re: [PATCH v4 10/34] wireless: group Broadcom drivers on kconfig
From: Gábor Stefanik @ 2009-08-16 13:15 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linville, linux-wireless, Larry.Finger, Michael Buesch,
	Johannes Berg
In-Reply-To: <43e72e890908151505s6cd9fea0p722de5a781a8ba8b@mail.gmail.com>

2009/8/16 Luis R. Rodriguez <lrodriguez@atheros.com>:
> 2009/8/15 Gábor Stefanik <netrolller.3d@gmail.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.
>
> Yes, the patch does not group rndis with broadcom, please re-read the patch.
>
>  Luis
>

But it does say "This includes b43 driver, b43legacy driver and the
rndis_wlan driver.", which is wrong.

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

^ permalink raw reply

* Re: [PATCH] cfg80211: fix deadlock
From: Christian Lamparter @ 2009-08-16 11:59 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless
In-Reply-To: <1250422358.17522.0.camel@johannes.local>

On Sunday 16 August 2009 13:32:38 Johannes Berg wrote:
> When removing an interface with nl80211, cfg80211 will
> deadlock in the netdev notifier because we're already
> holding rdev->mtx and try to acquire it again to verify
> the scan has been done.
> 
> This bug was introduced by my patch
> "cfg80211: check for and abort dangling scan requests".
> 
> To fix this, move the dangling scan request check into
> wiphy_unregister(). This will not be able to catch all
> cases right away, but if the scan problem happens with
> a manual ifdown or so it will be possible to remedy it
> by removing the module/device.
> 
> Additionally, add comments about the deadlock scenario.
> 
> Reported-by: Christian Lamparter <chunkeey@web.de>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Christian Lamparter <chunkeey@web.de>
> ---
>  net/wireless/core.c |   32 +++++++++++++++++++-------------
>  1 file changed, 19 insertions(+), 13 deletions(-)
> 
> --- wireless-testing.orig/net/wireless/core.c	2009-08-16 13:22:52.000000000 +0200
> +++ wireless-testing/net/wireless/core.c	2009-08-16 13:28:12.000000000 +0200
> @@ -586,9 +586,15 @@ void wiphy_unregister(struct wiphy *wiph
>  	 * get to lock contention here if userspace issues a command
>  	 * that identified the hardware by wiphy index.
>  	 */
> -	mutex_lock(&rdev->mtx);
> -	/* unlock again before freeing */
> -	mutex_unlock(&rdev->mtx);
> +	cfg80211_lock_rdev(rdev);
> +
> +	if (WARN_ON(rdev->scan_req)) {
> +		rdev->scan_req->aborted = true;
> +		___cfg80211_scan_done(rdev);
> +	}
> +
> +	cfg80211_unlock_rdev(rdev);
> +	flush_work(&rdev->scan_done_wk);
>  
>  	cfg80211_debugfs_rdev_del(rdev);
>  
> @@ -603,9 +609,7 @@ void wiphy_unregister(struct wiphy *wiph
>  
>  	mutex_unlock(&cfg80211_mutex);
>  
> -	flush_work(&rdev->scan_done_wk);
>  	cancel_work_sync(&rdev->conn_work);
> -	kfree(rdev->scan_req);
>  	flush_work(&rdev->event_work);
>  }
>  EXPORT_SYMBOL(wiphy_unregister);
> @@ -653,6 +657,11 @@ static int cfg80211_netdev_notifier_call
>  
>  	switch (state) {
>  	case NETDEV_REGISTER:
> +		/*
> +		 * NB: cannot take rdev->mtx here because this may be
> +		 * called within code protected by it when interfaces
> +		 * are added with nl80211.
> +		 */
>  		mutex_init(&wdev->mtx);
>  		INIT_LIST_HEAD(&wdev->event_list);
>  		spin_lock_init(&wdev->event_lock);
> @@ -730,13 +739,11 @@ static int cfg80211_netdev_notifier_call
>  #endif
>  		break;
>  	case NETDEV_UNREGISTER:
> -		cfg80211_lock_rdev(rdev);
> -
> -		if (WARN_ON(rdev->scan_req && rdev->scan_req->dev == dev)) {
> -			rdev->scan_req->aborted = true;
> -			___cfg80211_scan_done(rdev);
> -		}
> -
> +		/*
> +		 * NB: cannot take rdev->mtx here because this may be
> +		 * called within code protected by it when interfaces
> +		 * are removed with nl80211.
> +		 */
>  		mutex_lock(&rdev->devlist_mtx);
>  		/*
>  		 * It is possible to get NETDEV_UNREGISTER
> @@ -755,7 +762,6 @@ static int cfg80211_netdev_notifier_call
>  #endif
>  		}
>  		mutex_unlock(&rdev->devlist_mtx);
> -		cfg80211_unlock_rdev(rdev);
>  		break;
>  	case NETDEV_PRE_UP:
>  		if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype)))
> 
> 

^ permalink raw reply

* [PATCH] cfg80211: fix deadlock
From: Johannes Berg @ 2009-08-16 11:32 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Christian Lamparter

When removing an interface with nl80211, cfg80211 will
deadlock in the netdev notifier because we're already
holding rdev->mtx and try to acquire it again to verify
the scan has been done.

This bug was introduced by my patch
"cfg80211: check for and abort dangling scan requests".

To fix this, move the dangling scan request check into
wiphy_unregister(). This will not be able to catch all
cases right away, but if the scan problem happens with
a manual ifdown or so it will be possible to remedy it
by removing the module/device.

Additionally, add comments about the deadlock scenario.

Reported-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/wireless/core.c |   32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

--- wireless-testing.orig/net/wireless/core.c	2009-08-16 13:22:52.000000000 +0200
+++ wireless-testing/net/wireless/core.c	2009-08-16 13:28:12.000000000 +0200
@@ -586,9 +586,15 @@ void wiphy_unregister(struct wiphy *wiph
 	 * get to lock contention here if userspace issues a command
 	 * that identified the hardware by wiphy index.
 	 */
-	mutex_lock(&rdev->mtx);
-	/* unlock again before freeing */
-	mutex_unlock(&rdev->mtx);
+	cfg80211_lock_rdev(rdev);
+
+	if (WARN_ON(rdev->scan_req)) {
+		rdev->scan_req->aborted = true;
+		___cfg80211_scan_done(rdev);
+	}
+
+	cfg80211_unlock_rdev(rdev);
+	flush_work(&rdev->scan_done_wk);
 
 	cfg80211_debugfs_rdev_del(rdev);
 
@@ -603,9 +609,7 @@ void wiphy_unregister(struct wiphy *wiph
 
 	mutex_unlock(&cfg80211_mutex);
 
-	flush_work(&rdev->scan_done_wk);
 	cancel_work_sync(&rdev->conn_work);
-	kfree(rdev->scan_req);
 	flush_work(&rdev->event_work);
 }
 EXPORT_SYMBOL(wiphy_unregister);
@@ -653,6 +657,11 @@ static int cfg80211_netdev_notifier_call
 
 	switch (state) {
 	case NETDEV_REGISTER:
+		/*
+		 * NB: cannot take rdev->mtx here because this may be
+		 * called within code protected by it when interfaces
+		 * are added with nl80211.
+		 */
 		mutex_init(&wdev->mtx);
 		INIT_LIST_HEAD(&wdev->event_list);
 		spin_lock_init(&wdev->event_lock);
@@ -730,13 +739,11 @@ static int cfg80211_netdev_notifier_call
 #endif
 		break;
 	case NETDEV_UNREGISTER:
-		cfg80211_lock_rdev(rdev);
-
-		if (WARN_ON(rdev->scan_req && rdev->scan_req->dev == dev)) {
-			rdev->scan_req->aborted = true;
-			___cfg80211_scan_done(rdev);
-		}
-
+		/*
+		 * NB: cannot take rdev->mtx here because this may be
+		 * called within code protected by it when interfaces
+		 * are removed with nl80211.
+		 */
 		mutex_lock(&rdev->devlist_mtx);
 		/*
 		 * It is possible to get NETDEV_UNREGISTER
@@ -755,7 +762,6 @@ static int cfg80211_netdev_notifier_call
 #endif
 		}
 		mutex_unlock(&rdev->devlist_mtx);
-		cfg80211_unlock_rdev(rdev);
 		break;
 	case NETDEV_PRE_UP:
 		if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype)))



^ permalink raw reply

* [PATCH v3] b43: LP-PHY: Update baseband init for recent spec changes
From: Gábor Stefanik @ 2009-08-15 23:15 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

The spec had some nasty typos, and a large part of the rev0/1 BB
init procedure was also missing. Fix these.

Also make the init-time channel switch debuggable.

(The change from -EINVAL to -EIO is simply to make it possible
to distinguish the PLL charge pump error from a channel-not-found
error.)

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
V2: Coding style fix suggested by Michael on IRC.
V3: Another coding style fix.

 drivers/net/wireless/b43/phy_lp.c |   73 ++++++++++++++++++++++++++++++++++---
 1 files changed, 68 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3872a31..e4a040b 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -204,8 +204,62 @@ static void lpphy_table_init(struct b43_wldev *dev)
 static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 {
 	struct ssb_bus *bus = dev->dev->bus;
+	struct b43_phy_lp *lpphy = dev->phy.lp;
 	u16 tmp, tmp2;
 
+	b43_phy_mask(dev, B43_LPPHY_AFE_DAC_CTL, 0xF7FF);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL, 0);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVR, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_0, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0);
+	b43_phy_set(dev, B43_LPPHY_AFE_DAC_CTL, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_OFDMSYNCTHRESH0, 0xFF00, 0x0078);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x5800);
+	b43_phy_write(dev, B43_LPPHY_ADC_COMPENSATION_CTL, 0x0016);
+	b43_phy_maskset(dev, B43_LPPHY_AFE_ADC_CTL_0, 0xFFF8, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5400);
+	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2400);
+	b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x2100);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0x0006);
+	b43_phy_mask(dev, B43_LPPHY_RX_RADIO_CTL, 0xFFFE);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC10, 0x0180);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x3800);
+	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xFFF0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_GAIN_MISMATCH_LIMIT, 0xFFC0, 0x001A);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0xFF00, 0x00B3);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0x00FF, 0xAD00);
+	b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB,
+			0xFF00, lpphy->rx_pwr_offset);
+	if ((bus->sprom.boardflags_lo & B43_BFL_FEM) &&
+	   ((b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ||
+	   (bus->sprom.boardflags_hi & B43_BFH_PAREF))) {
+		/* TODO:
+		 * Set the LDO voltage to 0x0028 - FIXME: What is this?
+		 * Call sb_pmu_set_ldo_voltage with 4 and the LDO voltage
+		 * 	as arguments
+		 * Call sb_pmu_paref_ldo_enable with argument TRUE
+		 */
+		if (dev->phy.rev == 0) {
+		       	b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+					0xFFCF, 0x0010);
+		}
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 60);
+	} else {
+		//TODO: Call ssb_pmu_paref_ldo_enable with argument FALSE
+		b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+				0xFFCF, 0x0020);
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 100);
+	}
+	tmp = lpphy->rssi_vf | lpphy->rssi_vc << 4 | 0xA000;
+	b43_phy_write(dev, B43_LPPHY_AFE_RSSI_CTL_0, tmp);
+	if (bus->sprom.boardflags_hi & B43_BFH_RSSIINV)
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x0AAA);
+	else
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x02AA);
+	b43_lptab_write(dev, B43_LPTAB16(11, 1), 24);
+	b43_phy_maskset(dev, B43_LPPHY_RX_RADIO_CTL,
+			0xFFF9, (lpphy->bx_arch << 1));
 	if (dev->phy.rev == 1 &&
 	   (bus->sprom.boardflags_hi & B43_BFH_FEM_BT)) {
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x000A);
@@ -255,7 +309,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0006);
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0700);
 	}
-	if (dev->phy.rev == 1) {
+	if (dev->phy.rev == 1 && (bus->sprom.boardflags_hi & B43_BFH_PAREF)) {
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_5, B43_LPPHY_TR_LOOKUP_1);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_6, B43_LPPHY_TR_LOOKUP_2);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_7, B43_LPPHY_TR_LOOKUP_3);
@@ -267,6 +321,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0006);
 		b43_phy_write(dev, B43_LPPHY_GPIO_SELECT, 0x0005);
 		b43_phy_write(dev, B43_LPPHY_GPIO_OUTEN, 0xFFFF);
+		//FIXME the Broadcom driver caches & delays this HF write!
 		b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W);
 	}
 	if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
@@ -384,7 +439,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_PWR_THRESH1, 0xFFF0, 0x9);
 	b43_phy_mask(dev, B43_LPPHY_GAINDIRECTMISMATCH, ~0xF);
 	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5500);
-	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xF81F, 0xA0);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC1F, 0xA0);
 	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xE0FF, 0x300);
 	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2A00);
 	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
@@ -405,7 +460,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x12);
 	b43_phy_maskset(dev, B43_LPPHY_GAINMISMATCH, 0x0FFF, 0x9000);
 
-	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 1)) {
+	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x14), 0);
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40);
 	}
@@ -416,6 +471,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0x9D00);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0xFF00, 0xA1);
+		b43_phy_mask(dev, B43_LPPHY_IDLEAFTERPKTRXTO, 0x00FF);
 	} else /* 5GHz */
 		b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x40);
 
@@ -1883,7 +1939,7 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
 		lpphy_b2062_reset_pll_bias(dev);
 		lpphy_b2062_vco_calib(dev);
 		if (b43_radio_read(dev, B2062_S_RFPLL_CTL3) & 0x10)
-			err = -EINVAL;
+			err = -EIO;
 	}
 
 	b43_radio_mask(dev, B2062_S_RFPLL_CTL14, ~0x04);
@@ -2068,11 +2124,18 @@ static int b43_lpphy_op_switch_channel(struct b43_wldev *dev,
 
 static int b43_lpphy_op_init(struct b43_wldev *dev)
 {
+	int err;
+	
 	lpphy_read_band_sprom(dev); //FIXME should this be in prepare_structs?
 	lpphy_baseband_init(dev);
 	lpphy_radio_init(dev);
 	lpphy_calibrate_rc(dev);
-	b43_lpphy_op_switch_channel(dev, b43_lpphy_op_get_default_chan(dev));
+	err = b43_lpphy_op_switch_channel(dev,
+				b43_lpphy_op_get_default_chan(dev));
+	if (err) {
+		b43dbg(dev->wl, "Switch to init channel failed, error = %d.\n",
+		       err);
+	}
 	lpphy_tx_pctl_init(dev);
 	lpphy_calibration(dev);
 	//TODO ACI init
-- 
1.6.2.4




^ permalink raw reply related

* Re: [PATCH v2] b43: LP-PHY: Update baseband init for recent spec changes
From: Michael Buesch @ 2009-08-15 23:07 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
	linux-wireless
In-Reply-To: <4A873F20.4020705@gmail.com>

On Sunday 16 August 2009 01:05:04 Gábor Stefanik wrote:
> The spec had some nasty typos, and a large part of the rev0/1 BB
> init procedure was also missing. Fix these.
> 
> Also make the init-time channel switch debuggable.
> 
> (The change from -EINVAL to -EIO is simply to make it possible
> to distinguish the PLL charge pump error from a channel-not-found
> error.)
> 
> Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
> ---
> V2: Coding style fix suggested by Michael on IRC.

> +	if (err)
> +		b43dbg(dev->wl, "Switch to init channel failed, error = %d.\n",
> +		       err);

Here's still one, but otherwise acked.

-- 
Greetings, Michael.

^ permalink raw reply

* [PATCH v2] b43: LP-PHY: Update baseband init for recent spec changes
From: Gábor Stefanik @ 2009-08-15 23:05 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

The spec had some nasty typos, and a large part of the rev0/1 BB
init procedure was also missing. Fix these.

Also make the init-time channel switch debuggable.

(The change from -EINVAL to -EIO is simply to make it possible
to distinguish the PLL charge pump error from a channel-not-found
error.)

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
V2: Coding style fix suggested by Michael on IRC.

 drivers/net/wireless/b43/phy_lp.c |   72 ++++++++++++++++++++++++++++++++++---
 1 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3872a31..c7f6c75 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -204,8 +204,62 @@ static void lpphy_table_init(struct b43_wldev *dev)
 static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 {
 	struct ssb_bus *bus = dev->dev->bus;
+	struct b43_phy_lp *lpphy = dev->phy.lp;
 	u16 tmp, tmp2;
 
+	b43_phy_mask(dev, B43_LPPHY_AFE_DAC_CTL, 0xF7FF);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL, 0);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVR, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_0, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0);
+	b43_phy_set(dev, B43_LPPHY_AFE_DAC_CTL, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_OFDMSYNCTHRESH0, 0xFF00, 0x0078);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x5800);
+	b43_phy_write(dev, B43_LPPHY_ADC_COMPENSATION_CTL, 0x0016);
+	b43_phy_maskset(dev, B43_LPPHY_AFE_ADC_CTL_0, 0xFFF8, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5400);
+	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2400);
+	b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x2100);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0x0006);
+	b43_phy_mask(dev, B43_LPPHY_RX_RADIO_CTL, 0xFFFE);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC10, 0x0180);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x3800);
+	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xFFF0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_GAIN_MISMATCH_LIMIT, 0xFFC0, 0x001A);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0xFF00, 0x00B3);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0x00FF, 0xAD00);
+	b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB,
+			0xFF00, lpphy->rx_pwr_offset);
+	if ((bus->sprom.boardflags_lo & B43_BFL_FEM) &&
+	   ((b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ||
+	   (bus->sprom.boardflags_hi & B43_BFH_PAREF))) {
+		/* TODO:
+		 * Set the LDO voltage to 0x0028 - FIXME: What is this?
+		 * Call sb_pmu_set_ldo_voltage with 4 and the LDO voltage
+		 * 	as arguments
+		 * Call sb_pmu_paref_ldo_enable with argument TRUE
+		 */
+		if (dev->phy.rev == 0) {
+		       	b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+					0xFFCF, 0x0010);
+		}
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 60);
+	} else {
+		//TODO: Call ssb_pmu_paref_ldo_enable with argument FALSE
+		b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+				0xFFCF, 0x0020);
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 100);
+	}
+	tmp = lpphy->rssi_vf | lpphy->rssi_vc << 4 | 0xA000;
+	b43_phy_write(dev, B43_LPPHY_AFE_RSSI_CTL_0, tmp);
+	if (bus->sprom.boardflags_hi & B43_BFH_RSSIINV)
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x0AAA);
+	else
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x02AA);
+	b43_lptab_write(dev, B43_LPTAB16(11, 1), 24);
+	b43_phy_maskset(dev, B43_LPPHY_RX_RADIO_CTL,
+			0xFFF9, (lpphy->bx_arch << 1));
 	if (dev->phy.rev == 1 &&
 	   (bus->sprom.boardflags_hi & B43_BFH_FEM_BT)) {
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x000A);
@@ -255,7 +309,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0006);
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0700);
 	}
-	if (dev->phy.rev == 1) {
+	if (dev->phy.rev == 1 && (bus->sprom.boardflags_hi & B43_BFH_PAREF)) {
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_5, B43_LPPHY_TR_LOOKUP_1);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_6, B43_LPPHY_TR_LOOKUP_2);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_7, B43_LPPHY_TR_LOOKUP_3);
@@ -267,6 +321,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0006);
 		b43_phy_write(dev, B43_LPPHY_GPIO_SELECT, 0x0005);
 		b43_phy_write(dev, B43_LPPHY_GPIO_OUTEN, 0xFFFF);
+		//FIXME the Broadcom driver caches & delays this HF write!
 		b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W);
 	}
 	if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
@@ -384,7 +439,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_PWR_THRESH1, 0xFFF0, 0x9);
 	b43_phy_mask(dev, B43_LPPHY_GAINDIRECTMISMATCH, ~0xF);
 	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5500);
-	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xF81F, 0xA0);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC1F, 0xA0);
 	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xE0FF, 0x300);
 	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2A00);
 	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
@@ -405,7 +460,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x12);
 	b43_phy_maskset(dev, B43_LPPHY_GAINMISMATCH, 0x0FFF, 0x9000);
 
-	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 1)) {
+	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x14), 0);
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40);
 	}
@@ -416,6 +471,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0x9D00);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0xFF00, 0xA1);
+		b43_phy_mask(dev, B43_LPPHY_IDLEAFTERPKTRXTO, 0x00FF);
 	} else /* 5GHz */
 		b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x40);
 
@@ -1883,7 +1939,7 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
 		lpphy_b2062_reset_pll_bias(dev);
 		lpphy_b2062_vco_calib(dev);
 		if (b43_radio_read(dev, B2062_S_RFPLL_CTL3) & 0x10)
-			err = -EINVAL;
+			err = -EIO;
 	}
 
 	b43_radio_mask(dev, B2062_S_RFPLL_CTL14, ~0x04);
@@ -2068,11 +2124,17 @@ static int b43_lpphy_op_switch_channel(struct b43_wldev *dev,
 
 static int b43_lpphy_op_init(struct b43_wldev *dev)
 {
+	int err;
+	
 	lpphy_read_band_sprom(dev); //FIXME should this be in prepare_structs?
 	lpphy_baseband_init(dev);
 	lpphy_radio_init(dev);
 	lpphy_calibrate_rc(dev);
-	b43_lpphy_op_switch_channel(dev, b43_lpphy_op_get_default_chan(dev));
+	err = b43_lpphy_op_switch_channel(dev,
+				b43_lpphy_op_get_default_chan(dev));
+	if (err)
+		b43dbg(dev->wl, "Switch to init channel failed, error = %d.\n",
+		       err);
 	lpphy_tx_pctl_init(dev);
 	lpphy_calibration(dev);
 	//TODO ACI init
-- 
1.6.2.4




^ permalink raw reply related

* [PATCH] b43: LP-PHY: Update baseband init for recent spec changes
From: Gábor Stefanik @ 2009-08-15 22:57 UTC (permalink / raw)
  To: John Linville, Michael Buesch, Larry Finger
  Cc: Mark Huijgen, Broadcom Wireless, linux-wireless

The spec had some nasty typos, and a large part of the rev0/1 BB
init procedure was also missing. Fix these.

Also make the init-time channel switch debuggable.

(The change from -EINVAL to -EIO is simply to make it possible
to distinguish the PLL charge pump error from a channel-not-found
error.)

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

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3872a31..72e1d8c 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -204,8 +204,61 @@ static void lpphy_table_init(struct b43_wldev *dev)
 static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 {
 	struct ssb_bus *bus = dev->dev->bus;
+	struct b43_phy_lp *lpphy = dev->phy.lp;
 	u16 tmp, tmp2;
 
+	b43_phy_mask(dev, B43_LPPHY_AFE_DAC_CTL, 0xF7FF);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL, 0);
+	b43_phy_write(dev, B43_LPPHY_AFE_CTL_OVR, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_0, 0);
+	b43_phy_write(dev, B43_LPPHY_RF_OVERRIDE_2, 0);
+	b43_phy_set(dev, B43_LPPHY_AFE_DAC_CTL, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_OFDMSYNCTHRESH0, 0xFF00, 0x0078);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x5800);
+	b43_phy_write(dev, B43_LPPHY_ADC_COMPENSATION_CTL, 0x0016);
+	b43_phy_maskset(dev, B43_LPPHY_AFE_ADC_CTL_0, 0xFFF8, 0x0004);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5400);
+	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2400);
+	b43_phy_maskset(dev, B43_LPPHY_LOWGAINDB, 0x00FF, 0x2100);
+	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0xFF00, 0x0006);
+	b43_phy_mask(dev, B43_LPPHY_RX_RADIO_CTL, 0xFFFE);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC10, 0x0180);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0x83FF, 0x3800);
+	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xFFF0, 0x0005);
+	b43_phy_maskset(dev, B43_LPPHY_GAIN_MISMATCH_LIMIT, 0xFFC0, 0x001A);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0xFF00, 0x00B3);
+	b43_phy_maskset(dev, B43_LPPHY_CRS_ED_THRESH, 0x00FF, 0xAD00);
+	b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB,
+			0xFF00, lpphy->rx_pwr_offset);
+	if ((bus->sprom.boardflags_lo & B43_BFL_FEM) &&
+	   ((b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ||
+	   (bus->sprom.boardflags_hi & B43_BFH_PAREF))) {
+		/* TODO:
+		 * Set the LDO voltage to 0x0028 - FIXME: What is this?
+		 * Call sb_pmu_set_ldo_voltage with 4 and the LDO voltage
+		 * 	as arguments
+		 * Call sb_pmu_paref_ldo_enable with argument TRUE
+		 */
+		if (dev->phy.rev == 0)
+		       	b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+					0xFFCF, 0x0010);
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 60);
+	} else {
+		//TODO: Call ssb_pmu_paref_ldo_enable with argument FALSE
+		b43_phy_maskset(dev, B43_LPPHY_LP_RF_SIGNAL_LUT,
+				0xFFCF, 0x0020);
+		b43_lptab_write(dev, B43_LPTAB16(11, 7), 100);
+	}
+	tmp = lpphy->rssi_vf | lpphy->rssi_vc << 4 | 0xA000;
+	b43_phy_write(dev, B43_LPPHY_AFE_RSSI_CTL_0, tmp);
+	if (bus->sprom.boardflags_hi & B43_BFH_RSSIINV)
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x0AAA);
+	else
+		b43_phy_maskset(dev, B43_LPPHY_AFE_RSSI_CTL_1, 0xF000, 0x02AA);
+	b43_lptab_write(dev, B43_LPTAB16(11, 1), 24);
+	b43_phy_maskset(dev, B43_LPPHY_RX_RADIO_CTL,
+			0xFFF9, (lpphy->bx_arch << 1));
 	if (dev->phy.rev == 1 &&
 	   (bus->sprom.boardflags_hi & B43_BFH_FEM_BT)) {
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x000A);
@@ -255,7 +308,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xFFC0, 0x0006);
 		b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_4, 0xC0FF, 0x0700);
 	}
-	if (dev->phy.rev == 1) {
+	if (dev->phy.rev == 1 && (bus->sprom.boardflags_hi & B43_BFH_PAREF)) {
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_5, B43_LPPHY_TR_LOOKUP_1);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_6, B43_LPPHY_TR_LOOKUP_2);
 		b43_phy_copy(dev, B43_LPPHY_TR_LOOKUP_7, B43_LPPHY_TR_LOOKUP_3);
@@ -267,6 +320,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev)
 		b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0006);
 		b43_phy_write(dev, B43_LPPHY_GPIO_SELECT, 0x0005);
 		b43_phy_write(dev, B43_LPPHY_GPIO_OUTEN, 0xFFFF);
+		//FIXME the Broadcom driver caches & delays this HF write!
 		b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W);
 	}
 	if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
@@ -384,7 +438,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_PWR_THRESH1, 0xFFF0, 0x9);
 	b43_phy_mask(dev, B43_LPPHY_GAINDIRECTMISMATCH, ~0xF);
 	b43_phy_maskset(dev, B43_LPPHY_VERYLOWGAINDB, 0x00FF, 0x5500);
-	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xF81F, 0xA0);
+	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFC1F, 0xA0);
 	b43_phy_maskset(dev, B43_LPPHY_GAINDIRECTMISMATCH, 0xE0FF, 0x300);
 	b43_phy_maskset(dev, B43_LPPHY_HIGAINDB, 0x00FF, 0x2A00);
 	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
@@ -405,7 +459,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 	b43_phy_maskset(dev, B43_LPPHY_CLIPCTRTHRESH, 0xFFE0, 0x12);
 	b43_phy_maskset(dev, B43_LPPHY_GAINMISMATCH, 0x0FFF, 0x9000);
 
-	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 1)) {
+	if ((bus->chip_id == 0x4325) && (bus->chip_rev == 0)) {
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x14), 0);
 		b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40);
 	}
@@ -416,6 +470,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 		b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0x9D00);
 		b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0xFF00, 0xA1);
+		b43_phy_mask(dev, B43_LPPHY_IDLEAFTERPKTRXTO, 0x00FF);
 	} else /* 5GHz */
 		b43_phy_mask(dev, B43_LPPHY_CRSGAIN_CTL, ~0x40);
 
@@ -1883,7 +1938,7 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
 		lpphy_b2062_reset_pll_bias(dev);
 		lpphy_b2062_vco_calib(dev);
 		if (b43_radio_read(dev, B2062_S_RFPLL_CTL3) & 0x10)
-			err = -EINVAL;
+			err = -EIO;
 	}
 
 	b43_radio_mask(dev, B2062_S_RFPLL_CTL14, ~0x04);
@@ -2068,11 +2123,17 @@ static int b43_lpphy_op_switch_channel(struct b43_wldev *dev,
 
 static int b43_lpphy_op_init(struct b43_wldev *dev)
 {
+	int err;
+	
 	lpphy_read_band_sprom(dev); //FIXME should this be in prepare_structs?
 	lpphy_baseband_init(dev);
 	lpphy_radio_init(dev);
 	lpphy_calibrate_rc(dev);
-	b43_lpphy_op_switch_channel(dev, b43_lpphy_op_get_default_chan(dev));
+	err = b43_lpphy_op_switch_channel(dev,
+				b43_lpphy_op_get_default_chan(dev));
+	if (err)
+		b43dbg(dev->wl, "Switch to init channel failed, error = %d.\n",
+		       err);
 	lpphy_tx_pctl_init(dev);
 	lpphy_calibration(dev);
 	//TODO ACI init
-- 
1.6.2.4




^ permalink raw reply related

* Re: [PATCH v4 23/34] wireless: downgrade TI driver from menuconfig to config
From: Luis R. Rodriguez @ 2009-08-15 22:07 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: linville, linux-wireless, Larry.Finger, Kalle Valo
In-Reply-To: <69e28c910908150513v10a4ad8dh8f40fe8fbff2a533@mail.gmail.com>

2009/8/15 Gábor Stefanik <netrolller.3d@gmail.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.

True!

  Luis

^ permalink raw reply

* Re: [PATCH v4 10/34] wireless: group Broadcom drivers on kconfig
From: Luis R. Rodriguez @ 2009-08-15 22:05 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: linville, linux-wireless, Larry.Finger, Michael Buesch,
	Johannes Berg
In-Reply-To: <69e28c910908150509i158bf2a6r33de5899cdc8bd13@mail.gmail.com>

2009/8/15 Gábor Stefanik <netrolller.3d@gmail.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.

Yes, the patch does not group rndis with broadcom, please re-read the patch.

  Luis

^ permalink raw reply

* Re: [PATCH] p54: disable PS by default
From: Larry Finger @ 2009-08-15 19:59 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: wireless, John W. Linville, Johannes Berg
In-Reply-To: <200908141323.05936.chunkeey@web.de>

Christian Lamparter wrote:
> Johannes kindly pointed out that I completely missed a hunk in
> his patch: "[PATCH] cfg80211: allow driver to override PS default".
> 
> The driver must explicitly set ps_default to false,
> as the setting is pre-filled with the kconfig default.
> 
> Signed-off-by: Christian Lamparter <chunkeey@web.de>
> ---

With this patch, I no longer see the disconnects. ACK.

Larry


^ permalink raw reply

* 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


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