* [PATCH] b43: xmit: set 5 GHz bit depending on current band
@ 2014-05-20 6:46 Rafał Miłecki
2014-05-20 6:48 ` Antonio Quartulli
2014-05-20 7:27 ` [PATCH V2] " Rafał Miłecki
0 siblings, 2 replies; 8+ messages in thread
From: Rafał Miłecki @ 2014-05-20 6:46 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
PHYs other than A may also work in 5 GHz mode.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/xmit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 31adb8c..4f38f19 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -408,7 +408,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
mac_ctl |= B43_TXH_MAC_HWSEQ;
if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
mac_ctl |= B43_TXH_MAC_STMSDU;
- if (phy->type == B43_PHYTYPE_A)
+ if (!phy->gmode)
mac_ctl |= B43_TXH_MAC_5GHZ;
/* Overwrite rates[0].count to make the retry calculation
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 6:46 [PATCH] b43: xmit: set 5 GHz bit depending on current band Rafał Miłecki
@ 2014-05-20 6:48 ` Antonio Quartulli
2014-05-20 7:09 ` Rafał Miłecki
2014-05-20 7:27 ` [PATCH V2] " Rafał Miłecki
1 sibling, 1 reply; 8+ messages in thread
From: Antonio Quartulli @ 2014-05-20 6:48 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Hi,
On 20/05/14 08:46, Rafał Miłecki wrote:
> --- a/drivers/net/wireless/b43/xmit.c
> +++ b/drivers/net/wireless/b43/xmit.c
> - if (phy->type == B43_PHYTYPE_A)
> + if (!phy->gmode)
> mac_ctl |= B43_TXH_MAC_5GHZ;
I am not familiar with this driver, but wouldn't 11b mode fall in this
case as well ?
Cheers,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 6:48 ` Antonio Quartulli
@ 2014-05-20 7:09 ` Rafał Miłecki
2014-05-20 7:10 ` Antonio Quartulli
0 siblings, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2014-05-20 7:09 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: linux-wireless, John W. Linville, b43-dev
On 20 May 2014 08:48, Antonio Quartulli <antonio@meshcoding.com> wrote:
> On 20/05/14 08:46, Rafał Miłecki wrote:
>> --- a/drivers/net/wireless/b43/xmit.c
>> +++ b/drivers/net/wireless/b43/xmit.c
>> - if (phy->type == B43_PHYTYPE_A)
>> + if (!phy->gmode)
>> mac_ctl |= B43_TXH_MAC_5GHZ;
>
> I am not familiar with this driver, but wouldn't 11b mode fall in this
> case as well ?
What Broadcom calls a "gmode" is 2GHz. So this is a simple bool
1) gmode = true; // we work in 2GHz mode
2) gmode = false; // we work in 5GHz mode
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 7:09 ` Rafał Miłecki
@ 2014-05-20 7:10 ` Antonio Quartulli
2014-05-20 7:23 ` Rafał Miłecki
0 siblings, 1 reply; 8+ messages in thread
From: Antonio Quartulli @ 2014-05-20 7:10 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
On 20/05/14 09:09, Rafał Miłecki wrote:
> On 20 May 2014 08:48, Antonio Quartulli <antonio@meshcoding.com> wrote:
>> On 20/05/14 08:46, Rafał Miłecki wrote:
>>> --- a/drivers/net/wireless/b43/xmit.c
>>> +++ b/drivers/net/wireless/b43/xmit.c
>>> - if (phy->type == B43_PHYTYPE_A)
>>> + if (!phy->gmode)
>>> mac_ctl |= B43_TXH_MAC_5GHZ;
>>
>> I am not familiar with this driver, but wouldn't 11b mode fall in this
>> case as well ?
>
> What Broadcom calls a "gmode" is 2GHz. So this is a simple bool
> 1) gmode = true; // we work in 2GHz mode
> 2) gmode = false; // we work in 5GHz mode
Oh ok, thanks for the clarification! I think the variable name should be
less ambiguous then, but it's your/broadcom code :)
Cheers,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 7:10 ` Antonio Quartulli
@ 2014-05-20 7:23 ` Rafał Miłecki
2014-05-20 8:18 ` Michael Büsch
0 siblings, 1 reply; 8+ messages in thread
From: Rafał Miłecki @ 2014-05-20 7:23 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: linux-wireless, John W. Linville, b43-dev
On 20 May 2014 09:10, Antonio Quartulli <antonio@meshcoding.com> wrote:
> On 20/05/14 09:09, Rafał Miłecki wrote:
>> On 20 May 2014 08:48, Antonio Quartulli <antonio@meshcoding.com> wrote:
>>> On 20/05/14 08:46, Rafał Miłecki wrote:
>>>> --- a/drivers/net/wireless/b43/xmit.c
>>>> +++ b/drivers/net/wireless/b43/xmit.c
>>>> - if (phy->type == B43_PHYTYPE_A)
>>>> + if (!phy->gmode)
>>>> mac_ctl |= B43_TXH_MAC_5GHZ;
>>>
>>> I am not familiar with this driver, but wouldn't 11b mode fall in this
>>> case as well ?
>>
>> What Broadcom calls a "gmode" is 2GHz. So this is a simple bool
>> 1) gmode = true; // we work in 2GHz mode
>> 2) gmode = false; // we work in 5GHz mode
>
> Oh ok, thanks for the clarification! I think the variable name should be
> less ambiguous then, but it's your/broadcom code :)
You're probably right. It's just a bit historical, it matches bcm47xx
specs, Broadcom's public code, Broadcom headers and probably their
internal specs. That's why I didn't decide to really touch it, to
avoid confusion when comparing specs with the code.
--
Rafał
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V2] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 6:46 [PATCH] b43: xmit: set 5 GHz bit depending on current band Rafał Miłecki
2014-05-20 6:48 ` Antonio Quartulli
@ 2014-05-20 7:27 ` Rafał Miłecki
1 sibling, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2014-05-20 7:27 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
PHYs other than A may also work in 5 GHz mode.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
V2: Update comment about "gmode" in phy_common.h
Thanks Antonio.
---
drivers/net/wireless/b43/phy_common.h | 2 +-
drivers/net/wireless/b43/xmit.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 4c80b09..47b5585 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -231,7 +231,7 @@ struct b43_phy {
/* HT info */
bool is_40mhz;
- /* GMODE bit enabled? */
+ /* Is GMODE (2 GHz mode) bit enabled? */
bool gmode;
/* Analog Type */
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 31adb8c..4f38f19 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -408,7 +408,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
mac_ctl |= B43_TXH_MAC_HWSEQ;
if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
mac_ctl |= B43_TXH_MAC_STMSDU;
- if (phy->type == B43_PHYTYPE_A)
+ if (!phy->gmode)
mac_ctl |= B43_TXH_MAC_5GHZ;
/* Overwrite rates[0].count to make the retry calculation
--
1.8.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 7:23 ` Rafał Miłecki
@ 2014-05-20 8:18 ` Michael Büsch
2014-05-20 8:24 ` Rafał Miłecki
0 siblings, 1 reply; 8+ messages in thread
From: Michael Büsch @ 2014-05-20 8:18 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: Antonio Quartulli, linux-wireless, b43-dev
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
On Tue, 20 May 2014 09:23:28 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:
> You're probably right. It's just a bit historical, it matches bcm47xx
> specs, Broadcom's public code, Broadcom headers and probably their
> internal specs. That's why I didn't decide to really touch it, to
> avoid confusion when comparing specs with the code.
The thing is that the actual hardware bit is called GMODE.
I guess we could rename that variable and add a comment, if it's really an issue.
But not the #define for the hardware bit.
--
Michael.
----
Please use PGP/GPG encryption.
Key-ID: F532BE1D908D8B0E
--------
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] b43: xmit: set 5 GHz bit depending on current band
2014-05-20 8:18 ` Michael Büsch
@ 2014-05-20 8:24 ` Rafał Miłecki
0 siblings, 0 replies; 8+ messages in thread
From: Rafał Miłecki @ 2014-05-20 8:24 UTC (permalink / raw)
To: Michael Büsch; +Cc: Antonio Quartulli, linux-wireless, b43-dev
On 20 May 2014 10:18, Michael Büsch <m@bues.ch> wrote:
> On Tue, 20 May 2014 09:23:28 +0200
> Rafał Miłecki <zajec5@gmail.com> wrote:
>
>> You're probably right. It's just a bit historical, it matches bcm47xx
>> specs, Broadcom's public code, Broadcom headers and probably their
>> internal specs. That's why I didn't decide to really touch it, to
>> avoid confusion when comparing specs with the code.
>
>
> The thing is that the actual hardware bit is called GMODE.
> I guess we could rename that variable and add a comment, if it's really an issue.
> But not the #define for the hardware bit.
Thanks for your comment. In V2 I've extended "gmode" comment slightly,
so I hope it'll be fine now.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-05-20 8:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-20 6:46 [PATCH] b43: xmit: set 5 GHz bit depending on current band Rafał Miłecki
2014-05-20 6:48 ` Antonio Quartulli
2014-05-20 7:09 ` Rafał Miłecki
2014-05-20 7:10 ` Antonio Quartulli
2014-05-20 7:23 ` Rafał Miłecki
2014-05-20 8:18 ` Michael Büsch
2014-05-20 8:24 ` Rafał Miłecki
2014-05-20 7:27 ` [PATCH V2] " Rafał Miłecki
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).