linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
@ 2010-01-06 15:40 Rafał Miłecki
  2010-01-06 15:46 ` Rafał Miłecki
  2010-01-06 15:50 ` Michael Buesch
  0 siblings, 2 replies; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 15:40 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org, John W. Linville
  Cc: bcm43xx-dev@lists.berlios.de

b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls


 From ec599007464bb8220c605af500b724797d54aba8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Date: Wed, 6 Jan 2010 15:20:20 +0100
Subject: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
  drivers/net/wireless/b43/phy_n.c |   57 ++++++++++++++++++++++++++++++++++++++
  drivers/net/wireless/b43/phy_n.h |    3 ++
  2 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index ceb429a..40d7b73 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -348,6 +348,63 @@ static void b43_nphy_reset_cca(struct b43_wldev *dev)
  	b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg & ~B43_NPHY_BBCFG_RSTCCA);
  }

+static void b43_nphy_write_clip_detection(struct b43_wldev *dev, u16 *vals)
+{
+	b43_phy_write(dev, B43_NPHY_C1_CLIP1THRES, vals[0]);
+	b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, vals[1]);
+}
+
+static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *vals)
+{
+	vals[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES);
+	vals[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
+}
+
+static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
+{
+	u16 tmp;
+	bool suspended = false;
+
+	if (dev->dev->id.revision == 16 && dev->mac_suspended == 0) {
+		b43_mac_suspend(dev);
+		suspended = true;
+	}
+
+	tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL);
+	tmp &= (B43_NPHY_CLASSCTL_CCKEN | B43_NPHY_CLASSCTL_OFDMEN |
+		B43_NPHY_CLASSCTL_WAITEDEN);
+	tmp &= ~mask;
+	tmp |= (val & mask);
+	b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp);
+
+	if (suspended)
+		b43_mac_enable(dev);
+
+	return tmp;
+}
+
+static void b43_nphy_stay_carrier_search(struct b43_wldev *dev, bool enable)
+{
+	struct b43_phy *phy = &dev->phy;
+	struct b43_phy_n *nphy = phy->n;
+
+	if (enable) {
+		u16 clip[] = { 0xFFFF, 0xFFFF };
+		if (nphy->deaf_count++ == 0) {
+			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
+			b43_nphy_classifier(dev, 0x7, 0);
+			b43_nphy_read_clip_detection(dev, nphy->clip_state);
+			b43_nphy_write_clip_detection(dev, clip);
+		}
+		b43_nphy_reset_cca(dev);
+	} else {
+		if (--nphy->deaf_count != 0) {
+			b43_nphy_classifier(dev, 0x7, nphy->classifier_state);
+			b43_nphy_write_clip_detection(dev, nphy->clip_state);
+		}
+	}
+}
+
  enum b43_nphy_rf_sequence {
  	B43_RFSEQ_RX2TX,
  	B43_RFSEQ_TX2RX,
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index e5e402a..6ab07fc 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -932,6 +932,9 @@ struct b43_phy_n {
  	u32 deaf_count;
  	bool mute;

+	u16 classifier_state;
+	u16 clip_state[2];
+
  	u8 iqcal_chanspec_2G;
  	u8 rssical_chanspec_2G;

-- 
1.6.4.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
  2010-01-06 15:40 [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls Rafał Miłecki
@ 2010-01-06 15:46 ` Rafał Miłecki
  2010-01-06 15:50 ` Michael Buesch
  1 sibling, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 15:46 UTC (permalink / raw)
  To: Rafał Miłecki, linux-wireless@vger.kernel.org,
	John W. Linville
  Cc: bcm43xx-dev@lists.berlios.de

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

Dnia 06-01-2010 o 16:40:32 Rafał Miłecki <zajec5@gmail.com> napisał(a):

> b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls

Attaching patch (only inline-posted before).

-- 
Rafał

[-- Attachment #2: 0001-b43-N-PHY-implement-b43_nphy_stay_carrier_search-and.patch --]
[-- Type: application/octet-stream, Size: 2929 bytes --]

From ec599007464bb8220c605af500b724797d54aba8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Date: Wed, 6 Jan 2010 15:20:20 +0100
Subject: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |   57 ++++++++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/phy_n.h |    3 ++
 2 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index ceb429a..40d7b73 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -348,6 +348,63 @@ static void b43_nphy_reset_cca(struct b43_wldev *dev)
 	b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg & ~B43_NPHY_BBCFG_RSTCCA);
 }
 
+static void b43_nphy_write_clip_detection(struct b43_wldev *dev, u16 *vals)
+{
+	b43_phy_write(dev, B43_NPHY_C1_CLIP1THRES, vals[0]);
+	b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, vals[1]);
+}
+
+static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *vals)
+{
+	vals[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES);
+	vals[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
+}
+
+static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
+{
+	u16 tmp;
+	bool suspended = false;
+
+	if (dev->dev->id.revision == 16 && dev->mac_suspended == 0) {
+		b43_mac_suspend(dev);
+		suspended = true;
+	}
+
+	tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL);
+	tmp &= (B43_NPHY_CLASSCTL_CCKEN | B43_NPHY_CLASSCTL_OFDMEN |
+		B43_NPHY_CLASSCTL_WAITEDEN);
+	tmp &= ~mask;
+	tmp |= (val & mask);
+	b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp);
+
+	if (suspended)
+		b43_mac_enable(dev);
+
+	return tmp;
+}
+
+static void b43_nphy_stay_carrier_search(struct b43_wldev *dev, bool enable)
+{
+	struct b43_phy *phy = &dev->phy;
+	struct b43_phy_n *nphy = phy->n;
+
+	if (enable) {
+		u16 clip[] = { 0xFFFF, 0xFFFF };
+		if (nphy->deaf_count++ == 0) {
+			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
+			b43_nphy_classifier(dev, 0x7, 0);
+			b43_nphy_read_clip_detection(dev, nphy->clip_state);
+			b43_nphy_write_clip_detection(dev, clip);
+		}
+		b43_nphy_reset_cca(dev);
+	} else {
+		if (--nphy->deaf_count != 0) {
+			b43_nphy_classifier(dev, 0x7, nphy->classifier_state);
+			b43_nphy_write_clip_detection(dev, nphy->clip_state);
+		}
+	}
+}
+
 enum b43_nphy_rf_sequence {
 	B43_RFSEQ_RX2TX,
 	B43_RFSEQ_TX2RX,
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index e5e402a..6ab07fc 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -932,6 +932,9 @@ struct b43_phy_n {
 	u32 deaf_count;
 	bool mute;
 
+	u16 classifier_state;
+	u16 clip_state[2];
+
 	u8 iqcal_chanspec_2G;
 	u8 rssical_chanspec_2G;
 
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
  2010-01-06 15:40 [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls Rafał Miłecki
  2010-01-06 15:46 ` Rafał Miłecki
@ 2010-01-06 15:50 ` Michael Buesch
  2010-01-06 16:36   ` Larry Finger
  2010-01-06 20:11   ` Rafał Miłecki
  1 sibling, 2 replies; 13+ messages in thread
From: Michael Buesch @ 2010-01-06 15:50 UTC (permalink / raw)
  To: bcm43xx-dev
  Cc: Rafał Miłecki, linux-wireless@vger.kernel.org,
	John W. Linville

On Wednesday 06 January 2010 16:40:32 Rafał Miłecki wrote:
> b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls

Hm, The phrase "stay carrier earch" doesn't make a lot of sense to me.
Is "stray carrier search" or something like that meant?
Not that I care much, but I'm just wondering if this is just a typo.

> +static void b43_nphy_write_clip_detection(struct b43_wldev *dev, u16 *vals)

We know that these values are the clip thresholds, so use a better variable name, please.

> +{
> +	b43_phy_write(dev, B43_NPHY_C1_CLIP1THRES, vals[0]);
> +	b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, vals[1]);
> +}
> +
> +static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *vals)
> +{
> +	vals[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES);
> +	vals[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
> +}
> +
> +static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
> +{
> +	u16 tmp;
> +	bool suspended = false;
> +
> +	if (dev->dev->id.revision == 16 && dev->mac_suspended == 0) {

Do not check for mac_suspended==0 here. b43_mac_suspended does this internally.

> +		b43_mac_suspend(dev);
> +		suspended = true;
> +	}
> +
> +	tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL);
> +	tmp &= (B43_NPHY_CLASSCTL_CCKEN | B43_NPHY_CLASSCTL_OFDMEN |
> +		B43_NPHY_CLASSCTL_WAITEDEN);
> +	tmp &= ~mask;
> +	tmp |= (val & mask);
> +	b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp);
> +
> +	if (suspended)
> +		b43_mac_enable(dev);
> +
> +	return tmp;
> +}
> +
> +static void b43_nphy_stay_carrier_search(struct b43_wldev *dev, bool enable)
> +{
> +	struct b43_phy *phy = &dev->phy;
> +	struct b43_phy_n *nphy = phy->n;
> +
> +	if (enable) {
> +		u16 clip[] = { 0xFFFF, 0xFFFF };
> +		if (nphy->deaf_count++ == 0) {
> +			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
> +			b43_nphy_classifier(dev, 0x7, 0);
> +			b43_nphy_read_clip_detection(dev, nphy->clip_state);
> +			b43_nphy_write_clip_detection(dev, clip);
> +		}
> +		b43_nphy_reset_cca(dev);
> +	} else {
> +		if (--nphy->deaf_count != 0) {

If this test logic correct? The following would make more sense to me:

		if (--nphy->deaf_count == 0) {

> +			b43_nphy_classifier(dev, 0x7, nphy->classifier_state);
> +			b43_nphy_write_clip_detection(dev, nphy->clip_state);
> +		}
> +	}
> +}
> +
>   enum b43_nphy_rf_sequence {
>   	B43_RFSEQ_RX2TX,
>   	B43_RFSEQ_TX2RX,
> diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
> index e5e402a..6ab07fc 100644
> --- a/drivers/net/wireless/b43/phy_n.h
> +++ b/drivers/net/wireless/b43/phy_n.h
> @@ -932,6 +932,9 @@ struct b43_phy_n {
>   	u32 deaf_count;
>   	bool mute;
> 
> +	u16 classifier_state;
> +	u16 clip_state[2];
> +
>   	u8 iqcal_chanspec_2G;
>   	u8 rssical_chanspec_2G;
> 



-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
  2010-01-06 15:50 ` Michael Buesch
@ 2010-01-06 16:36   ` Larry Finger
  2010-01-06 20:11   ` Rafał Miłecki
  1 sibling, 0 replies; 13+ messages in thread
From: Larry Finger @ 2010-01-06 16:36 UTC (permalink / raw)
  To: Michael Buesch; +Cc: bcm43xx-dev, linux-wireless@vger.kernel.org

On 01/06/2010 09:50 AM, Michael Buesch wrote:
> On Wednesday 06 January 2010 16:40:32 Rafał Miłecki wrote:
>> b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
> 
> Hm, The phrase "stay carrier earch" doesn't make a lot of sense to me.
> Is "stray carrier search" or something like that meant?
> Not that I care much, but I'm just wondering if this is just a typo.

"stay in carrier search"

> 
>> +static void b43_nphy_write_clip_detection(struct b43_wldev *dev, u16 *vals)
> 
> We know that these values are the clip thresholds, so use a better variable name, please.
> 
>> +{
>> +	b43_phy_write(dev, B43_NPHY_C1_CLIP1THRES, vals[0]);
>> +	b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, vals[1]);
>> +}
>> +
>> +static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *vals)
>> +{
>> +	vals[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES);
>> +	vals[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
>> +}
>> +
>> +static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
>> +{
>> +	u16 tmp;
>> +	bool suspended = false;
>> +
>> +	if (dev->dev->id.revision == 16 && dev->mac_suspended == 0) {
> 
> Do not check for mac_suspended==0 here. b43_mac_suspended does this internally.
> 
>> +		b43_mac_suspend(dev);
>> +		suspended = true;
>> +	}
>> +
>> +	tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL);
>> +	tmp &= (B43_NPHY_CLASSCTL_CCKEN | B43_NPHY_CLASSCTL_OFDMEN |
>> +		B43_NPHY_CLASSCTL_WAITEDEN);
>> +	tmp &= ~mask;
>> +	tmp |= (val & mask);
>> +	b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp);
>> +
>> +	if (suspended)
>> +		b43_mac_enable(dev);
>> +
>> +	return tmp;
>> +}
>> +
>> +static void b43_nphy_stay_carrier_search(struct b43_wldev *dev, bool enable)
>> +{
>> +	struct b43_phy *phy = &dev->phy;
>> +	struct b43_phy_n *nphy = phy->n;
>> +
>> +	if (enable) {
>> +		u16 clip[] = { 0xFFFF, 0xFFFF };
>> +		if (nphy->deaf_count++ == 0) {
>> +			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
>> +			b43_nphy_classifier(dev, 0x7, 0);
>> +			b43_nphy_read_clip_detection(dev, nphy->clip_state);
>> +			b43_nphy_write_clip_detection(dev, clip);
>> +		}
>> +		b43_nphy_reset_cca(dev);
>> +	} else {
>> +		if (--nphy->deaf_count != 0) {
> 
> If this test logic correct? The following would make more sense to me:
> 
> 		if (--nphy->deaf_count == 0) {

It should be == 0. Specs match Broadcom code.


Larry


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls
  2010-01-06 15:50 ` Michael Buesch
  2010-01-06 16:36   ` Larry Finger
@ 2010-01-06 20:11   ` Rafał Miłecki
  2010-01-06 20:54     ` [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2) Rafał Miłecki
  1 sibling, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 20:11 UTC (permalink / raw)
  To: Michael Buesch
  Cc: bcm43xx-dev, linux-wireless@vger.kernel.org, John W. Linville

2010/1/6 Michael Buesch <mb@bu3sch.de>:
> On Wednesday 06 January 2010 16:40:32 Rafał Miłecki wrote:
>> +static void b43_nphy_stay_carrier_search(struct b43_wldev *dev, bool enable)
>> +{
>> +     struct b43_phy *phy = &dev->phy;
>> +     struct b43_phy_n *nphy = phy->n;
>> +
>> +     if (enable) {
>> +             u16 clip[] = { 0xFFFF, 0xFFFF };
>> +             if (nphy->deaf_count++ == 0) {
>> +                     nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
>> +                     b43_nphy_classifier(dev, 0x7, 0);
>> +                     b43_nphy_read_clip_detection(dev, nphy->clip_state);
>> +                     b43_nphy_write_clip_detection(dev, clip);
>> +             }
>> +             b43_nphy_reset_cca(dev);
>> +     } else {
>> +             if (--nphy->deaf_count != 0) {
>
> If this test logic correct? The following would make more sense to me:

Huuh, thanks for catching that! I believe you saved me from long
debugging in future.

-- 
Rafał

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 20:11   ` Rafał Miłecki
@ 2010-01-06 20:54     ` Rafał Miłecki
  2010-01-06 22:35       ` Gábor Stefanik
  0 siblings, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 20:54 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org, John W. Linville, Michael Buesch
  Cc: bcm43xx-dev

V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
     rename function. Thanks Michael!

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
  drivers/net/wireless/b43/phy_n.c |   58 ++++++++++++++++++++++++++++++++++++++
  drivers/net/wireless/b43/phy_n.h |    3 ++
  2 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index ceb429a..5252c0f 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -348,6 +348,64 @@ static void b43_nphy_reset_cca(struct b43_wldev *dev)
  	b43_phy_write(dev, B43_NPHY_BBCFG, bbcfg & ~B43_NPHY_BBCFG_RSTCCA);
  }

+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */
+static void b43_nphy_write_clip_detection(struct b43_wldev *dev, u16 *clip_st)
+{
+	b43_phy_write(dev, B43_NPHY_C1_CLIP1THRES, clip_st[0]);
+	b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, clip_st[1]);
+}
+
+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */
+static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *clip_st)
+{
+	clip_st[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES);
+	clip_st[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES);
+}
+
+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/classifier */
+static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val)
+{
+	u16 tmp;
+
+	if (dev->dev->id.revision == 16)
+		b43_mac_suspend(dev);
+
+	tmp = b43_phy_read(dev, B43_NPHY_CLASSCTL);
+	tmp &= (B43_NPHY_CLASSCTL_CCKEN | B43_NPHY_CLASSCTL_OFDMEN |
+		B43_NPHY_CLASSCTL_WAITEDEN);
+	tmp &= ~mask;
+	tmp |= (val & mask);
+	b43_phy_maskset(dev, B43_NPHY_CLASSCTL, 0xFFF8, tmp);
+
+	if (dev->dev->id.revision == 16)
+		b43_mac_enable(dev);
+
+	return tmp;
+}
+
+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/carriersearch */
+static void b43_nphy_stay_in_carrier_search(struct b43_wldev *dev, bool enable)
+{
+	struct b43_phy *phy = &dev->phy;
+	struct b43_phy_n *nphy = phy->n;
+
+	if (enable) {
+		u16 clip[] = { 0xFFFF, 0xFFFF };
+		if (nphy->deaf_count++ == 0) {
+			nphy->classifier_state = b43_nphy_classifier(dev, 0, 0);
+			b43_nphy_classifier(dev, 0x7, 0);
+			b43_nphy_read_clip_detection(dev, nphy->clip_state);
+			b43_nphy_write_clip_detection(dev, clip);
+		}
+		b43_nphy_reset_cca(dev);
+	} else {
+		if (--nphy->deaf_count == 0) {
+			b43_nphy_classifier(dev, 0x7, nphy->classifier_state);
+			b43_nphy_write_clip_detection(dev, nphy->clip_state);
+		}
+	}
+}
+
  enum b43_nphy_rf_sequence {
  	B43_RFSEQ_RX2TX,
  	B43_RFSEQ_TX2RX,
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index e5e402a..6ab07fc 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -932,6 +932,9 @@ struct b43_phy_n {
  	u32 deaf_count;
  	bool mute;

+	u16 classifier_state;
+	u16 clip_state[2];
+
  	u8 iqcal_chanspec_2G;
  	u8 rssical_chanspec_2G;

-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 20:54     ` [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2) Rafał Miłecki
@ 2010-01-06 22:35       ` Gábor Stefanik
  2010-01-06 22:36         ` Gábor Stefanik
  2010-01-06 22:45         ` Rafał Miłecki
  0 siblings, 2 replies; 13+ messages in thread
From: Gábor Stefanik @ 2010-01-06 22:35 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless@vger.kernel.org, John W. Linville, Michael Buesch,
	bcm43xx-dev

2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>    rename function. Thanks Michael!
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  drivers/net/wireless/b43/phy_n.c |   58
> ++++++++++++++++++++++++++++++++++++++
>  drivers/net/wireless/b43/phy_n.h |    3 ++
>  2 files changed, 61 insertions(+), 0 deletions(-)
>
> <snip>

Typo in title (it's vs. its)

>
> --
> 1.6.4.2
>
> --
> 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	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 22:35       ` Gábor Stefanik
@ 2010-01-06 22:36         ` Gábor Stefanik
  2010-01-06 22:45         ` Rafał Miłecki
  1 sibling, 0 replies; 13+ messages in thread
From: Gábor Stefanik @ 2010-01-06 22:36 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless@vger.kernel.org, John W. Linville, Michael Buesch,
	bcm43xx-dev

2010/1/6 Gábor Stefanik <netrolller.3d@gmail.com>:
> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>    rename function. Thanks Michael!
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>>  drivers/net/wireless/b43/phy_n.c |   58
>> ++++++++++++++++++++++++++++++++++++++
>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>
>> <snip>
>
> Typo in title (it's vs. its)

Note that you don't need to resubmit for this, I posted this so the
committer (John AFAIK) will notice and fix it before committing.

--Gábor

>
>>
>> --
>> 1.6.4.2
>>
>> --
>> 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. :-)
>



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 22:35       ` Gábor Stefanik
  2010-01-06 22:36         ` Gábor Stefanik
@ 2010-01-06 22:45         ` Rafał Miłecki
  2010-01-06 22:49           ` Gábor Stefanik
  1 sibling, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 22:45 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: linux-wireless@vger.kernel.org, John W. Linville, Michael Buesch,
	bcm43xx-dev

W dniu 6 stycznia 2010 23:35 użytkownik Gábor Stefanik
<netrolller.3d@gmail.com> napisał:
> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>    rename function. Thanks Michael!
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>>  drivers/net/wireless/b43/phy_n.c |   58
>> ++++++++++++++++++++++++++++++++++++++
>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>
>> <snip>
>
> Typo in title (it's vs. its)

My gramma is far from perfect, thanks.

-- 
Rafał

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 22:45         ` Rafał Miłecki
@ 2010-01-06 22:49           ` Gábor Stefanik
  2010-01-06 22:59             ` Larry Finger
  0 siblings, 1 reply; 13+ messages in thread
From: Gábor Stefanik @ 2010-01-06 22:49 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless@vger.kernel.org, John W. Linville, Michael Buesch,
	bcm43xx-dev

2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
> W dniu 6 stycznia 2010 23:35 użytkownik Gábor Stefanik
> <netrolller.3d@gmail.com> napisał:
>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>>    rename function. Thanks Michael!
>>>
>>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>> ---
>>>  drivers/net/wireless/b43/phy_n.c |   58
>>> ++++++++++++++++++++++++++++++++++++++
>>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>>
>>> <snip>
>>
>> Typo in title (it's vs. its)
>
> My gramma is far from perfect, thanks.

I've yet to see a perfect grandmother... :-)

>
> --
> Rafał
>



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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 22:49           ` Gábor Stefanik
@ 2010-01-06 22:59             ` Larry Finger
  2010-01-06 23:12               ` Rafał Miłecki
  0 siblings, 1 reply; 13+ messages in thread
From: Larry Finger @ 2010-01-06 22:59 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Rafał Miłecki, linux-wireless@vger.kernel.org,
	John W. Linville, Michael Buesch, bcm43xx-dev

On 01/06/2010 04:49 PM, Gábor Stefanik wrote:
> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>> W dniu 6 stycznia 2010 23:35 użytkownik Gábor Stefanik
>> <netrolller.3d@gmail.com> napisał:
>>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>>>    rename function. Thanks Michael!
>>>>
>>>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>>> ---
>>>>  drivers/net/wireless/b43/phy_n.c |   58
>>>> ++++++++++++++++++++++++++++++++++++++
>>>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>>>
>>>> <snip>
>>>
>>> Typo in title (it's vs. its)
>>
>> My gramma is far from perfect, thanks.
> 
> I've yet to see a perfect grandmother... :-)

My wife thinks she is perfect!

Larry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 22:59             ` Larry Finger
@ 2010-01-06 23:12               ` Rafał Miłecki
  2010-01-06 23:32                 ` Gábor Stefanik
  0 siblings, 1 reply; 13+ messages in thread
From: Rafał Miłecki @ 2010-01-06 23:12 UTC (permalink / raw)
  To: Larry Finger
  Cc: Gábor Stefanik, linux-wireless@vger.kernel.org,
	John W. Linville, Michael Buesch, bcm43xx-dev

W dniu 6 stycznia 2010 23:59 użytkownik Larry Finger
<Larry.Finger@lwfinger.net> napisał:
> On 01/06/2010 04:49 PM, Gábor Stefanik wrote:
>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>> W dniu 6 stycznia 2010 23:35 użytkownik Gábor Stefanik
>>> <netrolller.3d@gmail.com> napisał:
>>>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>>>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>>>>    rename function. Thanks Michael!
>>>>>
>>>>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>>>> ---
>>>>>  drivers/net/wireless/b43/phy_n.c |   58
>>>>> ++++++++++++++++++++++++++++++++++++++
>>>>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>>>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>>>>
>>>>> <snip>
>>>>
>>>> Typo in title (it's vs. its)
>>>
>>> My gramma is far from perfect, thanks.
>>
>> I've yet to see a perfect grandmother... :-)
>
> My wife thinks she is perfect!

What a one latter can change ;)

-- 
Rafał

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2)
  2010-01-06 23:12               ` Rafał Miłecki
@ 2010-01-06 23:32                 ` Gábor Stefanik
  0 siblings, 0 replies; 13+ messages in thread
From: Gábor Stefanik @ 2010-01-06 23:32 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Larry Finger, linux-wireless@vger.kernel.org, John W. Linville,
	Michael Buesch, bcm43xx-dev

On Thu, Jan 7, 2010 at 12:12 AM, Rafał Miłecki <zajec5@gmail.com> wrote:
> W dniu 6 stycznia 2010 23:59 użytkownik Larry Finger
> <Larry.Finger@lwfinger.net> napisał:
>> On 01/06/2010 04:49 PM, Gábor Stefanik wrote:
>>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>>> W dniu 6 stycznia 2010 23:35 użytkownik Gábor Stefanik
>>>> <netrolller.3d@gmail.com> napisał:
>>>>> 2010/1/6 Rafał Miłecki <zajec5@gmail.com>:
>>>>>> V2: fix typo in deaf_count counting, improve b43_mac_[sr] calls,
>>>>>>    rename function. Thanks Michael!
>>>>>>
>>>>>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>>>>> ---
>>>>>>  drivers/net/wireless/b43/phy_n.c |   58
>>>>>> ++++++++++++++++++++++++++++++++++++++
>>>>>>  drivers/net/wireless/b43/phy_n.h |    3 ++
>>>>>>  2 files changed, 61 insertions(+), 0 deletions(-)
>>>>>>
>>>>>> <snip>
>>>>>
>>>>> Typo in title (it's vs. its)
>>>>
>>>> My gramma is far from perfect, thanks.
>>>
>>> I've yet to see a perfect grandmother... :-)
>>
>> My wife thinks she is perfect!
>
> What a one latter can change ;)
>
> --
> Rafał
>

The the impotence of proofreading

Has this ever happened to you?

You work very very horde on a paper for English clash
And you still get a very glow raid on it (like a D or even a D=)
and all because you are the liverwurst spoiler in the whale wide word.
Yes, proofreading your peppers is a matter of the the utmost impotence.

Now, this is a problem that affects manly, manly students, all over the world.
I myself was such a bed spiller once upon a term
that my English torturer in my sophomoric year,
Mrs. Myth, she said that I would never get into a good colleague.
And that's all I wanted, that's all any kid wants at that age,
just to get into a good colleague!
And not just anal community colleague either,
because I am not the kind of guy who would be happy at just anal
community colleague.
I need to be challenged. Challenged, menstrually.
I needed a place that can offer me intellectual simulation.
So I know this probably makes me sound like a stereo,
but I really felt that I could get into an ivory legal colleague.
So if I did not improvement
then gone would be my dream of going to Harvard, Jail, or Prison
(you know, in Prison, New Jersey).

So I got myself a spell checker
and figured I was on Sleazy Street.

But there are several missed aches
that a spell chukker can't can't catch catch.
For instant, if you accidentally leave out word,
your spell checker won't put it in you.
And God for billing purposes only
you should have serial problems with Tori Spelling
your spell Chekhov might replace a word
with one you had absolutely no detention of using.
Because, I mean, what do you want it to douche? You know...
No, it only does what you tell it to douche.
You're the one who's sitting in front of the computer scream,
with your hand on the mouth going clit, clit, clit.
It just goes to show you how embargo
one careless little clit of the mouth can be.

Which reminds me of this one time during my Junior Mint.
The teacher took the paper that I have written on A Sale of Two Titties.
No, I'm cereal, I'm cereal.
She read it out loud in front of all of my assmates.
It was quite possibly one of the most humidifying experiences I've ever had,
being laughed at, like that, pubicly.

So do yourself a flavor and follow these two Pisces of advice:
One: There is no prostitute for careful editing of your own work. No
prostitute, whatsoever.
And three: When it comes to proofreading,
the red penis your friend.

Spank you!

(Credits go to Taylor Mali for this one.)

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-01-06 23:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 15:40 [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_carrier_search and it's calls Rafał Miłecki
2010-01-06 15:46 ` Rafał Miłecki
2010-01-06 15:50 ` Michael Buesch
2010-01-06 16:36   ` Larry Finger
2010-01-06 20:11   ` Rafał Miłecki
2010-01-06 20:54     ` [PATCH 1/5] b43: N-PHY: implement b43_nphy_stay_in_carrier_search and it's calls (V2) Rafał Miłecki
2010-01-06 22:35       ` Gábor Stefanik
2010-01-06 22:36         ` Gábor Stefanik
2010-01-06 22:45         ` Rafał Miłecki
2010-01-06 22:49           ` Gábor Stefanik
2010-01-06 22:59             ` Larry Finger
2010-01-06 23:12               ` Rafał Miłecki
2010-01-06 23:32                 ` Gábor Stefanik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).