2011-11-26 04:31:19

by Stanislav Yakovlev

[permalink] [raw]
Subject: Converting ipw2x00 driver to mac80211 framework

Hi Johannes,

What do you think is the best way of converting the ipw2x00 driver to
the mac80211 framework?

Is it a good idea to start with the following: split ipw2100.c and
ipw2200.c to the smaller files where each will contain some subset of
functionality (removing code duplication along the way) like in
iwmc3200wifi driver?

Stanislav


2011-11-29 16:24:03

by Stanislav Yakovlev

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

Hi Johannes,

>> What do you think is the best way of converting the ipw2x00 driver to
>> the mac80211 framework?
>
> TBH, I'm not even sure it is a good idea to do that. ?Given that the
> driver is quite old, nobody really knows how the hardware works any
> more, it likely has quite a different operating model from mac80211, I
> wouldn't recommend attempting this. I'm not even sure it is possible at
> all.
>
> It would be much less risky to convert the entire thing to cfg80211, I
> think, basically just replacing the configuration layer in libipw_wx.c
> with a cfg80211 based one.

Thanks for directions, I will take a look.

Stanislav.

2011-11-29 16:47:26

by Johannes Berg

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

On Tue, 2011-11-29 at 08:33 -0800, Stanislav Yakovlev wrote:
> >> It would be much less risky to convert the entire thing to cfg80211, I
> >> think, basically just replacing the configuration layer in libipw_wx.c
> >> with a cfg80211 based one.
> >
> > It might also be a good idea to do some cleanups first -- e.g. I notice,
> > just in a random look at the code, that reset_port isn't used anywhere
> > so all code related to that can be removed...
>
> Do I understand correctly that you suggest remove reset_port from
> libipw_device struct
> and remove all code like this:
>
> - if (ieee->reset_on_keychange &&
> - ieee->iw_mode != IW_MODE_INFRA &&
> - ieee->reset_port && ieee->reset_port(dev)) {
> - LIBIPW_DEBUG_WX("%s: reset_port failed\n", dev->name);
> - return -EINVAL;
> - }
>
> from libipw_wx.c ?

Right. There might be more of this too. That'd just help with converting
since you wouldn't have to think about converting this at all.

johannes


2011-11-29 16:33:13

by Stanislav Yakovlev

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

>> It would be much less risky to convert the entire thing to cfg80211, I
>> think, basically just replacing the configuration layer in libipw_wx.c
>> with a cfg80211 based one.
>
> It might also be a good idea to do some cleanups first -- e.g. I notice,
> just in a random look at the code, that reset_port isn't used anywhere
> so all code related to that can be removed...

Do I understand correctly that you suggest remove reset_port from
libipw_device struct
and remove all code like this:

- if (ieee->reset_on_keychange &&
- ieee->iw_mode != IW_MODE_INFRA &&
- ieee->reset_port && ieee->reset_port(dev)) {
- LIBIPW_DEBUG_WX("%s: reset_port failed\n", dev->name);
- return -EINVAL;
- }

from libipw_wx.c ?

Stanislav.

2011-11-26 20:10:57

by Johannes Berg

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

Hi Stanislav,

> What do you think is the best way of converting the ipw2x00 driver to
> the mac80211 framework?

TBH, I'm not even sure it is a good idea to do that. Given that the
driver is quite old, nobody really knows how the hardware works any
more, it likely has quite a different operating model from mac80211, I
wouldn't recommend attempting this. I'm not even sure it is possible at
all.

It would be much less risky to convert the entire thing to cfg80211, I
think, basically just replacing the configuration layer in libipw_wx.c
with a cfg80211 based one.

johannes


2011-11-26 20:12:20

by Johannes Berg

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

On Sat, 2011-11-26 at 21:10 +0100, Johannes Berg wrote:

> It would be much less risky to convert the entire thing to cfg80211, I
> think, basically just replacing the configuration layer in libipw_wx.c
> with a cfg80211 based one.

It might also be a good idea to do some cleanups first -- e.g. I notice,
just in a random look at the code, that reset_port isn't used anywhere
so all code related to that can be removed...

johannes


2011-11-29 17:45:43

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Converting ipw2x00 driver to mac80211 framework

On Tue, Nov 29, 2011 at 11:47 AM, Johannes Berg
<[email protected]> wrote:
> On Tue, 2011-11-29 at 08:33 -0800, Stanislav Yakovlev wrote:
>> >> It would be much less risky to convert the entire thing to cfg80211, I
>> >> think, basically just replacing the configuration layer in libipw_wx.c
>> >> with a cfg80211 based one.
>> >
>> > It might also be a good idea to do some cleanups first -- e.g. I notice,
>> > just in a random look at the code, that reset_port isn't used anywhere
>> > so all code related to that can be removed...
>>
>> Do I understand correctly that you suggest remove reset_port from
>> libipw_device struct
>> and remove all code like this:
>>
>> -          if (ieee->reset_on_keychange &&
>> -              ieee->iw_mode != IW_MODE_INFRA &&
>> -              ieee->reset_port && ieee->reset_port(dev)) {
>> -                 LIBIPW_DEBUG_WX("%s: reset_port failed\n", dev->name);
>> -                 return -EINVAL;
>> -         }
>>
>> from libipw_wx.c ?
>
> Right. There might be more of this too. That'd just help with converting
> since you wouldn't have to think about converting this at all.

Would you be up to convert prism54 too? :)

Luis