* [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
@ 2010-10-22 20:24 Rafał Miłecki
2010-10-22 20:25 ` Rafał Miłecki
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Rafał Miłecki @ 2010-10-22 20:24 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
This makes my N-PHY radio at least running (no scanning results so far). The
same register is used by wl on this device.
---
drivers/net/wireless/b43/rfkill.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 78016ae..d2734c9 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -28,7 +28,7 @@
/* Returns TRUE, if the radio is enabled in hardware. */
bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
{
- if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
+ if (dev->dev->id.revision >= 3) {
if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
& B43_MMIO_RADIO_HWENABLED_HI_MASK))
return 1;
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
2010-10-22 20:24 [PATCH] b43: rfkill: use status register based on core revision not (PHY's) Rafał Miłecki
@ 2010-10-22 20:25 ` Rafał Miłecki
2010-10-22 21:38 ` Larry Finger
2010-10-25 12:39 ` Larry Finger
2 siblings, 0 replies; 6+ messages in thread
From: Rafał Miłecki @ 2010-10-22 20:25 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
W dniu 22 października 2010 22:24 użytkownik Rafał Miłecki
<zajec5@gmail.com> napisał:
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> This makes my N-PHY radio at least running (no scanning results so far). The
> same register is used by wl on this device.
John, if you care you can move left opening brace in subject to look
as following:
(not PHY's)
--
Rafał
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
2010-10-22 20:24 [PATCH] b43: rfkill: use status register based on core revision not (PHY's) Rafał Miłecki
2010-10-22 20:25 ` Rafał Miłecki
@ 2010-10-22 21:38 ` Larry Finger
2010-10-22 21:57 ` Rafał Miłecki
2010-10-25 12:39 ` Larry Finger
2 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2010-10-22 21:38 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 10/22/2010 03:24 PM, Rafał Miłecki wrote:
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> This makes my N-PHY radio at least running (no scanning results so far). The
> same register is used by wl on this device.
> ---
> drivers/net/wireless/b43/rfkill.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
> index 78016ae..d2734c9 100644
> --- a/drivers/net/wireless/b43/rfkill.c
> +++ b/drivers/net/wireless/b43/rfkill.c
> @@ -28,7 +28,7 @@
> /* Returns TRUE, if the radio is enabled in hardware. */
> bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
> {
> - if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
> + if (dev->dev->id.revision >= 3) {
> if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
> & B43_MMIO_RADIO_HWENABLED_HI_MASK))
> return
As that register is present only when the core revision >= 3, this change should
not cause a regression. Perhaps this was an error in the RE from the start and
testing the phy.rev has always been wrong.
John: Just in case my analysis is wrong, keep this change out of 2.6.37. I'll
give it some testing with G PHYs before 2.6.38 merge time.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
2010-10-22 21:38 ` Larry Finger
@ 2010-10-22 21:57 ` Rafał Miłecki
2010-10-22 22:31 ` Larry Finger
0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2010-10-22 21:57 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, John W. Linville, b43-dev
W dniu 22 października 2010 23:38 użytkownik Larry Finger
<Larry.Finger@lwfinger.net> napisał:
> On 10/22/2010 03:24 PM, Rafał Miłecki wrote:
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>> This makes my N-PHY radio at least running (no scanning results so far). The
>> same register is used by wl on this device.
>> ---
>> drivers/net/wireless/b43/rfkill.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
>> index 78016ae..d2734c9 100644
>> --- a/drivers/net/wireless/b43/rfkill.c
>> +++ b/drivers/net/wireless/b43/rfkill.c
>> @@ -28,7 +28,7 @@
>> /* Returns TRUE, if the radio is enabled in hardware. */
>> bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
>> {
>> - if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
>> + if (dev->dev->id.revision >= 3) {
>> if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
>> & B43_MMIO_RADIO_HWENABLED_HI_MASK))
>> return
>
> As that register is present only when the core revision >= 3, this change should
> not cause a regression. Perhaps this was an error in the RE from the start and
> testing the phy.rev has always been wrong.
Do not blame RE team ;) It was described correctly since "ever", you
can check it in history of:
http://bcm-specs.sipsolutions.net/MMIO
I actually suspect this may be source of self-switching-on-off-radio
issue described in:
"b43legacy-phy3: Radio hardware status changed to XXX" thread.
I already mailed reporter to ask if he still has access to problematic card.
--
Rafał
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
2010-10-22 21:57 ` Rafał Miłecki
@ 2010-10-22 22:31 ` Larry Finger
0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2010-10-22 22:31 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 10/22/2010 04:57 PM, Rafał Miłecki wrote:
> W dniu 22 października 2010 23:38 użytkownik Larry Finger
> <Larry.Finger@lwfinger.net> napisał:
>> On 10/22/2010 03:24 PM, Rafał Miłecki wrote:
>>
>> As that register is present only when the core revision >= 3, this change should
>> not cause a regression. Perhaps this was an error in the RE from the start and
>> testing the phy.rev has always been wrong.
>
> Do not blame RE team ;) It was described correctly since "ever", you
> can check it in history of:
> http://bcm-specs.sipsolutions.net/MMIO
>
> I actually suspect this may be source of self-switching-on-off-radio
> issue described in:
> "b43legacy-phy3: Radio hardware status changed to XXX" thread.
>
> I already mailed reporter to ask if he still has access to problematic card.
I have two cards that use b43legacy, but their physical format (PCI and Cardbus)
do not include an RFKILL switch, thus I have never tested this code with b43legacy.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] b43: rfkill: use status register based on core revision not (PHY's)
2010-10-22 20:24 [PATCH] b43: rfkill: use status register based on core revision not (PHY's) Rafał Miłecki
2010-10-22 20:25 ` Rafał Miłecki
2010-10-22 21:38 ` Larry Finger
@ 2010-10-25 12:39 ` Larry Finger
2 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2010-10-25 12:39 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
On 10/22/2010 03:24 PM, Rafał Miłecki wrote:
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> This makes my N-PHY radio at least running (no scanning results so far). The
> same register is used by wl on this device.
> ---
> drivers/net/wireless/b43/rfkill.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
> index 78016ae..d2734c9 100644
> --- a/drivers/net/wireless/b43/rfkill.c
> +++ b/drivers/net/wireless/b43/rfkill.c
> @@ -28,7 +28,7 @@
> /* Returns TRUE, if the radio is enabled in hardware. */
> bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
> {
> - if (dev->phy.rev >= 3 || dev->phy.type == B43_PHYTYPE_LP) {
> + if (dev->dev->id.revision >= 3) {
> if (!(b43_read32(dev, B43_MMIO_RADIO_HWENABLED_HI)
> & B43_MMIO_RADIO_HWENABLED_HI_MASK))
> return 1;
Over the weekend, I was able to test this patch using all my b43 hardware. There
were no problems.
Despite having no problems, I still NACK the patch for the reason that b43 only
applies to devices with id.revision >= 5, thus the revised "if" will always be
true. The patch should be rewritten as only b43legacy needs to test the 802.11
core revision.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-25 12:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 20:24 [PATCH] b43: rfkill: use status register based on core revision not (PHY's) Rafał Miłecki
2010-10-22 20:25 ` Rafał Miłecki
2010-10-22 21:38 ` Larry Finger
2010-10-22 21:57 ` Rafał Miłecki
2010-10-22 22:31 ` Larry Finger
2010-10-25 12:39 ` Larry Finger
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).