Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69276 - the wireless network module's default behaviour breaks old wireless cards which do not support scanning
Summary: the wireless network module's default behaviour breaks old wireless cards whi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-28 08:20 UTC by jochen
Modified: 2004-11-04 05:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2004-10-28 08:20:03 UTC
the new wireless network module from latest baselayout tries to scan for access points and configure the card with dhcp, if no configuration for the wireless module is found.

Only a few (new) cards support scanning thou, so this isn't really a sensible default. If scanning doesn't work, the script tries to set the ESSID to some default like any and starts dhcp on the card. If dhcp fails it will shut the card down (which disables wireless extensions with some drivers) and thus the card can't be used at all.

The only solution to this is to remove the wireless module or configure it.

In short: the current default behaviour breaks with certain wireless drivers

I'd suggest to use a more sensible default, like "do nothing if there is no config". Maybe add a new config option like enable_wireless or enable_wireless_autoprobing? Only if this option is set, the wireless module tries to setup the card. The default for "no configuration present" should be "do nothing"

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2004-10-28 12:23:35 UTC
If the wireless cannot associate with an AP then it should abort with an error message.
It can drop into ad-hoc mode and continue - but this has to be configured.

Could you post the output of the script starting and the contents of conf.d/wireless please if this is not the case.
Comment 2 jochen 2004-10-28 12:56:46 UTC
ok, here I removed the /etc/conf.d/wireless completly, and that's what happens:

# /etc/init.d/net.eth1 start --verbose
 * Starting eth1
 *    Loading networking modules for eth1
 *       modules: wireless ifconfig adsl dhcpcd
 *          ifconfig provides interface
 *          dhcpcd provides dhcp
 *    Configuring wireless network for eth1
 *    Scanning for access points
 *    eth1 does not support scanning
 *    You either need to set a preferred_aps list in /etc/conf.d/wireless
 *       preferred_aps=( "ESSID1" "ESSID2" )
 *    or configure defaulting to Ad-Hoc when Managed fails
 *       adhoc_essid_eth1="WLAN"
 *    or hardcode the ESSID against the interface (not recommended)
 *        essid_eth1="ESSID"
 *    Failed to configure wireless for eth1

ok, shit happens, I know my essid etc.. let's configure it by hand, but:

# iwconfig eth1
eth1      no wireless extensions.

If i set the correct essid and key (as recommended by the message) the script will correctly associate the card with my wlan. however, i don't have dhcp, so trying to get an IP using dhcp will fail, which results in the wireless extensions for the interface being disabled again.

that's an orinoco_cs driven card btw.

I don't attach a /etc/conf.d/wireless, because i'm mainly talking about the case when this file is not present (and you use /etc/pcmcia/wireless.conf instead for example)
Comment 3 Roy Marples (RETIRED) gentoo-dev 2004-10-28 13:34:55 UTC
I don't see a problem with here.

We've decided on defaulting to dhcp as *most* people use it - that has nothing todo with wireless.

And you always get that iwconfig error if the interface is down

ifconfig eth1 up
iwconfig essid MYESSID

should work
Comment 4 jochen 2004-11-02 09:47:37 UTC
I see from bug #68908 that the wireless module can be disabled now, so basically this solves this problem here.

yet, I want to answer you:

# /etc/init.d/net.eth1 start
 * Starting eth1
 *    Configuring wireless network for eth1
 *    Scanning for access points
 *    eth1 does not support scanning
 *    You either need to set a preferred_aps list in /etc/conf.d/wireless
 *       preferred_aps=( "ESSID1" "ESSID2" )
 *    or configure defaulting to Ad-Hoc when Managed fails
 *       adhoc_essid_eth1="WLAN"
 *    or hardcode the ESSID against the interface (not recommended)
 *        essid_eth1="ESSID"
 *    Failed to configure wireless for eth1
# iwconfig eth1
eth1      no wireless extensions.
# ifconfig eth1 up
SIOCSIFFLAGS: No such device
# iwconfig eht1 essid foo
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device eht1 ; No such device.

this is the orinoco driver from pcmcia_cs-3.2.7-r2

I really think you should not try to guess a default config, if there is no config for the wireless module (or test whether the wireless driver actually supports all that fancy scanning)
Comment 5 Roy Marples (RETIRED) gentoo-dev 2004-11-02 09:57:10 UTC
There is no default wireless config - you don't need any configuration to connection to an Access point with no security.

