2011-10-12 23:24:33

by Ben Hutchings

[permalink] [raw]
Subject: Re: Bug#645055: realtek 8188CE ad-hoc mode not supported

On Wed, 2011-10-12 at 17:01 +0100, Ben Hutchings wrote:
> On Wed, Oct 12, 2011 at 11:20:31AM -0400, Antoine Beaupré wrote:
> > On Wed, 12 Oct 2011 14:08:32 +0100, Ben Hutchings <[email protected]> wrote:
> > > Can you create an ad-hoc interface like this:
> > >
> > > iw dev wlan0 interface add wlan1 type adhoc
> > >
> > > (you'll need the iw package).
> >
> > Interesting - this works. Didn't know of the iw tool. But this creates a
> > separate interface, kind of odd!
> >
> > The adhoc mode works like that. I am not sure I understand why it
> > doesn't work with iwconfig, can you enlighten me?
>
> iwconfig uses the original WEXT (wireless extensions) configuration
> interface. This interface was never very well specified and was
> implemented in inconsistent ways by different drivers.
>
> The newer configuration interface used by iw, Network Manager and
> other tools is nl80211 (netlink for IEEE 802.11).
[...]

I looked a little further and saw that nl80211 does support changing
interface type (mode). But this driver (rtl8192ce) only supports
creating new interfaces, not changing their type.

Should mac80211 drivers generally support changing interface type
(change_interface operation)?

Ben.

--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.


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

2011-10-13 02:25:38

by Ben Hutchings

[permalink] [raw]
Subject: Re: Bug#645055: realtek 8188CE ad-hoc mode not supported

On Wed, 2011-10-12 at 21:10 -0500, Larry Finger wrote:
> On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> > I looked a little further and saw that nl80211 does support changing
> > interface type (mode). But this driver (rtl8192ce) only supports
> > creating new interfaces, not changing their type.
> >
> > Should mac80211 drivers generally support changing interface type
> > (change_interface operation)?
>
> I don't think that implementation of the WEXT interface is necessary.

The change_interface operation appears to be used in implementation of
nl80211 too.

> As to using iw, the following sequence worked:
>
> iw dev wlan14 interface add wlan15 type adhoc
> iw dev set rename5 type managed
> iw dev set rename5 type adhoc
>
> Why it was called "rename5" when I asked for "wlan15" is not understood,

udev's persistent name generator isn't able to distinguish the two
interfaces by MAC address, so it decides the new interface should also
be named 'wlan14'. udev does renaming in two steps for some reason, and
the second step obviously fails.

> but the
> iw interface changes the mode for an existing interface when using rtl8192ce.
>
> BTW, I added a new iface because I did not want to interrupt my
> internat connection.

Hmm. Maybe the change_interface operation is only needed to change
type/mode while the interface is up.

Antoine, did you bring the interface down before setting its mode?

Ben.

--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.


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

2011-10-13 02:10:33

by Larry Finger

[permalink] [raw]
Subject: Re: Bug#645055: realtek 8188CE ad-hoc mode not supported

On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> I looked a little further and saw that nl80211 does support changing
> interface type (mode). But this driver (rtl8192ce) only supports
> creating new interfaces, not changing their type.
>
> Should mac80211 drivers generally support changing interface type
> (change_interface operation)?

I don't think that implementation of the WEXT interface is necessary. As to
using iw, the following sequence worked:

iw dev wlan14 interface add wlan15 type adhoc
iw dev set rename5 type managed
iw dev set rename5 type adhoc

Why it was called "rename5" when I asked for "wlan15" is not understood, but the
iw interface changes the mode for an existing interface when using rtl8192ce.

BTW, I added a new iface because I did not want to interrupt my internat connection.

Larry