public inbox for b43-dev@lists.infradead.org
 help / color / mirror / Atom feed
* Wrong offset for SSB_SPROM4_ANTAVAIL?
@ 2011-04-08 23:28 Jonas Gorski
  2011-04-09  8:10 ` Rafał Miłecki
  0 siblings, 1 reply; 5+ messages in thread
From: Jonas Gorski @ 2011-04-08 23:28 UTC (permalink / raw)
  To: b43-dev

Hello,

while matching SPROM content to its offsets, I noticed that
SSB_SPROM4_ANTAVAIL has an odd offset (0x5d)[1]. Shouldn't this be
rather even (probably 0x5c), since the SPROM consists of 16 bit words?

Regards
Jonas

[1] <http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=blob;f=include/linux/ssb/ssb_regs.h;h=402955ae48ceac9c118833bed28ca093407e4638;hb=HEAD#l290>

P.S: I currently lack the free space for yet another kernel git tree,
so I would prefer if somebody else fixes this - assuming my analysis
is right ;-)

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

* Wrong offset for SSB_SPROM4_ANTAVAIL?
  2011-04-08 23:28 Wrong offset for SSB_SPROM4_ANTAVAIL? Jonas Gorski
@ 2011-04-09  8:10 ` Rafał Miłecki
  2011-04-09 11:31   ` Michael Büsch
  0 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2011-04-09  8:10 UTC (permalink / raw)
  To: b43-dev

2011/4/9 Jonas Gorski <jonas.gorski@gmail.com>:
> while matching SPROM content to its offsets, I noticed that
> SSB_SPROM4_ANTAVAIL has an odd offset (0x5d)[1]. Shouldn't this be
> rather even (probably 0x5c), since the SPROM consists of 16 bit words?
>
> Regards
> Jonas
>
> [1] <http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=blob;f=include/linux/ssb/ssb_regs.h;h=402955ae48ceac9c118833bed28ca093407e4638;hb=HEAD#l290>
>
> P.S: I currently lack the free space for yet another kernel git tree,
> so I would prefer if somebody else fixes this - assuming my analysis
> is right ;-)

I'll have time after weekend. There is some mess generally. We have
ETHPHY instead of some LEDS and we have MASKs inverted for ANTENNA.

-- 
Rafa?

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

* Wrong offset for SSB_SPROM4_ANTAVAIL?
  2011-04-09  8:10 ` Rafał Miłecki
@ 2011-04-09 11:31   ` Michael Büsch
  2011-04-09 22:11     ` Rafał Miłecki
  2011-04-09 22:14     ` Rafał Miłecki
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Büsch @ 2011-04-09 11:31 UTC (permalink / raw)
  To: b43-dev

On Sat, 2011-04-09 at 10:10 +0200, Rafa? Mi?ecki wrote: 
> 2011/4/9 Jonas Gorski <jonas.gorski@gmail.com>:
> > while matching SPROM content to its offsets, I noticed that
> > SSB_SPROM4_ANTAVAIL has an odd offset (0x5d)[1]. Shouldn't this be
> > rather even (probably 0x5c), since the SPROM consists of 16 bit words?
> >
> > Regards
> > Jonas
> >
> > [1] <http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=blob;f=include/linux/ssb/ssb_regs.h;h=402955ae48ceac9c118833bed28ca093407e4638;hb=HEAD#l290>
> >
> > P.S: I currently lack the free space for yet another kernel git tree,
> > so I would prefer if somebody else fixes this - assuming my analysis
> > is right ;-)
> 
> I'll have time after weekend. There is some mess generally. We have
> ETHPHY instead of some LEDS and we have MASKs inverted for ANTENNA.

Note that the specs might also be incorrect on some of the fields.
There were bugfixes in the struct that were probably not propagated
up to the specs.

-- 
Greetings Michael.

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

* Wrong offset for SSB_SPROM4_ANTAVAIL?
  2011-04-09 11:31   ` Michael Büsch
@ 2011-04-09 22:11     ` Rafał Miłecki
  2011-04-09 22:14     ` Rafał Miłecki
  1 sibling, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2011-04-09 22:11 UTC (permalink / raw)
  To: b43-dev

