Bug 277431 (mac80211_link_status)

Summary: iwl3945 always reports link
Product: [Fedora] Fedora Reporter: Warren Togami <wtogami>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 9CC: cebbert, davej, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-07 23:33:41 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235704    
Description Flags
network-functions.patch none

Description Warren Togami 2007-09-04 17:03:26 EDT
iwl3945 always reports there is a link, even if it isn't associated with an AP.

By default /etc/sysconfig/network-scripts/ifcfg-wlan0 contains:
# Intel Corporation PRO/Wireless 3945ABG Network Connection

During system startup, if the device reports a link, then dhclient attempts to
obtain an address on that interface.  As a result, iwl3945's erroneous reporting
of a link causes the system startup to sit for a long time until the DHCP client
Comment 1 Jeremy Katz 2007-10-23 17:54:28 EDT
Are you still seeing this Warren?  I didn't reproduce in a quick check with a
laptop here.
Comment 2 Warren Togami 2007-10-31 11:26:49 EDT
Yes, this still stalls boot while it times out DHCP.  It turns out that Jeremy
hasn't been seeing it because he turned off service network.
Comment 3 John W. Linville 2007-11-09 17:20:56 EST
I think this is caused by mac80211 drivers not supporting ethtool.  This 
initscripts don't like this...well, they like it just fine -- it just doesn't 
produce the desired results.

In this case, check_ethtool will return 2 (same as if ethtool was not 
installed).  In turn, this causes check_link_down to return 1, the same as if 
either mii-tool or ethtool had said the link is up.  So, ifup proceeds to call 

I'm sure Bill will tell me that mac80211 needs to support ethtool -- worth 
contemplating, but not a slam dunk w/ the wireless developers.  Another option 
might be to add support to check_link_down for using "ip link show".  I'll 
attach an (untested) patch showing the basic idea while attempting to follow 
the existing network-functions style.
Comment 4 John W. Linville 2007-11-09 17:24:01 EST
Created attachment 253681 [details]

Patch against /etc/sysconfig/network-scripts/network-functions...

Actually, I'm not sure why 'ip link show' isn't the gold standard for this
check.	The only reason I could think of would be if setting carrier state was
not totally trusted either now or in the past.	So, I coded the patch presuming
that 'ip link show' would be a last resort, and would only matter if it
actually showed "NO-CARRIER".

Anyway, does this speed-up the boot process for you?
Comment 5 Bill Nottingham 2007-11-09 23:41:44 EST
Having a third option is just silly - if we're going down that route, I might as
well ditch them all and write something custom that just sits there chatting
over netlink.

Does checking for carrier work on all devices?
Comment 6 John W. Linville 2008-02-13 15:35:06 EST
Created attachment 294833 [details]

Updated version of same idea -- this one seems to work better...
Comment 7 Bill Nottingham 2008-02-13 16:03:56 EST
Note that wireless configs are not written with ONBOOT=yes for a while now. So,
this probably isn't a severe issue any more.
Comment 8 John W. Linville 2008-02-14 11:36:03 EST
The topic came-up as part of this thread:


The OP never replied, so I don't know if it worked for him.  As for me, I 
could not get "ifup wlan0" to work on ipw4965 w/o the patch from comment 6.  
With the patch, no problem...YMMV.
Comment 9 Bug Zapper 2008-05-13 23:11:17 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 10 Brennan Ashton 2008-06-07 23:33:41 EDT
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received feedback to the
information we have requested above, we will assume the problem was not
reproducible, or has been fixed in one of the updates we have released for the
reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest
update of their distribution, and if this issue turns out to still be
reproducible in the latest update, please reopen this bug with additional