* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
[not found] <b170af450912230401l7a27b981o42cdbc96e5a16b57@mail.gmail.com>
@ 2009-12-23 14:52 ` John W. Linville
2009-12-23 15:10 ` Rafał Miłecki
2009-12-23 18:19 ` Larry Finger
1 sibling, 1 reply; 6+ messages in thread
From: John W. Linville @ 2009-12-23 14:52 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, bcm43xx-dev
On Wed, Dec 23, 2009 at 01:01:58PM +0100, Rafał Miłecki wrote:
> It's just compilation-tested as I don't own N-PHY device yet (should receive
> one for Christmas). Of course I enabled N-PHY in Kconfig.
>
> I already sent this to bcm43xx-dev but didn't get any review. Michael told
> me to send it to you John and to linux-wireless. Is there anyone how could
> review/ack my patch?
>
>
> From 6800722c2fda0e302d7c759a5f2a993503b6581a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
> Date: Tue, 22 Dec 2009 02:27:21 +0100
> Subject: [PATCH] b43: N-PHY: clean table init, check PHY rev
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Move table init to tables_nphy.c, detect newer PHY which use different init
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> drivers/net/wireless/b43/phy_n.c | 43 ++++------------------------
> drivers/net/wireless/b43/tables_nphy.c | 48
> ++++++++++++++++++++++++++++++++
> drivers/net/wireless/b43/tables_nphy.h | 4 ++-
> 3 files changed, 58 insertions(+), 37 deletions(-)
Well, the patch is fairly clearly whitespace-damaged. Perhaps that
is a product of how you forwarded it to linux-wireless?
Other than that, it looks like you are mostly just moving code around.
That's fine, but there doesn't seem to be a lot of point in it
unless the rev 3+ stuff is coming soon? It probably doesn't harm
much either way...
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
2009-12-23 14:52 ` [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev John W. Linville
@ 2009-12-23 15:10 ` Rafał Miłecki
2009-12-23 15:12 ` John W. Linville
0 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2009-12-23 15:10 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, bcm43xx-dev
W dniu 23 grudnia 2009 15:52 użytkownik John W. Linville
<linville@tuxdriver.com> napisał:
> On Wed, Dec 23, 2009 at 01:01:58PM +0100, Rafał Miłecki wrote:
>> It's just compilation-tested as I don't own N-PHY device yet (should receive
>> one for Christmas). Of course I enabled N-PHY in Kconfig.
>>
>> I already sent this to bcm43xx-dev but didn't get any review. Michael told
>> me to send it to you John and to linux-wireless. Is there anyone how could
>> review/ack my patch?
>>
>>
>> From 6800722c2fda0e302d7c759a5f2a993503b6581a Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
>> Date: Tue, 22 Dec 2009 02:27:21 +0100
>> Subject: [PATCH] b43: N-PHY: clean table init, check PHY rev
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Move table init to tables_nphy.c, detect newer PHY which use different init
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>> drivers/net/wireless/b43/phy_n.c | 43 ++++------------------------
>> drivers/net/wireless/b43/tables_nphy.c | 48
>> ++++++++++++++++++++++++++++++++
>> drivers/net/wireless/b43/tables_nphy.h | 4 ++-
>> 3 files changed, 58 insertions(+), 37 deletions(-)
>
> Well, the patch is fairly clearly whitespace-damaged. Perhaps that
> is a product of how you forwarded it to linux-wireless?
I created a new mail, no forwarding. I guess this is GMail issue,
afraid I'll have to install some native mail client.
> Other than that, it looks like you are mostly just moving code around.
> That's fine, but there doesn't seem to be a lot of point in it
> unless the rev 3+ stuff is coming soon? It probably doesn't harm
> much either way...
I believe I've moved code to it's correct place. That is what file
name /says/ (tables_nphy.c) and what is done for LP-PHY. I don't know
yet what revision will be my device. But at least for training I want
to implement b43_nphy_rev3plus_table_init(...) (next one patch maybe).
If you decide to agree to commit this patch and you want to me resend
this with correct white spaces, please ping me about. For future mails
I'll use some native mailer.
--
Rafał
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
2009-12-23 15:10 ` Rafał Miłecki
@ 2009-12-23 15:12 ` John W. Linville
0 siblings, 0 replies; 6+ messages in thread
From: John W. Linville @ 2009-12-23 15:12 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, bcm43xx-dev
On Wed, Dec 23, 2009 at 04:10:35PM +0100, Rafał Miłecki wrote:
> W dniu 23 grudnia 2009 15:52 użytkownik John W. Linville
> If you decide to agree to commit this patch and you want to me resend
> this with correct white spaces, please ping me about. For future mails
> I'll use some native mailer.
I'm fine with the patch -- at least it demonstrates that something
else is needed for rev 3+.
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
[not found] <b170af450912230401l7a27b981o42cdbc96e5a16b57@mail.gmail.com>
2009-12-23 14:52 ` [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev John W. Linville
@ 2009-12-23 18:19 ` Larry Finger
2009-12-23 18:26 ` Michael Buesch
1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2009-12-23 18:19 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: John W. Linville, linux-wireless, bcm43xx-dev
On 12/23/2009 06:01 AM, Rafał Miłecki wrote:
> It's just compilation-tested as I don't own N-PHY device yet (should
> receive one for Christmas). Of course I enabled N-PHY in Kconfig.
>
> I already sent this to bcm43xx-dev but didn't get any review. Michael
> told me to send it to you John and to linux-wireless. Is there anyone
> how could review/ack my patch?
>
>
> From 6800722c2fda0e302d7c759a5f2a993503b6581a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com
> <mailto:zajec5@gmail.com>>
> Date: Tue, 22 Dec 2009 02:27:21 +0100
> Subject: [PATCH] b43: N-PHY: clean table init, check PHY rev
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Move table init to tables_nphy.c, detect newer PHY which use different init
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com <mailto:zajec5@gmail.com>>
> ---
> drivers/net/wireless/b43/phy_n.c | 43 ++++------------------------
> drivers/net/wireless/b43/tables_nphy.c | 48
> ++++++++++++++++++++++++++++++++
> drivers/net/wireless/b43/tables_nphy.h | 4 ++-
> 3 files changed, 58 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/phy_n.c
> b/drivers/net/wireless/b43/phy_n.c
> index 992318a..23cef71 100644
> --- a/drivers/net/wireless/b43/phy_n.c
> +++ b/drivers/net/wireless/b43/phy_n.c
> @@ -197,44 +197,15 @@ void b43_nphy_radio_turn_off(struct b43_wldev *dev)
> ~B43_NPHY_RFCTL_CMD_EN);
> }
>
> -#define ntab_upload(dev, offset, data) do { \
> - unsigned int i; \
> - for (i = 0; i < (offset##_SIZE); i++) \
> - b43_ntab_write(dev, (offset) + i, (data)[i]); \
> - } while (0)
> -
> -/* Upload the N-PHY tables. */
> +/* Upload the N-PHY tables.
> + * http://bcm-v4.sipsolutions.net/802.11/PHY/N/InitTables
> + */
> static void b43_nphy_tables_init(struct b43_wldev *dev)
> {
> - /* Static tables */
> - ntab_upload(dev, B43_NTAB_FRAMESTRUCT, b43_ntab_framestruct);
> - ntab_upload(dev, B43_NTAB_FRAMELT, b43_ntab_framelookup);
> - ntab_upload(dev, B43_NTAB_TMAP, b43_ntab_tmap);
> - ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn);
> - ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel);
> - ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot);
> - ntab_upload(dev, B43_NTAB_PILOTLT, b43_ntab_pilotlt);
> - ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0);
> - ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1);
> - ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0);
> - ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1);
> - ntab_upload(dev, B43_NTAB_BDI, b43_ntab_bdi);
> - ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest);
> - ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs);
> -
> - /* Volatile tables */
> - ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10);
> - ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11);
> - ntab_upload(dev, B43_NTAB_C0_ESTPLT, b43_ntab_estimatepowerlt0);
> - ntab_upload(dev, B43_NTAB_C1_ESTPLT, b43_ntab_estimatepowerlt1);
> - ntab_upload(dev, B43_NTAB_C0_ADJPLT, b43_ntab_adjustpower0);
> - ntab_upload(dev, B43_NTAB_C1_ADJPLT, b43_ntab_adjustpower1);
> - ntab_upload(dev, B43_NTAB_C0_GAINCTL, b43_ntab_gainctl0);
> - ntab_upload(dev, B43_NTAB_C1_GAINCTL, b43_ntab_gainctl1);
> - ntab_upload(dev, B43_NTAB_C0_IQLT, b43_ntab_iqlt0);
> - ntab_upload(dev, B43_NTAB_C1_IQLT, b43_ntab_iqlt1);
> - ntab_upload(dev, B43_NTAB_C0_LOFEEDTH, b43_ntab_loftlt0);
> - ntab_upload(dev, B43_NTAB_C1_LOFEEDTH, b43_ntab_loftlt1);
> + if (dev->phy.rev < 3)
> + b43_nphy_rev0_1_2_table_init(dev);
> + else
> + b43_nphy_rev3plus_table_init(dev);
> }
>
> static void b43_nphy_workarounds(struct b43_wldev *dev)
> diff --git a/drivers/net/wireless/b43/tables_nphy.c
> b/drivers/net/wireless/b43/tables_nphy.c
> index 4e23363..d709555 100644
> --- a/drivers/net/wireless/b43/tables_nphy.c
> +++ b/drivers/net/wireless/b43/tables_nphy.c
> @@ -2474,3 +2474,51 @@ void b43_ntab_write(struct b43_wldev *dev, u32
> offset, u32 value)
> /* Some compiletime assertions... */
> assert_ntab_array_sizes();
> }
> +
> +#define ntab_upload(dev, offset, data) do { \
> + unsigned int i; \
> + for (i = 0; i < (offset##_SIZE); i++) \
> + b43_ntab_write(dev, (offset) + i, (data)[i]); \
> + } while (0)
> +
> +void b43_nphy_rev0_1_2_table_init(struct b43_wldev *dev)
> +{
> + /* Static tables */
> + ntab_upload(dev, B43_NTAB_FRAMESTRUCT, b43_ntab_framestruct);
> + ntab_upload(dev, B43_NTAB_FRAMELT, b43_ntab_framelookup);
> + ntab_upload(dev, B43_NTAB_TMAP, b43_ntab_tmap);
> + ntab_upload(dev, B43_NTAB_TDTRN, b43_ntab_tdtrn);
> + ntab_upload(dev, B43_NTAB_INTLEVEL, b43_ntab_intlevel);
> + ntab_upload(dev, B43_NTAB_PILOT, b43_ntab_pilot);
> + ntab_upload(dev, B43_NTAB_PILOTLT, b43_ntab_pilotlt);
> + ntab_upload(dev, B43_NTAB_TDI20A0, b43_ntab_tdi20a0);
> + ntab_upload(dev, B43_NTAB_TDI20A1, b43_ntab_tdi20a1);
> + ntab_upload(dev, B43_NTAB_TDI40A0, b43_ntab_tdi40a0);
> + ntab_upload(dev, B43_NTAB_TDI40A1, b43_ntab_tdi40a1);
> + ntab_upload(dev, B43_NTAB_BDI, b43_ntab_bdi);
> + ntab_upload(dev, B43_NTAB_CHANEST, b43_ntab_channelest);
> + ntab_upload(dev, B43_NTAB_MCS, b43_ntab_mcs);
> +
> + /* Volatile tables */
> + ntab_upload(dev, B43_NTAB_NOISEVAR10, b43_ntab_noisevar10);
> + ntab_upload(dev, B43_NTAB_NOISEVAR11, b43_ntab_noisevar11);
> + ntab_upload(dev, B43_NTAB_C0_ESTPLT, b43_ntab_estimatepowerlt0);
> + ntab_upload(dev, B43_NTAB_C1_ESTPLT, b43_ntab_estimatepowerlt1);
> + ntab_upload(dev, B43_NTAB_C0_ADJPLT, b43_ntab_adjustpower0);
> + ntab_upload(dev, B43_NTAB_C1_ADJPLT, b43_ntab_adjustpower1);
> + ntab_upload(dev, B43_NTAB_C0_GAINCTL, b43_ntab_gainctl0);
> + ntab_upload(dev, B43_NTAB_C1_GAINCTL, b43_ntab_gainctl1);
> + ntab_upload(dev, B43_NTAB_C0_IQLT, b43_ntab_iqlt0);
> + ntab_upload(dev, B43_NTAB_C1_IQLT, b43_ntab_iqlt1);
> + ntab_upload(dev, B43_NTAB_C0_LOFEEDTH, b43_ntab_loftlt0);
> + ntab_upload(dev, B43_NTAB_C1_LOFEEDTH, b43_ntab_loftlt1);
> +}
> +
> +void b43_nphy_rev3plus_table_init(struct b43_wldev *dev)
> +{
> + /* Static tables */
> + //TODO
> +
> + /* Volatile tables */
> + //TODO
> +}
> diff --git a/drivers/net/wireless/b43/tables_nphy.h
> b/drivers/net/wireless/b43/tables_nphy.h
> index 4d498b0..f5c0c2d 100644
> --- a/drivers/net/wireless/b43/tables_nphy.h
> +++ b/drivers/net/wireless/b43/tables_nphy.h
> @@ -128,6 +128,9 @@ b43_nphy_get_chantabent(struct b43_wldev *dev, u8
> channel);
>
> void b43_ntab_write(struct b43_wldev *dev, u32 offset, u32 value);
>
> +void b43_nphy_rev0_1_2_table_init(struct b43_wldev *dev);
> +void b43_nphy_rev3plus_table_init(struct b43_wldev *dev);
> +
> extern const u8 b43_ntab_adjustpower0[];
> extern const u8 b43_ntab_adjustpower1[];
> extern const u16 b43_ntab_bdi[];
> @@ -155,5 +158,4 @@ extern const u32 b43_ntab_tdi40a1[];
> extern const u32 b43_ntab_tdtrn[];
> extern const u32 b43_ntab_tmap[];
>
> -
> #endif /* B43_TABLES_NPHY_H_ */
ACK for the relocation of the tables.
Larry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
2009-12-23 18:19 ` Larry Finger
@ 2009-12-23 18:26 ` Michael Buesch
2009-12-23 18:40 ` Rafał Miłecki
0 siblings, 1 reply; 6+ messages in thread
From: Michael Buesch @ 2009-12-23 18:26 UTC (permalink / raw)
To: Larry Finger
Cc: Rafał Miłecki, John W. Linville, linux-wireless,
bcm43xx-dev
On Wednesday 23 December 2009 19:19:19 Larry Finger wrote:
> ACK for the relocation of the tables.
Well, the _tables_ aren't actually relocated with that patch. The tables
are already in the tables_nphy.c file. You just relocate the functions that upload
the tables.
So if you want to relocate the upload-functions, the question arises whether
the tables should be made static.
--
Greetings, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev
2009-12-23 18:26 ` Michael Buesch
@ 2009-12-23 18:40 ` Rafał Miłecki
0 siblings, 0 replies; 6+ messages in thread
From: Rafał Miłecki @ 2009-12-23 18:40 UTC (permalink / raw)
To: Michael Buesch
Cc: Larry Finger, John W. Linville, linux-wireless, bcm43xx-dev
2009/12/23 Michael Buesch <mb@bu3sch.de>:
> On Wednesday 23 December 2009 19:19:19 Larry Finger wrote:
>> ACK for the relocation of the tables.
>
> Well, the _tables_ aren't actually relocated with that patch. The tables
> are already in the tables_nphy.c file. You just relocate the functions that upload
> the tables.
Yeah, I believe we all meant "table init relocation" :)
> So if you want to relocate the upload-functions, the question arises whether
> the tables should be made static.
Good catch, thanks. Didn't think about that. I'll post new version.
Thank you guys for help, talk :)
--
Rafał
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-12-23 18:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b170af450912230401l7a27b981o42cdbc96e5a16b57@mail.gmail.com>
2009-12-23 14:52 ` [PATCH][resend with linux-wireless] b43: N-PHY: clean table init, check PHY rev John W. Linville
2009-12-23 15:10 ` Rafał Miłecki
2009-12-23 15:12 ` John W. Linville
2009-12-23 18:19 ` Larry Finger
2009-12-23 18:26 ` Michael Buesch
2009-12-23 18:40 ` 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).