W dniu 9 kwietnia 2011 13:31 u?ytkownik Michael B?sch <mb@bu3sch.de> napisa?:
> On Sat, 2011-04-09 at 10:10 +0200, Rafa? Mi?ecki wrote:
>> 2011/4/9 Jonas Gorski <jonas.gorski@gmail.com>:
>> > while matching SPROM content to its offsets, I noticed that
>> > SSB_SPROM4_ANTAVAIL has an odd offset (0x5d)[1]. Shouldn't this be
>> > rather even (probably 0x5c), since the SPROM consists of 16 bit words?
>> >
>> > Regards
>> > Jonas
>> >
>> > [1] <http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=blob;f=include/linux/ssb/ssb_regs.h;h=402955ae48ceac9c118833bed28ca093407e4638;hb=HEAD#l290>
>> >
>> > P.S: I currently lack the free space for yet another kernel git tree,
>> > so I would prefer if somebody else fixes this - assuming my analysis
>> > is right ;-)
>>
>> I'll have time after weekend. There is some mess generally. We have
>> ETHPHY instead of some LEDS and we have MASKs inverted for ANTENNA.
>
> Note that the specs might also be incorrect on some of the fields.
> There were bugfixes in the struct that were probably not propagated
> up to the specs.

http://bcm-v4.sipsolutions.net/SPROM
Revision 4 SPROM
0x005A
bits 15-8: LED Powersave Duty Cycle 	
bits 7-0: LED Powersave Duty Cycle 	

bcmsrom_fmt.h:
#define	SROM4_LEDDC		45
45 == 0x2D; 0x2D * 2 == 0x5A

bcm-v4 specs and brcm80211 agree about this one. However:
#define SSB_SPROM4_ETHPHY		0x005A	/* Ethernet PHY settings ?? */
#define  SSB_SPROM4_ETHPHY_ET0A		0x001F	/* MII Address for enet0 */
#define  SSB_SPROM4_ETHPHY_ET1A		0x03E0	/* MII Address for enet1 */
#define  SSB_SPROM4_ETHPHY_ET1A_SHIFT	5
#define  SSB_SPROM4_ETHPHY_ET0M		(1<<14)	/* MDIO for enet0 */
#define  SSB_SPROM4_ETHPHY_ET1M		(1<<15)	/* MDIO for enet1 */

-- 
Rafa?

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

* Wrong offset for SSB_SPROM4_ANTAVAIL?
  2011-04-09 11:31   ` Michael Büsch
  2011-04-09 22:11     ` Rafał Miłecki
@ 2011-04-09 22:14     ` Rafał Miłecki
  1 sibling, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2011-04-09 22:14 UTC (permalink / raw)
  To: b43-dev

W dniu 9 kwietnia 2011 13:31 u?ytkownik Michael B?sch <mb@bu3sch.de> napisa?:
> On Sat, 2011-04-09 at 10:10 +0200, Rafa? Mi?ecki wrote:
>> 2011/4/9 Jonas Gorski <jonas.gorski@gmail.com>:
>> > while matching SPROM content to its offsets, I noticed that
>> > SSB_SPROM4_ANTAVAIL has an odd offset (0x5d)[1]. Shouldn't this be
>> > rather even (probably 0x5c), since the SPROM consists of 16 bit words?
>> >
>> > Regards
>> > Jonas
>> >
>> > [1] <http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next-2.6.git;a=blob;f=include/linux/ssb/ssb_regs.h;h=402955ae48ceac9c118833bed28ca093407e4638;hb=HEAD#l290>
>> >
>> > P.S: I currently lack the free space for yet another kernel git tree,
>> > so I would prefer if somebody else fixes this - assuming my analysis
>> > is right ;-)
>>
>> I'll have time after weekend. There is some mess generally. We have
>> ETHPHY instead of some LEDS and we have MASKs inverted for ANTENNA.
>
> Note that the specs might also be incorrect on some of the fields.
> There were bugfixes in the struct that were probably not propagated
> up to the specs.

Another one:

http://bcm-v4.sipsolutions.net/SPROM
Revision 4 SPROM
0x005C 	
bits 7-0: 802.11B/G Antennas Available 	
bits 15-8: 802.11A Antenas Available
[my comments]
7-0 means 0xFF
15-8 means 0xFF00

bcmsrom_fmt.h:
#define	SROM4_AA2G_MASK		0x00ff
#define	SROM4_AA5G_MASK		0xff00

However ssb seems to implement that masks switched:
#define  SSB_SPROM4_ANTAVAIL_A		0x00FF	/* A-PHY bitfield */
#define  SSB_SPROM4_ANTAVAIL_BG		0xFF00	/* B-PHY and G-PHY bitfield */
(agaik A==5GHz; G==2GHz)


It seems that for both cases specs are fine.

-- 
Rafa?

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

end of thread, other threads:[~2011-04-09 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 23:28 Wrong offset for SSB_SPROM4_ANTAVAIL? Jonas Gorski
2011-04-09  8:10 ` Rafał Miłecki
2011-04-09 11:31   ` Michael Büsch
2011-04-09 22:11     ` Rafał Miłecki
2011-04-09 22:14     ` 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