Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252001 - sys-appps/openrc-0.4.0: iwconfig.sh: infinite loop _and_ bug with RaLink cards
Summary: sys-appps/openrc-0.4.0: iwconfig.sh: infinite loop _and_ bug with RaLink cards
Status: RESOLVED TEST-REQUEST
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: 2008-12-21 21:26 UTC by Simeon Maryasin
Modified: 2010-01-12 19:33 UTC (History)
2 users (show)

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


Attachments
patch for line 45 (+ instead of -) (iwconfig-1.patch,214 bytes, patch)
2008-12-21 21:29 UTC, Simeon Maryasin
Details | Diff
temporary workaround for line 73 (downing interface) (iwconfig-2.patch,378 bytes, patch)
2008-12-21 21:32 UTC, Simeon Maryasin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Maryasin 2008-12-21 21:26:52 UTC
/lib/rc/net/iwconfig.sh: line 45: + instead of - leads to an infinite loop if driver doesn't set ESSID immediately.

same file, line 73: _down before iwconfig $IFACE mode $mode. Comment above says that it is needed by Devicescape stack, but I have a RaLink rt2860 card (Asus Eee Pc 901) with out-of-tree driver, and it cannot set mode when interface is down. Result:

* Bringing up interface ra0
*   Configuring wireless network for ra0
Error for wireless request "Set Mode" (8B06) :
    SET failed on device ra0 ; Network is down.
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device ra0 ; Network is down.
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device ra0 ; Network is down.
*   ra0 does not support setting SSID to "MarSoft"
*   Failed to configure wireless for ra0
* ERROR: net.ra0 failed to start

while if i comment out this line, it initializes ok.

Reproducible: Always




Portage 2.1.6.2 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.27-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-glibc2.0
Timestamp of tree: Sun, 21 Dec 2008 17:15:01 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.0
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sfperms strict userfetch"
GENTOO_MIRRORS="ftp://ftp.corbina.net/pub/Linux/gentoo/ ftp://ftp.fi.debian.org/pub/gentoo/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apache2 audacious bash-completion berkdb bittorrent bluetooth bzip2 cairo cdparanoia cjk cli cracklib crypt css cups curl custom-optimization cxx dbus djvu dri dvd dvdr dvdread encode exif fbcon ffmpeg firefox flac flash fontconfig fortran ftp gd gdbm gif gimp gnutls gpm grammar gsm gtk gtk2 hal hddtemp icecast iconv id3tag idle idn ion3-voidupstreamsupport-truetype isdnlog jabber jack jackmidi java javascript jpeg kmid lame laptop libnotify libsamplerate libxml2 lilypond lm_sensors lua lyrics mad midi mmx mozdevelop mozilla mp3 mplayer mudflap multicall multiuser musepack ncurses netboot nethack network nls nptl nptlonly nsplugin odbc ogg old-daemons opengl openmp pam pcre pdf perl plugins png pppd python qt qt3 qt3support qt4 quicktime rar rdesktop readline reflection rss samba sdl session sndfile sox speex spell spl srt sse sse2 ssl startup-notification subversion svg sysfs syslog taglib tcpd theora threads tiff timidity tk trayicon truetype twolame type1 unicode usb userlocales v4l v4l2 vcd vim vim-pager vim-syntax vim-with-x vorbis wavpack win32codecs wma x86 xcb xcomposite xft xhtml xinerama xml xorg xpm xrandr xscreensaver xulrunner xv xvid zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Simeon Maryasin 2008-12-21 21:29:12 UTC
Created attachment 176093 [details, diff]
patch for line 45 (+ instead of -)
Comment 2 Simeon Maryasin 2008-12-21 21:32:16 UTC
Created attachment 176094 [details, diff]
temporary workaround for line 73 (downing interface)

I don't know what is a Devicescape stack, and if it will conflict with my workaround.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2008-12-22 05:15:25 UTC
Reassigning to base-system herd, CCing maintainer...
Comment 4 Roy Marples 2009-04-23 20:45:20 UTC
I've added the first patch to my SVN, thanks.
I won't merge the second patch as that breaks my rt2500pci card :)
Comment 5 Simeon Maryasin 2009-04-23 21:32:16 UTC
Probably, we need to check in patch2, what card is used, and do or don't downing interface...
BTW, now I'm using wpa_supplicant, and it hasn't that problem. But I couldn't configure wpa_supplicant for ad-hoc mode.
Comment 6 Roy Marples 2009-04-23 21:40:33 UTC
(In reply to comment #5)
> Probably, we need to check in patch2, what card is used, and do or don't
> downing interface...

How do you propose that is done?
I'm pretty sure it cannot be done. It most we could provide a toggle, but I would recommend fixing the driver.

> BTW, now I'm using wpa_supplicant, and it hasn't that problem. But I couldn't
> configure wpa_supplicant for ad-hoc mode.

That's a wpa_supplicant issue to take upstream :)
Comment 7 Simeon Maryasin 2009-04-24 23:22:06 UTC
(In reply to comment #6)
> 
> How do you propose that is done?
> I'm pretty sure it cannot be done. It most we could provide a toggle, but I
> would recommend fixing the driver.
> 
Well, it may be done for example with this 'dirty workaround':
	# Devicescape stack requires the interface to be down
	# But rt2860sta driver requires it to be up...
	iwconfig "${IFACE}" | grep 'Nickname:"RT2860STA"' || _down
	iwconfig "${IFACE}" mode "${mode}" || return 1
	_up
}
Comment 8 Simeon Maryasin 2009-04-24 23:23:14 UTC
The driver is in kernel now, but as a 'staging'.
Comment 9 Patrick Lauer gentoo-dev 2010-01-12 19:33:14 UTC
Fixed drivers appear to be in kernel 2.6.30.