Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 94182 Details for
Bug 143698
sys-apps/baselayout-1.12.4-r2 wireless regression: madwifi ap association
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
if_down_up_hack.patch
iwconfig.sh.ifdownup.patch (text/plain), 3.79 KB, created by
Ernst Herzberg
on 2006-08-13 15:40:19 UTC
(
hide
)
Description:
if_down_up_hack.patch
Filename:
MIME Type:
Creator:
Ernst Herzberg
Created:
2006-08-13 15:40:19 UTC
Size:
3.79 KB
patch
obsolete
>--- iwconfig.sh.orig 2006-08-13 23:29:03.000000000 +0200 >+++ iwconfig.sh 2006-08-13 23:47:31.000000000 +0200 >@@ -347,7 +347,7 @@ > # so we can fail gracefully without even trying to connect > iwconfig_associate() { > local iface="$1" mode="${2:-managed}" >- local mac="$3" wep_required="$4" freq="$5" w="(WEP Disabled)" >+ local mac="$3" wep_required="$4" freq="$5" chan="$6" w="(WEP Disabled)" > local dessid="${ESSID//\\\\/\\\\}" key= > > iwconfig_set_mode "${iface}" "${mode}" >@@ -378,7 +378,12 @@ > [[ ${key} != "off" ]] && w=$(iwconfig_get_wep_status "${iface}") > fi > >- [[ -n ${freq} ]] && iwconfig "${iface}" freq "${freq}" >+ # Only use channel or frequency >+ if [[ -n ${chan} ]] ; then >+ iwconfig "${iface}" channel "${chan}" >+ elif [[ -n ${freq} ]] ; then >+ iwconfig "${iface}" freq "${freq}" >+ fi > [[ -n ${mac} ]] && iwconfig "${iface}" ap "${mac}" > > if ! iwconfig "${iface}" essid "${ESSID}" ; then >@@ -453,7 +458,7 @@ > [[ -z ${!x} || ${!x} -gt 0 ]] && sleep "${!x:-1}" > > local error=true i=-1 line= >- local -a mac=() essid=() enc=() qual=() mode=() >+ local -a mac=() essid=() enc=() qual=() mode=() freq=() chan=() > > while read line; do > error=false >@@ -476,6 +481,11 @@ > ;; > *Frequency:*) > freq[i]="${line#*:}" >+ freq[i]="${freq[i]%% *}" >+ ;; >+ *Channel:*) >+ chan[i]="${line#*:}" >+ chan[i]="${chan[i]%% *}" > ;; > *Quality*) > qual[i]="${line#*:}" >@@ -486,6 +496,10 @@ > esac > done < <(iwlist "${iface}" scan 2>/dev/null) > >+ # HUP the interface as some drivers/cards need it >+ interface_down ${iface} >+ interface_up ${iface} >+ > if ${error}; then > ewarn "${iface} does not support scanning" > x="adhoc_essid_${ifvar}" >@@ -533,6 +547,7 @@ > unset mode[y] > unset enc[y] > unset freq[y] >+ unset chan[y] > fi > done > done >@@ -542,6 +557,7 @@ > mode=( "${mode[@]}" ) > enc=( "${enc[@]}" ) > freq=( "${freq[@]}" ) >+ chan=( "${chan[@]}" ) > > for (( i=0; i<${#mac[@]}; i++ )); do > # Don't like ad-hoc nodes by default >@@ -557,6 +573,7 @@ > mode_APs[i]="${mode[${sortline[x]}]}" > enc_APs[i]="${enc[${sortline[x]}]}" > freq_APs[i]="${freq[${sortline[x]}]}" >+ chan_APs[i]="${chan[${sortline[x]}]}" > done > > return 0 >@@ -629,6 +646,7 @@ > unset mac_APs[i] > unset enc_APs[i] > unset freq_APs[i] >+ unset chan_APs[i] > done > > # We need to squash our arrays so indexes work again >@@ -637,6 +655,7 @@ > mac_APs=( "${mac_APs[@]}" ) > enc_APs=( "${enc_APs[@]}" ) > freq_APs=( "${freq_APs[@]}" ) >+ chan_APs=( "${chan_APs[@]}" ) > } > > # bool iwconfig_force_preferred(char *iface) >@@ -679,7 +698,7 @@ > if [[ ${essid} == "${essid_APs[i]}" ]]; then > ESSID="${essid}" > iwconfig_associate "${iface}" "${mode_APs[i]}" "${mac_APs[i]}" \ >- "${enc_APs[i]}" "${freq_APs[i]}" && return 0 >+ "${enc_APs[i]}" "${freq_APs[i]}" "${chan_APs[i]}" && return 0 > break > fi > done >@@ -706,7 +725,7 @@ > if ! ${has_preferred} ; then > ESSID="${essid_APs[i]}" > iwconfig_associate "${iface}" "${mode_APs[i]}" "${mac_APs[i]}" \ >- "${enc_APs[i]}" "${freq_APs[i]}" && return 0 >+ "${enc_APs[i]}" "${freq_APs[i]}" "${chan_APs[i]}" && return 0 > fi > done > >@@ -751,12 +770,14 @@ > unset mac_APs[j] > unset enc_APs[j] > unset freq_APs[j] >+ unset chan_APs[j] > # We need to squash our arrays so that indexes work > essid_APs=( "${essid_APs[@]}" ) > mode_APs=( "${mode_APs[@]}" ) > mac_APs=( "${mac_APs[@]}" ) > enc_APs=( "${enc_APs[@]}" ) > freq_APs=( "${freq_APs[@]}" ) >+ chan_APs=( "${chan_APs[@]}" ) > break > fi > done >@@ -780,7 +801,8 @@ > # variables for the ESSID > iwconfig_configure() { > local iface="$1" e= x= ifvar=$(bash_variable "$1") >- local -a essid_APs=() mac_APs=() mode_APs=() enc_APs=() freq_APs=() >+ local -a essid_APs=() mac_APs=() mode_APs=() >+ local -a enc_APs=() freq_APs=() chan_APs=() > > ESSID="essid_${ifvar}" > ESSID="${!ESSID}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 143698
:
94078
|
94150
|
94182
|
94330