2009-03-11 12:40:23

by Johannes Berg

[permalink] [raw]
Subject: configuring while interface is down

Hi,

Alina raised an interesting point -- wext allows you to configure an
interface while it is down, at least by convention. Some parameters for
cfg80211 we reject while an interface is down, e.g. adding new stations,
partly for technical reasons and partly because that doesn't make sense
when the mode of interface isn't fixed.

For cfg80211's assoc/ibss calls, I think we should reject them outright
when the interface is down, any objections?

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-03-11 13:52:45

by Dan Williams

[permalink] [raw]
Subject: Re: configuring while interface is down

On Wed, 2009-03-11 at 13:36 +0100, Johannes Berg wrote:
> Hi,
>
> Alina raised an interesting point -- wext allows you to configure an
> interface while it is down, at least by convention. Some parameters for
> cfg80211 we reject while an interface is down, e.g. adding new stations,
> partly for technical reasons and partly because that doesn't make sense
> when the mode of interface isn't fixed.
>
> For cfg80211's assoc/ibss calls, I think we should reject them outright
> when the interface is down, any objections?

wext *allows* that, but drivers never consistently implemented that
(prism54 for example). With most soft-mac style adapters you can't scan
while the interface is down either. Anything meaningful use of the
interface happens when the firmware (if any) is loaded and the device is
operational. The only reason for setting parameters while the device
was down was to allow "commit-style" handling of the parameters; set
them all up while down, bring the interface up, and it uses all the
params you've set/locked on the interface. With cfg80211, that's
already handled in a much better manner, thus +1 from me.

Dan



2009-03-14 06:24:45

by Kalle Valo

[permalink] [raw]
Subject: Re: configuring while interface is down

Samuel Ortiz <[email protected]> writes:

>> which is what we'll continue doing in cfg80211, but I think we shouldn't
>> bother the driver/mac80211 with it until the netdev is up, and thus
>> reject things from nl80211.
>
> That is quite reasonable, please go for it.

I fully agree. It's good to enforce this in cfg80211.

--
Kalle Valo

2009-03-11 16:06:42

by Johannes Berg

[permalink] [raw]
Subject: Re: configuring while interface is down

On Wed, 2009-03-11 at 16:58 +0100, Alina Friedrichsen wrote:
> Hello Johannes!
>
> > which is what we'll continue doing in cfg80211, but I think we shouldn't
> > bother the driver/mac80211 with it until the netdev is up, and thus
> > reject things from nl80211.
>
> Do you think WEXT should only be a wrapper around cfg80211? If yes, I would agree.

Yes, of course.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-03-11 14:57:25

by Samuel Ortiz

[permalink] [raw]
Subject: Re: configuring while interface is down

On Wed, Mar 11, 2009 at 02:48:34PM +0100, Johannes Berg wrote:
> On Wed, 2009-03-11 at 14:43 +0100, Alina Friedrichsen wrote:
> > Hello!
> >
> > > For cfg80211's assoc/ibss calls, I think we should reject them outright
> > > when the interface is down, any objections?
> >
> > How should assoc in cfg80211 work?
>
> see Jouni's patches.
>
> > For WEXT I like collecting all changes while the interface is down and
> > the if it's up again apply them in one step. That is the reason why I
> > want call "*_commit()" on interface up.
>
> which is what we'll continue doing in cfg80211, but I think we shouldn't
> bother the driver/mac80211 with it until the netdev is up, and thus
> reject things from nl80211.
That is quite reasonable, please go for it.

Cheers,
Samuel.


--
Intel Open Source Technology Centre
http://oss.intel.com/

2009-03-11 15:58:19

by Alina Friedrichsen

[permalink] [raw]
Subject: Re: configuring while interface is down

Hello Johannes!

> which is what we'll continue doing in cfg80211, but I think we should=
n't
> bother the driver/mac80211 with it until the netdev is up, and thus
> reject things from nl80211.

Do you think WEXT should only be a wrapper around cfg80211? If yes, I w=
ould agree.

Regards
Alina

--=20
Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem f=FCr nur=20
17,95 =BF/mtl. + 1 Monat gratis!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K1=
1308T4569a

2009-03-11 14:00:34

by John W. Linville

[permalink] [raw]
Subject: Re: configuring while interface is down

On Wed, Mar 11, 2009 at 01:36:13PM +0100, Johannes Berg wrote:
> Hi,
>
> Alina raised an interesting point -- wext allows you to configure an
> interface while it is down, at least by convention. Some parameters for
> cfg80211 we reject while an interface is down, e.g. adding new stations,
> partly for technical reasons and partly because that doesn't make sense
> when the mode of interface isn't fixed.
>
> For cfg80211's assoc/ibss calls, I think we should reject them outright
> when the interface is down, any objections?

I think that makes perfect sense.

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2009-03-11 13:48:40

by Johannes Berg

[permalink] [raw]
Subject: Re: configuring while interface is down

On Wed, 2009-03-11 at 14:43 +0100, Alina Friedrichsen wrote:
> Hello!
>
> > For cfg80211's assoc/ibss calls, I think we should reject them outright
> > when the interface is down, any objections?
>
> How should assoc in cfg80211 work?

see Jouni's patches.

> For WEXT I like collecting all changes while the interface is down and
> the if it's up again apply them in one step. That is the reason why I
> want call "*_commit()" on interface up.

which is what we'll continue doing in cfg80211, but I think we shouldn't
bother the driver/mac80211 with it until the netdev is up, and thus
reject things from nl80211.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-03-11 13:43:33

by Alina Friedrichsen

[permalink] [raw]
Subject: Re: configuring while interface is down

Hello!

> For cfg80211's assoc/ibss calls, I think we should reject them outrig=
ht
> when the interface is down, any objections?

How should assoc in cfg80211 work?

=46or WEXT I like collecting all changes while the interface is down an=
d the if it's up again apply them in one step. That is the reason why I=
want call "*_commit()" on interface up.

Regards
Alina

--=20
Nur bis 16.03.! DSL-Komplettanschluss inkl. WLAN-Modem f=FCr nur=20
17,95 =BF/mtl. + 1 Monat gratis!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K1=
1308T4569a