Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360387 - [sys-apps/openrc] iwconfig.sh set_mode function (in ralink drivers)
Summary: [sys-apps/openrc] iwconfig.sh set_mode function (in ralink drivers)
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: netifrc Team
URL:
Whiteboard: netifrc:iwconfig
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-25 06:12 UTC by lqb
Modified: 2013-08-28 17:16 UTC (History)
0 users

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 lqb 2011-03-25 06:12:43 UTC
Ive discovered a common issue that causes when you are running net.lo with a wlan interface, in my case ralink card rt2870 with rt3070sta.ko driver, to say everytime i run the net.lo script "network is down" for set essid, mode, etc.

This is caused because the set_mode function brings down the interface before set the mode, and with my driver this is not possible and fails.... when this first stage fails, then it does not bring it up again and cant continue any further with the interface down... I think this function should try both, with the interface up, and with the interface down....

Reproducible: Always
Comment 1 Tom Collins 2011-11-11 15:43:20 UTC
Confirmed here with a different Ralink-based adapter.  Adding more info to make this easier for others to find.

My adapter is a Powerlink PL-18N USB network adapter.  

alexis ~ # uname -a
Linux alexis 2.6.39-gentoo-r3 #14 SMP PREEMPT Thu Nov 10 23:15:50 EST 2011 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5400+ AuthenticAMD GNU/Linux

Driver: rt2870sta

With the interface up:

alexis linux # ifconfig wlan0 up
alexis linux # iwconfig wlan0 essid any
alexis linux # 

With the interface down:

alexis linux # ifconfig wlan0 down
alexis linux # iwconfig wlan0 essid any
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; Network is down.
alexis linux # 

The above makes the net.wlan0 script fail.  The problem is the line in /lib/rc/net/iwconfig.sh, in iwconfig_set_mode() that says:

        # Devicescape stack requires the interface to be down
        _down

Removing the _down line fixes the problem for me.

My previous adapter didn't require this change, so I don't know what the "right" behaviour is.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-12-27 00:36:57 UTC
What modes is your device being switched between?

A device should be:
- UP to change ESSID
- DOWN to  change MODE

I don't think the problem is iwconfig_set_mode, because it runs:
_down ; iwconfig ... mode ... ; _up
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-28 17:16:51 UTC
No response from user in 18 months.