I think maybe, we can use a flag to determine "numbering" or not so for people
who want to do descriptive naming, they can just do a
# wlanconfig -n very-descriptive-name create wlandev wifi0 wlanmode sta

or whatever flag that suits the purpose.

This way, it won't change functionality for people who don't need it, but
offers an option for those that need it...

--dyqith


On 12/27/05, Matt Brown <matt@mattb.net.nz> wrote:
Hi,

I recently filed a bug regarding wlanconfig's handling of interface
names. See http://www.madwifi.org/ticket/244 for details. I wrote a
patch to implement my desired behaviour, but in discussion with others
in #madwifi it seems that this is a change that could do with slightly
wider consultation.

There are three options for how wlanconfig can operate with regards to
interface names.

1) Current behaviour
- Interface names ending in a digit are created as is (assuming the
digit refers to a free unit)
- Interface names not ending in a digit are created with the next free
unit number appended to them

eg.
# wlanconfig ath0 create wlandev wifi0 wlanmode sta
ath0
# wlanconfig foo create wlandev wifi0 wlanmode sta
foo0

This behaviour prevents creation of interfaces with descriptive names
that do not end in a digit.

2) Alternative 1
- Interfaces named "ath" have the next free unit number appended
- All other interface names are created "as is"

eg.
# wlanconfig ath create wlandev wifi0 wlanmode sta
ath0
# wlanconfig ath create wlandev wifi0 wlanmode sta
ath1
# wlanconfig ath2 create wlandev wifi0 wlanmode sta
ath2
# wlanconfig foo create wlandev wifi0 wlanmode sta
foo

3) Alternative 2
- All interface names ending in X have the next free unit number
appended
- All other interface names are created "as is"

eg.
# wlanconfig athX create wlandev wifi0 wlanmode sta
ath0
# wlanconfig ath create wlandev wifi0 wlanmode sta
ath
# wlanconfig athX create wlandev wifi0 wlanmode sta
ath2
# wlanconfig foo create wlandev wifi0 wlanmode sta
foo

It would be helpful if we could get some feedback on preferences for
each of the options.

Personally, I don't think the current behaviour is sustainable. Of the
two alternatives, I prefer the first. The main drawback to it is the
restriction on the use of the "ath" prefix. I don't think this is a
problem, your ethernet devices only ever use eth so what possible reason
is there for your atheros devies to use anything other than ath, and if
there is a reason, it's not that much work to specify the unit no.
explicitly.

Look forward to your comments.

Cheers

--
Matt Brown
matt@mattb.net.nz
Mob +64 275 611 544 www.mattb.net.nz



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Madwifi-devel mailing list
Madwifi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/madwifi-devel