2008-10-01 10:13:42

by Andrey Borzenkov

[permalink] [raw]
Subject: Re: Building two (external) modules from the same sources

On Wednesday 01 October 2008, Greg KH wrote:
> On Mon, Sep 29, 2008 at 09:49:34AM +0400, Andrey Borzenkov wrote:
> > I have here driver that can be built for two different types of
> > hardware from basically the same sources (this is port of old Agere
> > drivers for Hermes-I/Hermes-II chipsets).
>
> Cool, do you have a link to the code, I'd be glad to add it to
> drivers/staging/ if it's not in a fully-mergable state yet to get wider
> users for it.
>

You can look at it here: http://arvidjaar.newmail.ru/wlags49.tar.bz

I doubt that it is suitable for inclusion at current state if ever.
This is taken directly from Agere 2.4 sources; the only parts that were
touched are kernel glue and wireless extensions interface.

And it is not GPL'ed, of course. I attach E-Mail I received a while
back with answere from Agere legal department.

I know that (rather unexpectedly) driver got some acceptance and I was
approached several times by different people; I Cc to them.

> > Build differs only in one define -DHERMES2 and single file with
> > different firmware. Unfortunately "if HII" are spread over sources
> > which makes splitting of sources rather questionable.
> >
> > What is the best way (from kbuild POV) to build two modules - for H-I
> > and H-II - from the same set of source files?
>
> Not to create two different modules, but rather have one module that
> works for both pieces of hardware, with dynamic checks for the different
> portions.
>

I can't; one of the reasons being - I have no idea how to do it. Original
sources build separate modules for every flavour of driver. It is just that
I was recently asked about this driver on Zaurus (which happens to use
Hermes-II); so I had to do something about it.

If someone could offer (link to) hermes-1/2 programming manual ...


Attachments:
(No filename) (0.00 B)
signature.asc (197.00 B)
This is a digitally signed message part.
Download all attachments

2008-10-01 20:09:14

by Greg KH

[permalink] [raw]
Subject: Re: Building two (external) modules from the same sources

On Wed, Oct 01, 2008 at 02:13:10PM +0400, Andrey Borzenkov wrote:
> On Wednesday 01 October 2008, Greg KH wrote:
> > On Mon, Sep 29, 2008 at 09:49:34AM +0400, Andrey Borzenkov wrote:
> > > I have here driver that can be built for two different types of
> > > hardware from basically the same sources (this is port of old Agere
> > > drivers for Hermes-I/Hermes-II chipsets).
> >
> > Cool, do you have a link to the code, I'd be glad to add it to
> > drivers/staging/ if it's not in a fully-mergable state yet to get wider
> > users for it.
> >
>
> You can look at it here: http://arvidjaar.newmail.ru/wlags49.tar.bz
>
> I doubt that it is suitable for inclusion at current state if ever.
> This is taken directly from Agere 2.4 sources; the only parts that were
> touched are kernel glue and wireless extensions interface.

It is acceptable for inclusion in drivers/staging/ where we can work on
cleaning it up from within the kernel environment, and provide access to
users who are wanting to use these drivers now.

Is it ok if I add it there? I'll take the above tarball and make up the
proper patch and get it to build.

> And it is not GPL'ed, of course. I attach E-Mail I received a while
> back with answere from Agere legal department.

It's BSD, which is fine, that works with the GPLv2 license of the rest
of the kernel.

> > > Build differs only in one define -DHERMES2 and single file with
> > > different firmware. Unfortunately "if HII" are spread over sources
> > > which makes splitting of sources rather questionable.
> > >
> > > What is the best way (from kbuild POV) to build two modules - for H-I
> > > and H-II - from the same set of source files?
> >
> > Not to create two different modules, but rather have one module that
> > works for both pieces of hardware, with dynamic checks for the different
> > portions.
> >
>
> I can't; one of the reasons being - I have no idea how to do it. Original
> sources build separate modules for every flavour of driver. It is just that
> I was recently asked about this driver on Zaurus (which happens to use
> Hermes-II); so I had to do something about it.

Hm, I'll look at the code and see if I see anything obvious.

> If someone could offer (link to) hermes-1/2 programming manual ...

That would probably help out a lot :)

thanks,

greg k-h

2008-10-01 22:27:28

by TJ

[permalink] [raw]
Subject: Re: Building two (external) modules from the same sources

On Wed, 2008-10-01 at 13:05 -0700, Greg KH wrote:
> Hm, I'll look at the code and see if I see anything obvious.
>
> > If someone could offer (link to) hermes-1/2 programming manual ...
>
> That would probably help out a lot :)

Unfortunately the changes in the corporate history have always confused
the issue of locating the old documentation.

As I understand it, the chipset(s) were originally developed at Lucent
around 1999-ish. In 2000 the division responsible became a subsidiary
called Agere Systems. In 2002 it was spun-off as a separate business. In
April 2007 it was bought by LSI Corporation, and by the end of 2007 had
lost its separate existence, along with its web-site and the developer
resources it provided.

The Wayback Machine has working links to the product data-sheets and the
original driver packages:

http://web.archive.org/web/20031202185415/www.agere.com/client/wlan.html
http://web.archive.org/web/20060330013615/http://www.agere.com/mobility/wireless_lan_drivers.html

There is another source of confusion - the actual chip-sets used.

Under the name WaveLAN/IEEE there was a pre-802.11b chip-set, as well as
the later WaveLAN Hermes I (1/one) and II (2/two) which are 802.11b
compatible.

The orinoco_cs drivers support the Hermes I chip-set, at least for WEP,
but as I recall, not for WPA/WPA2.

With Andrey's modifications the wlags49 driver supports WPA but not WPA2
- at least not in my tests.

The only technical documentation I can find, and I'm not sure it will be
completely applicable to the 802.11b Hermes chip-sets, is the 1999
Lucent Technologies/Bell Labs Innovations document:

"DRAFT Software Interface Specification for Wireless Connection
Interface for WaveLAN/IEEE (HCF-light)"

which is available (for now) from a Berkeley graduate student's site:

http://bwrc.eecs.berkeley.edu/People/Grad_Students/jbeutel/wavelan_s0005-11-light.htm

The HCF information might be pretty close to what is used in the HCF by
the Hermes wlags49 MSF.

TJ.

P.S. Andrey: Your mail-provider (mail.ru) is blocking my emails to you.