I would also add that it's only the orinoco card that does not support scanning afaik - although there is a patch that enables it.
Comment 6 jochen 2004-11-02 10:34:15 UTC
well, check for orinoco then?

which patch do you mean? I would file a bugreport against pcmcia_cs and orinoco then
Comment 7 Roy Marples (RETIRED) gentoo-dev 2004-11-02 11:23:25 UTC
Here's the URL for the patch
http://www.tzi.de/~plasmahh/orinoco.html

Unfortunately, we have no way of testing for an orinoco driver via wireless_tools and who's to say that they don't have this patch installed?
Comment 8 jochen 2004-11-02 13:42:59 UTC
well, I think if somebody feels like patching his system with 3rd party patches, he can also be expected to adopt /etc/conf.d/wireless

when running a stock gentoo box however, I'd expect some init.d script not to break my wireless interface per default

I'll file a bug for the scan patch to be included, the monitor mode patch is already included anyway.
Comment 9 jochen 2004-11-02 14:01:33 UTC
ah, yes.. forgot half of what I wanted to say :)

yes, there is no easy way to figure out which device driver is used for a given interface. However, I'd suggest to stop fiddling with a card as soon as it doesn't support scanning for APs

since the wireless module outputs lots of errors anyway, it could as well print "this card does not seem to fully support auto-config, please setup /etc/conf.d/wireless" and leave the card in peace.

the bug about the scanning patch is bug #69883 btw
Comment 10 Roy Marples (RETIRED) gentoo-dev 2004-11-02 14:45:52 UTC
Your output from comment #2

 *    eth1 does not support scanning
 *    You either need to set a preferred_aps list in /etc/conf.d/wireless
 *       preferred_aps=( "ESSID1" "ESSID2" )
 *    or configure defaulting to Ad-Hoc when Managed fails
 *       adhoc_essid_eth1="WLAN"
 *    or hardcode the ESSID against the interface (not recommended)
 *        essid_eth1="ESSID"
 *    Failed to configure wireless for eth1

Your comment

yes, there is no easy way to figure out which device driver is used for a given interface. However, I'd suggest to stop fiddling with a card as soon as it doesn't support scanning for APs
since the wireless module outputs lots of errors anyway, it could as well print "this card does not seem to fully support auto-config, please setup /etc/conf.d/wireless" and leave the card in peace.


Isn't that what it's currently doing? In fact it even tells you what to configure.
Comment 11 jochen 2004-11-03 01:15:16 UTC
1) the script doesn't stop to fiddle with the card but tries various default essids and thus disables the wireless extensions

2) If you do any of the two recommended settings, the wireless extensions still will be disabled, since your scripts tries to scan anyway

3) a normal user will never see these messages - i had to disable both /etc/hotplug/net.agent and /etc/pcmcia/network which both try to start /etc/init.d/net.$IFACE in order to test your script. of course the output will be in your syslog, but hey, who searches for error messages in the syslog?
Comment 12 Roy Marples (RETIRED) gentoo-dev 2004-11-03 09:35:04 UTC
1) The script does not disable wireless extensions - it brings the card down on failure. But it does this regardless of wireless.
Wireless extensions can be enabled by bringing the card up

ifconfig eth1 up

2) The error message has been improved to say include the associate_order variable when settings preferred_aps. The other setting it recommends - adhoc -  works just fine.

3) The problem here is that both hotplug and pcmcia never echo any error to stdout - instead they write to log files. This is not a wireless specific problem as it applies to any network configuration that causes errors - like dhcp.

Marking is as invalid
Comment 13 jochen 2004-11-03 13:06:29 UTC
no, you're wrong, you cannot bring the interface up again

this may be a bug in the orinoco driver or whereever, fact is, an orinoco driven interface does not work with the default config, after the script tried to bring the interface up, the interface is broken.

the user has to disable the wireless module or give a complete config disabling the automatic scans, otherwise an orinoco driven card just can't be used with gentoo like that :-/
Comment 14 Roy Marples (RETIRED) gentoo-dev 2004-11-04 01:35:11 UTC
Try the orinoco driver in any 2.6 kernel.

I guarantee it works - I know because I use one myself
Comment 15 jochen 2004-11-04 05:15:25 UTC
the pcmcia-cs one doesn't work, the one included in linux 2.4 doesn't work