b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: N-PHY: fix copy&paste typo
@ 2010-04-01 21:11 Rafał Miłecki
  2010-04-01 23:05 ` richardvoigt at gmail.com
  0 siblings, 1 reply; 4+ messages in thread
From: Rafał Miłecki @ 2010-04-01 21:11 UTC (permalink / raw)
  To: linux-wireless, John W. Linville
  Cc: b43-dev, Myhailo Danylenko, Rafał Miłecki

Reported-by: Myhailo Danylenko <isbear@ukrpost.net>
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 6fd140a..2ae2445 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -2790,7 +2790,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
 			}
 			b43_ntab_write_bulk(dev, B43_NTAB16(15, 88), 4,
 						buffer);
-			b43_ntab_write_bulk(dev, B43_NTAB16(15, 101), 2,
+			b43_ntab_read_bulk(dev, B43_NTAB16(15, 101), 2,
 						buffer);
 			b43_ntab_write_bulk(dev, B43_NTAB16(15, 85), 2,
 						buffer);
-- 
1.6.4.2

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

* [PATCH] b43: N-PHY: fix copy&paste typo
  2010-04-01 21:11 [PATCH] b43: N-PHY: fix copy&paste typo Rafał Miłecki
@ 2010-04-01 23:05 ` richardvoigt at gmail.com
  2010-04-01 23:12   ` Larry Finger
  2010-04-02  7:28   ` Michael Buesch
  0 siblings, 2 replies; 4+ messages in thread
From: richardvoigt at gmail.com @ 2010-04-01 23:05 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-wireless, John W. Linville, b43-dev, Myhailo Danylenko

Does anybody else think all the magic numbers make this code hard to understand?

2010/4/1 Rafa? Mi?ecki <zajec5@gmail.com>:
> Reported-by: Myhailo Danylenko <isbear@ukrpost.net>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
> ?drivers/net/wireless/b43/phy_n.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
> index 6fd140a..2ae2445 100644
> --- a/drivers/net/wireless/b43/phy_n.c
> +++ b/drivers/net/wireless/b43/phy_n.c
> @@ -2790,7 +2790,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
> ? ? ? ? ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ? ? ? ? ?b43_ntab_write_bulk(dev, B43_NTAB16(15, 88), 4,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?buffer);
> - ? ? ? ? ? ? ? ? ? ? ? b43_ntab_write_bulk(dev, B43_NTAB16(15, 101), 2,
> + ? ? ? ? ? ? ? ? ? ? ? b43_ntab_read_bulk(dev, B43_NTAB16(15, 101), 2,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?buffer);
> ? ? ? ? ? ? ? ? ? ? ? ?b43_ntab_write_bulk(dev, B43_NTAB16(15, 85), 2,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?buffer);
> --
> 1.6.4.2
>
>
> _______________________________________________
> b43-dev mailing list
> b43-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/b43-dev
>

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

* [PATCH] b43: N-PHY: fix copy&paste typo
  2010-04-01 23:05 ` richardvoigt at gmail.com
@ 2010-04-01 23:12   ` Larry Finger
  2010-04-02  7:28   ` Michael Buesch
  1 sibling, 0 replies; 4+ messages in thread
From: Larry Finger @ 2010-04-01 23:12 UTC (permalink / raw)
  To: richardvoigt@gmail.com
  Cc: Rafał Miłecki, linux-wireless, John W. Linville,
	b43-dev, Myhailo Danylenko

On 04/01/2010 06:05 PM, richardvoigt at gmail.com wrote:
> Does anybody else think all the magic numbers make this code hard to understand?
> 
> 2010/4/1 Rafa? Mi?ecki <zajec5@gmail.com>:
>> Reported-by: Myhailo Danylenko <isbear@ukrpost.net>
>> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
>> ---
>>  drivers/net/wireless/b43/phy_n.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
>> index 6fd140a..2ae2445 100644
>> --- a/drivers/net/wireless/b43/phy_n.c
>> +++ b/drivers/net/wireless/b43/phy_n.c
>> @@ -2790,7 +2790,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
>>                        }
>>                        b43_ntab_write_bulk(dev, B43_NTAB16(15, 88), 4,

If you have any idea what the 16-bit N PHY table 15 with offset 88 and
length 4 means to the firmware, please be our guest. All those us that
do the RE can only decompile the Broadcom driver, and write the specs.
Rafal writes the b43 code from that.

Larry

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

* [PATCH] b43: N-PHY: fix copy&paste typo
  2010-04-01 23:05 ` richardvoigt at gmail.com
  2010-04-01 23:12   ` Larry Finger
@ 2010-04-02  7:28   ` Michael Buesch
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Buesch @ 2010-04-02  7:28 UTC (permalink / raw)
  To: richardvoigt@gmail.com
  Cc: Rafał Miłecki, linux-wireless, John W. Linville,
	b43-dev, Myhailo Danylenko

On Friday 02 April 2010 01:05:22 richardvoigt at gmail.com wrote:
> Does anybody else think all the magic numbers make this code hard to understand?

Not at all. These are perfectly valid decimal numbers.
In my country you learn them in first class at school.

Seriously. What should we do?
#define NTAB_OFFSET_THAT_IS_FIFTEEN	15
No!

And btw, I'm pretty sure that broadcom also opencodes lots of these offsets
and values in their code. And that often is a sane thing to do. Creating
hundred thousands of defines that nobody understands is not a sane solution, either.

> 2010/4/1 Rafa? Mi?ecki <zajec5@gmail.com>:
> > Reported-by: Myhailo Danylenko <isbear@ukrpost.net>
> > Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> > ---
> >  drivers/net/wireless/b43/phy_n.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
> > index 6fd140a..2ae2445 100644
> > --- a/drivers/net/wireless/b43/phy_n.c
> > +++ b/drivers/net/wireless/b43/phy_n.c
> > @@ -2790,7 +2790,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
> >                        }
> >                        b43_ntab_write_bulk(dev, B43_NTAB16(15, 88), 4,
> >                                                buffer);
> > -                       b43_ntab_write_bulk(dev, B43_NTAB16(15, 101), 2,
> > +                       b43_ntab_read_bulk(dev, B43_NTAB16(15, 101), 2,
> >                                                buffer);
> >                        b43_ntab_write_bulk(dev, B43_NTAB16(15, 85), 2,
> >                                                buffer);
> > --
> > 1.6.4.2
> >
> >
> > _______________________________________________
> > b43-dev mailing list
> > b43-dev at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/b43-dev
> >
> 

-- 
Greetings, Michael.

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

end of thread, other threads:[~2010-04-02  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 21:11 [PATCH] b43: N-PHY: fix copy&paste typo Rafał Miłecki
2010-04-01 23:05 ` richardvoigt at gmail.com
2010-04-01 23:12   ` Larry Finger
2010-04-02  7:28   ` Michael Buesch

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