AR71xx/pci hostap-driver kernel mainline BUG

Αντιμετώπιση προβλημάτων που παρουσιάζονται στην λειτουργία του OpenWrt
Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

AR71xx/pci hostap-driver kernel mainline BUG

Δημοσίευσηαπό acoul » Τρί, 03 Ιούλ 2012, 07:11

Κώδικας: Επιλογή όλων

00:11.0 Network controller: Intersil Corporation ISL3874 [Prism 2.5]/ISL3872 [Prism 3] (rev 01)
        Subsystem: Intersil Corporation ISL3874 [Prism 2.5]/ISL3872 [Prism 3]
        Flags: medium devsel, IRQ 72
        Memory at 10000000 (32-bit, prefetchable) [size=4K]
        Capabilities: [dc] Power Management version 2
        Kernel driver in use: hostap_pci

wifi

Κώδικας: Επιλογή όλων

'radio0' is disabled
phy for wifi device radio0 not found
phy for wifi device radio0 not found
'radio1' is disabled
'radio0' is disabled
phy for wifi device radio0 not found
phy for wifi device radio0 not found
'radio1' is disabled

wifi detect

Κώδικας: Επιλογή όλων

sh: wlan1: unknown operand
prism2: Detect failed

sh -x /sbin/wifi

Κώδικας: Επιλογή όλων

+ . /lib/functions.sh
+ N=

+ _C=0
+ NO_EXPORT=1
+ LOAD_STATE=1
+ LIST_SEP=
+ reset_cb
+ [ -z  -a -f /lib/config/uci.sh ]
+ . /lib/config/uci.sh
+ CONFIG_APPEND=
+ DEVICES=
+ DRIVERS=
+ include /lib/wifi
+ local file
+ ls /lib/wifi/hostap.sh /lib/wifi/madwifi.sh
+ . /lib/wifi/hostap.sh
+ append DRIVERS prism2
+ local var=DRIVERS
+ local value=prism2
+ local sep=
+ eval export -n -- "DRIVERS=${DRIVERS:+${DRIVERS}${value:+$sep}}$value"
+ export -n -- DRIVERS=prism2
+ . /lib/wifi/madwifi.sh
+ append DRIVERS atheros
+ local var=DRIVERS
+ local value=atheros
+ local sep=
+ eval export -n -- "DRIVERS=${DRIVERS:+${DRIVERS}${value:+$sep}}$value"
+ export -n -- DRIVERS=prism2 atheros
+ scan_wifi
+ local cfgfile=
+ DEVICES=
+ config_load wireless
+ [ -n  ]
+ uci_load wireless
+ local PACKAGE=wireless
+ local DATA
+ local RET
+ local VAR
+ _C=0
+ [ -z  ]
+ export -n CONFIG_ntp_server=
+ export -n CONFIG_ntp_server_LENGTH=
+ export -n CONFIG_LIST_STATE=
+ export -n CONFIG_SECTIONS=
+ export -n CONFIG_NUM_SECTIONS=0
+ export -n CONFIG_SECTION=
+ /sbin/uci -P /var/state -S -n export wireless
+ DATA=package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ RET=0
+ [ 0 != 0 -o -z package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none' ]
+ eval package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ package wireless
+ return 0
+ config wifi-device radio0
+ local cfgtype=wifi-device
+ local name=radio0
+ export -n CONFIG_NUM_SECTIONS=1
+ name=radio0
+ append CONFIG_SECTIONS radio0
+ local var=CONFIG_SECTIONS
+ local value=radio0
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0
+ [ -n  ]
+ config_cb wifi-device radio0
+ local type=wifi-device
+ local section=radio0
+ append DEVICES radio0
+ local var=DEVICES
+ local value=radio0
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=
+ config_set radio0 ht_capab
+ local section=radio0
+ local option=ht_capab
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio0_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=
+ config_get TYPE  TYPE
+ eval export -n -- TYPE=${CONFIG__TYPE:-${4}}
+ export -n -- TYPE=
+ export -n CONFIG_SECTION=radio0
+ export -n CONFIG_radio0_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio0_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio0_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:05:1b
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:05:1b
+ export -n CONFIG_radio0_macaddr=00:02:6f:38:05:1b
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:05:1b
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio0_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg033579
+ local cfgtype=wifi-iface
+ local name=cfg033579
+ export -n CONFIG_NUM_SECTIONS=2
+ name=cfg033579
+ append CONFIG_SECTIONS cfg033579
+ local var=CONFIG_SECTIONS
+ local value=cfg033579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579
+ [ -n  ]
+ config_cb wifi-iface cfg033579
+ local type=wifi-iface
+ local section=cfg033579
+ config_get TYPE radio0 TYPE
+ eval export -n -- TYPE=${CONFIG_radio0_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg033579
+ export -n CONFIG_cfg033579_TYPE=wifi-iface
+ option device radio0
+ local varname=device
+ shift
+ local value=radio0
+ export -n CONFIG_cfg033579_device=radio0
+ [ -n  ]
+ option_cb device radio0
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg033579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg033579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg033579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg033579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ config wifi-device radio1
+ local cfgtype=wifi-device
+ local name=radio1
+ export -n CONFIG_NUM_SECTIONS=3
+ name=radio1
+ append CONFIG_SECTIONS radio1
+ local var=CONFIG_SECTIONS
+ local value=radio1
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1
+ [ -n  ]
+ config_cb wifi-device radio1
+ local type=wifi-device
+ local section=radio1
+ append DEVICES radio1
+ local var=DEVICES
+ local value=radio1
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1
+ config_set radio1 vifs
+ local section=radio1
+ local option=vifs
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio1_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_set radio1 ht_capab
+ local section=radio1
+ local option=ht_capab
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio1_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_get TYPE cfg033579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg033579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg033579 device
+ eval export -n -- device=${CONFIG_cfg033579_device:-${4}}
+ export -n -- device=radio0
+ config_get vifs radio0 vifs
+ eval export -n -- vifs=${CONFIG_radio0_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg033579
+ local var=vifs
+ local value=cfg033579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg033579
+ config_set radio0 vifs cfg033579
+ local section=radio0
+ local option=vifs
+ local value=cfg033579
+ local old_section=cfg033579
+ CONFIG_SECTION=radio0
+ option vifs cfg033579
+ local varname=vifs
+ shift
+ local value=cfg033579
+ export -n CONFIG_radio0_vifs=cfg033579
+ [ -n  ]
+ option_cb vifs cfg033579
+ return 0
+ CONFIG_SECTION=cfg033579
+ export -n CONFIG_SECTION=radio1
+ export -n CONFIG_radio1_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio1_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio1_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:e7:83
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:e7:83
+ export -n CONFIG_radio1_macaddr=00:02:6f:38:e7:83
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:e7:83
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio1_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg063579
+ local cfgtype=wifi-iface
+ local name=cfg063579
+ export -n CONFIG_NUM_SECTIONS=4
+ name=cfg063579
+ append CONFIG_SECTIONS cfg063579
+ local var=CONFIG_SECTIONS
+ local value=cfg063579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1 cfg063579
+ [ -n  ]
+ config_cb wifi-iface cfg063579
+ local type=wifi-iface
+ local section=cfg063579
+ config_get TYPE radio1 TYPE
+ eval export -n -- TYPE=${CONFIG_radio1_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg063579
+ export -n CONFIG_cfg063579_TYPE=wifi-iface
+ option device radio1
+ local varname=device
+ shift
+ local value=radio1
+ export -n CONFIG_cfg063579_device=radio1
+ [ -n  ]
+ option_cb device radio1
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg063579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg063579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg063579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg063579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ unset DATA
+ config_cb
+ local type=
+ local section=
+ config_get TYPE cfg063579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg063579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg063579 device
+ eval export -n -- device=${CONFIG_cfg063579_device:-${4}}
+ export -n -- device=radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg063579
+ local var=vifs
+ local value=cfg063579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ wifi_updown enable
+ [ enable = enable ]
+ wifi_updown disable
+ [ enable = disable ]
+ config_get disabled radio0 disabled
+ eval export -n -- disabled=${CONFIG_radio0_disabled:-${4}}
+ export -n -- disabled=1
+ [ 1 == 1 ]
+ echo 'radio0' is disabled
'radio0' is disabled
+ set disable
+ config_get iftype radio0 type
+ eval export -n -- iftype=${CONFIG_radio0_type:-${4}}
+ export -n -- iftype=prism2
+ eval type disable_prism2
+ eval scan_prism2 'radio0'
+ scan_prism2 radio0
+ local device=radio0
+ local mainvif
+ local wds
+ [ radio = wlan ]
+ find_prism2_phy radio0
+ local device=radio0
+ config_get radio0 macaddr
+ eval echo ${CONFIG_radio0_macaddr:-${4}}
+ echo 00:02:6f:38:05:1b
+ tr A-Z a-z
+ local macaddr=00:02:6f:38:05:1b
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:05:1b ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:38:e7:83 ]
+ continue
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -n  -a -d /proc/net/hostap/ ]
+ echo phy for wifi device radio0 not found
phy for wifi device radio0 not found
+ return 1
+ config_unset radio0 vifs
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=cfg063579
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ eval disable_prism2 'radio0'
+ disable_prism2 radio0
+ local device=radio0
+ find_prism2_phy radio0
+ local device=radio0
+ tr A-Z a-z
+ config_get radio0 macaddr
+ eval echo ${CONFIG_radio0_macaddr:-${4}}
+ echo 00:02:6f:38:05:1b
+ local macaddr=00:02:6f:38:05:1b
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:05:1b ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:38:e7:83 ]
+ continue
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -n  -a -d /proc/net/hostap/ ]
+ echo phy for wifi device radio0 not found
phy for wifi device radio0 not found
+ return 1
+ return 0
+ config_get disabled radio1 disabled
+ eval export -n -- disabled=${CONFIG_radio1_disabled:-${4}}
+ export -n -- disabled=1
+ [ 1 == 1 ]
+ echo 'radio1' is disabled
'radio1' is disabled
+ set disable
+ config_get iftype radio1 type
+ eval export -n -- iftype=${CONFIG_radio1_type:-${4}}
+ export -n -- iftype=prism2
+ eval type disable_prism2
+ eval scan_prism2 'radio1'
+ scan_prism2 radio1
+ local device=radio1
+ local mainvif
+ local wds
+ [ radio = wlan ]
+ find_prism2_phy radio1
+ local device=radio1
+ tr A-Z a-z
+ config_get radio1 macaddr
+ eval echo ${CONFIG_radio1_macaddr:-${4}}
+ echo 00:02:6f:38:e7:83
+ local macaddr=00:02:6f:38:e7:83
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:e7:83 ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:38:e7:83 ]
+ config_set radio1 phy wlan2
+ local section=radio1
+ local option=phy
+ local value=wlan2
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option phy wlan2
+ local varname=phy
+ shift
+ local value=wlan2
+ export -n CONFIG_radio1_phy=wlan2
+ [ -n  ]
+ option_cb phy wlan2
+ return 0
+ CONFIG_SECTION=cfg063579
+ break
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ [ -n wlan2 -a -d /proc/net/hostap/wlan2 ]
+ [ -z 00:02:6f:38:e7:83 ]
+ return 0
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=cfg063579
+ local _c=0
+ config_get_bool disabled cfg063579 disabled 0
+ local _tmp
+ config_get _tmp cfg063579 disabled 0
+ eval export -n -- _tmp=${CONFIG_cfg063579_disabled:-${4}}
+ export -n -- _tmp=0
+ _tmp=0
+ export -n disabled=0
+ [ 0 = 0 ]
+ config_get mode cfg063579 mode
+ eval export -n -- mode=${CONFIG_cfg063579_mode:-${4}}
+ export -n -- mode=ap
+ [ -z  ]
+ mainvif=cfg063579
+ config_set cfg063579 ifname wlan2
+ local section=cfg063579
+ local option=ifname
+ local value=wlan2
+ local old_section=cfg063579
+ CONFIG_SECTION=cfg063579
+ option ifname wlan2
+ local varname=ifname
+ shift
+ local value=wlan2
+ export -n CONFIG_cfg063579_ifname=wlan2
+ [ -n  ]
+ option_cb ifname wlan2
+ return 0
+ CONFIG_SECTION=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ eval disable_prism2 'radio1'
+ disable_prism2 radio1
+ local device=radio1
+ find_prism2_phy radio1
+ local device=radio1
+ tr A-Z a-z
+ config_get radio1 macaddr
+ eval echo ${CONFIG_radio1_macaddr:-${4}}
+ echo 00:02:6f:38:e7:83
+ local macaddr=00:02:6f:38:e7:83
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ [ -z wlan2 -a -n 00:02:6f:38:e7:83 ]
+ [ -n wlan2 -a -d /proc/net/hostap/wlan2 ]
+ [ -z 00:02:6f:38:e7:83 ]
+ return 0
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ set_wifi_down radio1
+ local cfg=radio1
+ local vifs vif vifstr
+ [ -f /var/run/wifi-radio1.pid ]
+ uci_revert_state wireless radio1
+ local PACKAGE=wireless
+ local CONFIG=radio1
+ local OPTION=
+ /sbin/uci -P /var/state revert wireless.radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=cfg063579
+ uci_revert_state wireless cfg063579
+ local PACKAGE=wireless
+ local CONFIG=cfg063579
+ local OPTION=
+ /sbin/uci -P /var/state revert wireless.cfg063579
+ include /lib/network
+ local file
+ ls /lib/network/config.sh
+ . /lib/network/config.sh
+ . /usr/share/libubox/jshn.sh
+ read line
+ unbridge wlan2
+ return
+ return 0
+ scan_wifi
+ local cfgfile=
+ DEVICES=
+ config_load wireless
+ [ -n  ]
+ uci_load wireless
+ local PACKAGE=wireless
+ local DATA
+ local RET
+ local VAR
+ _C=0
+ [ -z  ]
+ export -n CONFIG_LIST_STATE=
+ export -n CONFIG_SECTIONS=
+ export -n CONFIG_NUM_SECTIONS=0
+ export -n CONFIG_SECTION=
+ /sbin/uci -P /var/state -S -n export wireless
+ DATA=package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ RET=0
+ [ 0 != 0 -o -z package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none' ]
+ eval package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ package wireless
+ return 0
+ config wifi-device radio0
+ local cfgtype=wifi-device
+ local name=radio0
+ export -n CONFIG_NUM_SECTIONS=1
+ name=radio0
+ append CONFIG_SECTIONS radio0
+ local var=CONFIG_SECTIONS
+ local value=radio0
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0
+ [ -n  ]
+ config_cb wifi-device radio0
+ local type=wifi-device
+ local section=radio0
+ append DEVICES radio0
+ local var=DEVICES
+ local value=radio0
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=
+ config_set radio0 ht_capab
+ local section=radio0
+ local option=ht_capab
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio0_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=
+ config_get TYPE  TYPE
+ eval export -n -- TYPE=${CONFIG__TYPE:-${4}}
+ export -n -- TYPE=
+ export -n CONFIG_SECTION=radio0
+ export -n CONFIG_radio0_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio0_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio0_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:05:1b
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:05:1b
+ export -n CONFIG_radio0_macaddr=00:02:6f:38:05:1b
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:05:1b
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio0_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg033579
+ local cfgtype=wifi-iface
+ local name=cfg033579
+ export -n CONFIG_NUM_SECTIONS=2
+ name=cfg033579
+ append CONFIG_SECTIONS cfg033579
+ local var=CONFIG_SECTIONS
+ local value=cfg033579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579
+ [ -n  ]
+ config_cb wifi-iface cfg033579
+ local type=wifi-iface
+ local section=cfg033579
+ config_get TYPE radio0 TYPE
+ eval export -n -- TYPE=${CONFIG_radio0_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg033579
+ export -n CONFIG_cfg033579_TYPE=wifi-iface
+ option device radio0
+ local varname=device
+ shift
+ local value=radio0
+ export -n CONFIG_cfg033579_device=radio0
+ [ -n  ]
+ option_cb device radio0
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg033579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg033579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg033579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg033579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ config wifi-device radio1
+ local cfgtype=wifi-device
+ local name=radio1
+ export -n CONFIG_NUM_SECTIONS=3
+ name=radio1
+ append CONFIG_SECTIONS radio1
+ local var=CONFIG_SECTIONS
+ local value=radio1
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1
+ [ -n  ]
+ config_cb wifi-device radio1
+ local type=wifi-device
+ local section=radio1
+ append DEVICES radio1
+ local var=DEVICES
+ local value=radio1
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1
+ config_set radio1 vifs
+ local section=radio1
+ local option=vifs
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio1_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_set radio1 ht_capab
+ local section=radio1
+ local option=ht_capab
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio1_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_get TYPE cfg033579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg033579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg033579 device
+ eval export -n -- device=${CONFIG_cfg033579_device:-${4}}
+ export -n -- device=radio0
+ config_get vifs radio0 vifs
+ eval export -n -- vifs=${CONFIG_radio0_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg033579
+ local var=vifs
+ local value=cfg033579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg033579
+ config_set radio0 vifs cfg033579
+ local section=radio0
+ local option=vifs
+ local value=cfg033579
+ local old_section=cfg033579
+ CONFIG_SECTION=radio0
+ option vifs cfg033579
+ local varname=vifs
+ shift
+ local value=cfg033579
+ export -n CONFIG_radio0_vifs=cfg033579
+ [ -n  ]
+ option_cb vifs cfg033579
+ return 0
+ CONFIG_SECTION=cfg033579
+ export -n CONFIG_SECTION=radio1
+ export -n CONFIG_radio1_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio1_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio1_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:e7:83
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:e7:83
+ export -n CONFIG_radio1_macaddr=00:02:6f:38:e7:83
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:e7:83
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio1_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg063579
+ local cfgtype=wifi-iface
+ local name=cfg063579
+ export -n CONFIG_NUM_SECTIONS=4
+ name=cfg063579
+ append CONFIG_SECTIONS cfg063579
+ local var=CONFIG_SECTIONS
+ local value=cfg063579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1 cfg063579
+ [ -n  ]
+ config_cb wifi-iface cfg063579
+ local type=wifi-iface
+ local section=cfg063579
+ config_get TYPE radio1 TYPE
+ eval export -n -- TYPE=${CONFIG_radio1_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg063579
+ export -n CONFIG_cfg063579_TYPE=wifi-iface
+ option device radio1
+ local varname=device
+ shift
+ local value=radio1
+ export -n CONFIG_cfg063579_device=radio1
+ [ -n  ]
+ option_cb device radio1
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg063579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg063579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg063579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg063579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ unset DATA
+ config_cb
+ local type=
+ local section=
+ config_get TYPE cfg063579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg063579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg063579 device
+ eval export -n -- device=${CONFIG_cfg063579_device:-${4}}
+ export -n -- device=radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg063579
+ local var=vifs
+ local value=cfg063579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ config_get disabled radio0 disabled
+ eval export -n -- disabled=${CONFIG_radio0_disabled:-${4}}
+ export -n -- disabled=1
+ [ 1 == 1 ]
+ echo 'radio0' is disabled
'radio0' is disabled
+ set disable
+ config_get iftype radio0 type
+ eval export -n -- iftype=${CONFIG_radio0_type:-${4}}
+ export -n -- iftype=prism2
+ eval type disable_prism2
+ eval scan_prism2 'radio0'
+ scan_prism2 radio0
+ local device=radio0
+ local mainvif
+ local wds
+ [ radio = wlan ]
+ find_prism2_phy radio0
+ local device=radio0
+ config_get radio0 macaddr
+ eval echo ${CONFIG_radio0_macaddr:-${4}}
+ echo 00:02:6f:38:05:1b
+ tr A-Z a-z
+ local macaddr=00:02:6f:38:05:1b
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:05:1b ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:38:e7:83 ]
+ continue
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -n  -a -d /proc/net/hostap/ ]
+ echo phy for wifi device radio0 not found
phy for wifi device radio0 not found
+ return 1
+ config_unset radio0 vifs
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=cfg063579
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ eval disable_prism2 'radio0'
+ disable_prism2 radio0
+ local device=radio0
+ find_prism2_phy radio0
+ local device=radio0
+ + config_gettr radio0 A-Z macaddr a-z

+ eval echo ${CONFIG_radio0_macaddr:-${4}}
+ echo 00:02:6f:38:05:1b
+ local macaddr=00:02:6f:38:05:1b
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:05:1b ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:05:1b = 00:02:6f:38:e7:83 ]
+ continue
+ config_get phy radio0 phy
+ eval export -n -- phy=${CONFIG_radio0_phy:-${4}}
+ export -n -- phy=
+ [ -n  -a -d /proc/net/hostap/ ]
+ echo phy for wifi device radio0 not found
phy for wifi device radio0 not found
+ return 1
+ return 0
+ config_get disabled radio1 disabled
+ eval export -n -- disabled=${CONFIG_radio1_disabled:-${4}}
+ export -n -- disabled=1
+ [ 1 == 1 ]
+ echo 'radio1' is disabled
'radio1' is disabled
+ set disable
+ config_get iftype radio1 type
+ eval export -n -- iftype=${CONFIG_radio1_type:-${4}}
+ export -n -- iftype=prism2
+ eval type disable_prism2
+ eval scan_prism2 'radio1'
+ scan_prism2 radio1
+ local device=radio1
+ local mainvif
+ local wds
+ [ radio = wlan ]
+ find_prism2_phy radio1
+ local device=radio1
+ config_get radio1 macaddr
+ eval echo ${CONFIG_radio1_macaddr:-${4}}
+ echo 00:02:6f:38:e7:83
+ tr A-Z a-z
+ local macaddr=00:02:6f:38:e7:83
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=
+ [ -z  -a -n 00:02:6f:38:e7:83 ]
+ cd /proc/net/hostap
+ ls -d wlan0 wlan1 wlan2
+ cat /sys/class/net/wlan0/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:09:9f:d3 ]
+ continue
+ cat /sys/class/net/wlan1/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:3a:8a:1c ]
+ continue
+ cat /sys/class/net/wlan2/address
+ [ 00:02:6f:38:e7:83 = 00:02:6f:38:e7:83 ]
+ config_set radio1 phy wlan2
+ local section=radio1
+ local option=phy
+ local value=wlan2
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option phy wlan2
+ local varname=phy
+ shift
+ local value=wlan2
+ export -n CONFIG_radio1_phy=wlan2
+ [ -n  ]
+ option_cb phy wlan2
+ return 0
+ CONFIG_SECTION=cfg063579
+ break
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ [ -n wlan2 -a -d /proc/net/hostap/wlan2 ]
+ [ -z 00:02:6f:38:e7:83 ]
+ return 0
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=cfg063579
+ local _c=0
+ config_get_bool disabled cfg063579 disabled 0
+ local _tmp
+ config_get _tmp cfg063579 disabled 0
+ eval export -n -- _tmp=${CONFIG_cfg063579_disabled:-${4}}
+ export -n -- _tmp=0
+ _tmp=0
+ export -n disabled=0
+ [ 0 = 0 ]
+ config_get mode cfg063579 mode
+ eval export -n -- mode=${CONFIG_cfg063579_mode:-${4}}
+ export -n -- mode=ap
+ [ -z  ]
+ mainvif=cfg063579
+ config_set cfg063579 ifname wlan2
+ local section=cfg063579
+ local option=ifname
+ local value=wlan2
+ local old_section=cfg063579
+ CONFIG_SECTION=cfg063579
+ option ifname wlan2
+ local varname=ifname
+ shift
+ local value=wlan2
+ export -n CONFIG_cfg063579_ifname=wlan2
+ [ -n  ]
+ option_cb ifname wlan2
+ return 0
+ CONFIG_SECTION=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ eval disable_prism2 'radio1'
+ disable_prism2 radio1
+ local device=radio1
+ find_prism2_phy radio1
+ local device=radio1
+ + config_gettr radio1 A-Z macaddr a-z

+ eval echo ${CONFIG_radio1_macaddr:-${4}}
+ echo 00:02:6f:38:e7:83
+ local macaddr=00:02:6f:38:e7:83
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ [ -z wlan2 -a -n 00:02:6f:38:e7:83 ]
+ [ -n wlan2 -a -d /proc/net/hostap/wlan2 ]
+ [ -z 00:02:6f:38:e7:83 ]
+ return 0
+ config_get phy radio1 phy
+ eval export -n -- phy=${CONFIG_radio1_phy:-${4}}
+ export -n -- phy=wlan2
+ set_wifi_down radio1
+ local cfg=radio1
+ local vifs vif vifstr
+ [ -f /var/run/wifi-radio1.pid ]
+ uci_revert_state wireless radio1
+ local PACKAGE=wireless
+ local CONFIG=radio1
+ local OPTION=
+ /sbin/uci -P /var/state revert wireless.radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=cfg063579
+ uci_revert_state wireless cfg063579
+ local PACKAGE=wireless
+ local CONFIG=cfg063579
+ local OPTION=
+ /sbin/uci -P /var/state revert wireless.cfg063579
+ include /lib/network
+ local file
+ ls /lib/network/config.sh
+ . /lib/network/config.sh
+ . /usr/share/libubox/jshn.sh
+ read line
+ unbridge wlan2
+ return
+ return 0
Τελευταία επεξεργασία από acoul σε Παρ, 06 Ιούλ 2012, 14:00, έχει επεξεργασθεί 1 φορά συνολικά.
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: wifi detect (prism2 issues)

Δημοσίευσηαπό acoul » Τρί, 03 Ιούλ 2012, 07:11

sh -x wifi detect

Κώδικας: Επιλογή όλων

+ . /lib/functions.sh
+ N=

+ _C=0
+ NO_EXPORT=1
+ LOAD_STATE=1
+ LIST_SEP=
+ reset_cb
+ [ -z  -a -f /lib/config/uci.sh ]
+ . /lib/config/uci.sh
+ CONFIG_APPEND=
+ DEVICES=
+ DRIVERS=
+ include /lib/wifi
+ local file
+ ls /lib/wifi/hostap.sh /lib/wifi/madwifi.sh
+ . /lib/wifi/hostap.sh
+ append DRIVERS prism2
+ local var=DRIVERS
+ local value=prism2
+ local sep=
+ eval export -n -- "DRIVERS=${DRIVERS:+${DRIVERS}${value:+$sep}}$value"
+ export -n -- DRIVERS=prism2
+ . /lib/wifi/madwifi.sh
+ append DRIVERS atheros
+ local var=DRIVERS
+ local value=atheros
+ local sep=
+ eval export -n -- "DRIVERS=${DRIVERS:+${DRIVERS}${value:+$sep}}$value"
+ export -n -- DRIVERS=prism2 atheros
+ scan_wifi
+ local cfgfile=
+ DEVICES=
+ config_load wireless
+ [ -n  ]
+ uci_load wireless
+ local PACKAGE=wireless
+ local DATA
+ local RET
+ local VAR
+ _C=0
+ [ -z  ]
+ export -n CONFIG_ntp_server=
+ export -n CONFIG_ntp_server_LENGTH=
+ export -n CONFIG_LIST_STATE=
+ export -n CONFIG_SECTIONS=
+ export -n CONFIG_NUM_SECTIONS=0
+ export -n CONFIG_SECTION=
+ /sbin/uci -P /var/state -S -n export wireless
+ DATA=package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ RET=0
+ [ 0 != 0 -o -z package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none' ]
+ eval package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ package wireless
+ return 0
+ config wifi-device radio0
+ local cfgtype=wifi-device
+ local name=radio0
+ export -n CONFIG_NUM_SECTIONS=1
+ name=radio0
+ append CONFIG_SECTIONS radio0
+ local var=CONFIG_SECTIONS
+ local value=radio0
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0
+ [ -n  ]
+ config_cb wifi-device radio0
+ local type=wifi-device
+ local section=radio0
+ append DEVICES radio0
+ local var=DEVICES
+ local value=radio0
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=
+ config_set radio0 ht_capab
+ local section=radio0
+ local option=ht_capab
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio0_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=
+ config_get TYPE  TYPE
+ eval export -n -- TYPE=${CONFIG__TYPE:-${4}}
+ export -n -- TYPE=
+ export -n CONFIG_SECTION=radio0
+ export -n CONFIG_radio0_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio0_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio0_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:05:1b
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:05:1b
+ export -n CONFIG_radio0_macaddr=00:02:6f:38:05:1b
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:05:1b
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio0_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg033579
+ local cfgtype=wifi-iface
+ local name=cfg033579
+ export -n CONFIG_NUM_SECTIONS=2
+ name=cfg033579
+ append CONFIG_SECTIONS cfg033579
+ local var=CONFIG_SECTIONS
+ local value=cfg033579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579
+ [ -n  ]
+ config_cb wifi-iface cfg033579
+ local type=wifi-iface
+ local section=cfg033579
+ config_get TYPE radio0 TYPE
+ eval export -n -- TYPE=${CONFIG_radio0_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg033579
+ export -n CONFIG_cfg033579_TYPE=wifi-iface
+ option device radio0
+ local varname=device
+ shift
+ local value=radio0
+ export -n CONFIG_cfg033579_device=radio0
+ [ -n  ]
+ option_cb device radio0
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg033579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg033579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg033579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg033579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ config wifi-device radio1
+ local cfgtype=wifi-device
+ local name=radio1
+ export -n CONFIG_NUM_SECTIONS=3
+ name=radio1
+ append CONFIG_SECTIONS radio1
+ local var=CONFIG_SECTIONS
+ local value=radio1
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1
+ [ -n  ]
+ config_cb wifi-device radio1
+ local type=wifi-device
+ local section=radio1
+ append DEVICES radio1
+ local var=DEVICES
+ local value=radio1
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1
+ config_set radio1 vifs
+ local section=radio1
+ local option=vifs
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio1_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_set radio1 ht_capab
+ local section=radio1
+ local option=ht_capab
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio1_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_get TYPE cfg033579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg033579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg033579 device
+ eval export -n -- device=${CONFIG_cfg033579_device:-${4}}
+ export -n -- device=radio0
+ config_get vifs radio0 vifs
+ eval export -n -- vifs=${CONFIG_radio0_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg033579
+ local var=vifs
+ local value=cfg033579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg033579
+ config_set radio0 vifs cfg033579
+ local section=radio0
+ local option=vifs
+ local value=cfg033579
+ local old_section=cfg033579
+ CONFIG_SECTION=radio0
+ option vifs cfg033579
+ local varname=vifs
+ shift
+ local value=cfg033579
+ export -n CONFIG_radio0_vifs=cfg033579
+ [ -n  ]
+ option_cb vifs cfg033579
+ return 0
+ CONFIG_SECTION=cfg033579
+ export -n CONFIG_SECTION=radio1
+ export -n CONFIG_radio1_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio1_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio1_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:e7:83
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:e7:83
+ export -n CONFIG_radio1_macaddr=00:02:6f:38:e7:83
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:e7:83
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio1_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg063579
+ local cfgtype=wifi-iface
+ local name=cfg063579
+ export -n CONFIG_NUM_SECTIONS=4
+ name=cfg063579
+ append CONFIG_SECTIONS cfg063579
+ local var=CONFIG_SECTIONS
+ local value=cfg063579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1 cfg063579
+ [ -n  ]
+ config_cb wifi-iface cfg063579
+ local type=wifi-iface
+ local section=cfg063579
+ config_get TYPE radio1 TYPE
+ eval export -n -- TYPE=${CONFIG_radio1_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg063579
+ export -n CONFIG_cfg063579_TYPE=wifi-iface
+ option device radio1
+ local varname=device
+ shift
+ local value=radio1
+ export -n CONFIG_cfg063579_device=radio1
+ [ -n  ]
+ option_cb device radio1
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg063579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg063579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg063579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg063579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ unset DATA
+ config_cb
+ local type=
+ local section=
+ config_get TYPE cfg063579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg063579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg063579 device
+ eval export -n -- device=${CONFIG_cfg063579_device:-${4}}
+ export -n -- device=radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg063579
+ local var=vifs
+ local value=cfg063579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ wifi_detect
+ eval type detect_prism2
+ eval detect_prism2
+ detect_prism2
+ devidx=0
+ config_load wireless
+ [ -n  ]
+ uci_load wireless
+ local PACKAGE=wireless
+ local DATA
+ local RET
+ local VAR
+ _C=0
+ [ -z  ]
+ export -n CONFIG_LIST_STATE=
+ export -n CONFIG_SECTIONS=
+ export -n CONFIG_NUM_SECTIONS=0
+ export -n CONFIG_SECTION=
+ /sbin/uci -P /var/state -S -n export wireless
+ DATA=package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ RET=0
+ [ 0 != 0 -o -z package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none' ]
+ eval package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ package wireless
+ return 0
+ config wifi-device radio0
+ local cfgtype=wifi-device
+ local name=radio0
+ export -n CONFIG_NUM_SECTIONS=1
+ name=radio0
+ append CONFIG_SECTIONS radio0
+ local var=CONFIG_SECTIONS
+ local value=radio0
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0
+ [ -n  ]
+ config_cb wifi-device radio0
+ local type=wifi-device
+ local section=radio0
+ append DEVICES radio0
+ local var=DEVICES
+ local value=radio0
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1 radio0
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=
+ config_set radio0 ht_capab
+ local section=radio0
+ local option=ht_capab
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio0_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=
+ config_get TYPE  TYPE
+ eval export -n -- TYPE=${CONFIG__TYPE:-${4}}
+ export -n -- TYPE=
+ export -n CONFIG_SECTION=radio0
+ export -n CONFIG_radio0_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio0_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio0_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:05:1b
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:05:1b
+ export -n CONFIG_radio0_macaddr=00:02:6f:38:05:1b
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:05:1b
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio0_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg033579
+ local cfgtype=wifi-iface
+ local name=cfg033579
+ export -n CONFIG_NUM_SECTIONS=2
+ name=cfg033579
+ append CONFIG_SECTIONS cfg033579
+ local var=CONFIG_SECTIONS
+ local value=cfg033579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579
+ [ -n  ]
+ config_cb wifi-iface cfg033579
+ local type=wifi-iface
+ local section=cfg033579
+ config_get TYPE radio0 TYPE
+ eval export -n -- TYPE=${CONFIG_radio0_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg033579
+ export -n CONFIG_cfg033579_TYPE=wifi-iface
+ option device radio0
+ local varname=device
+ shift
+ local value=radio0
+ export -n CONFIG_cfg033579_device=radio0
+ [ -n  ]
+ option_cb device radio0
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg033579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg033579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg033579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg033579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ config wifi-device radio1
+ local cfgtype=wifi-device
+ local name=radio1
+ export -n CONFIG_NUM_SECTIONS=3
+ name=radio1
+ append CONFIG_SECTIONS radio1
+ local var=CONFIG_SECTIONS
+ local value=radio1
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1
+ [ -n  ]
+ config_cb wifi-device radio1
+ local type=wifi-device
+ local section=radio1
+ append DEVICES radio1
+ local var=DEVICES
+ local value=radio1
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1 radio0 radio1
+ config_set radio1 vifs
+ local section=radio1
+ local option=vifs
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio1_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_set radio1 ht_capab
+ local section=radio1
+ local option=ht_capab
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio1_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_get TYPE cfg033579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg033579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg033579 device
+ eval export -n -- device=${CONFIG_cfg033579_device:-${4}}
+ export -n -- device=radio0
+ config_get vifs radio0 vifs
+ eval export -n -- vifs=${CONFIG_radio0_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg033579
+ local var=vifs
+ local value=cfg033579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg033579
+ config_set radio0 vifs cfg033579
+ local section=radio0
+ local option=vifs
+ local value=cfg033579
+ local old_section=cfg033579
+ CONFIG_SECTION=radio0
+ option vifs cfg033579
+ local varname=vifs
+ shift
+ local value=cfg033579
+ export -n CONFIG_radio0_vifs=cfg033579
+ [ -n  ]
+ option_cb vifs cfg033579
+ return 0
+ CONFIG_SECTION=cfg033579
+ export -n CONFIG_SECTION=radio1
+ export -n CONFIG_radio1_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio1_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio1_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:e7:83
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:e7:83
+ export -n CONFIG_radio1_macaddr=00:02:6f:38:e7:83
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:e7:83
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio1_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg063579
+ local cfgtype=wifi-iface
+ local name=cfg063579
+ export -n CONFIG_NUM_SECTIONS=4
+ name=cfg063579
+ append CONFIG_SECTIONS cfg063579
+ local var=CONFIG_SECTIONS
+ local value=cfg063579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1 cfg063579
+ [ -n  ]
+ config_cb wifi-iface cfg063579
+ local type=wifi-iface
+ local section=cfg063579
+ config_get TYPE radio1 TYPE
+ eval export -n -- TYPE=${CONFIG_radio1_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg063579
+ export -n CONFIG_cfg063579_TYPE=wifi-iface
+ option device radio1
+ local varname=device
+ shift
+ local value=radio1
+ export -n CONFIG_cfg063579_device=radio1
+ [ -n  ]
+ option_cb device radio1
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg063579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg063579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg063579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg063579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ unset DATA
+ config_cb
+ local type=
+ local section=
+ config_get TYPE cfg063579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg063579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg063579 device
+ eval export -n -- device=${CONFIG_cfg063579_device:-${4}}
+ export -n -- device=radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg063579
+ local var=vifs
+ local value=cfg063579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ :
+ config_get type radio0 type
+ eval export -n -- type=${CONFIG_radio0_type:-${4}}
+ export -n -- type=prism2
+ [ -n prism2 ]
+ devidx=1
+ :
+ config_get type radio1 type
+ eval export -n -- type=${CONFIG_radio1_type:-${4}}
+ export -n -- type=prism2
+ [ -n prism2 ]
+ devidx=2
+ :
+ config_get type radio2 type
+ eval export -n -- type=${CONFIG_radio2_type:-${4}}
+ export -n -- type=
+ [ -n  ]
+ break
+ cd /proc/net/hostap
+ [ -d wlan0 wlan1 wlan2 ]
sh: wlan1: unknown operand
+ return
+ echo prism2: Detect failed
prism2: Detect failed
+ eval type detect_atheros
+ eval detect_atheros
+ detect_atheros
+ devidx=0
+ config_load wireless
+ [ -n  ]
+ uci_load wireless
+ local PACKAGE=wireless
+ local DATA
+ local RET
+ local VAR
+ _C=0
+ [ -z  ]
+ export -n CONFIG_LIST_STATE=
+ export -n CONFIG_SECTIONS=
+ export -n CONFIG_NUM_SECTIONS=0
+ export -n CONFIG_SECTION=
+ /sbin/uci -P /var/state -S -n export wireless
+ DATA=package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ RET=0
+ [ 0 != 0 -o -z package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none' ]
+ eval package wireless

config wifi-device 'radio0'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:05:1b'
        option disabled '1'

config wifi-iface 'cfg033579'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'prism2'
        option channel '11'
        option macaddr '00:02:6f:38:e7:83'
        option disabled '1'

config wifi-iface 'cfg063579'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
+ package wireless
+ return 0
+ config wifi-device radio0
+ local cfgtype=wifi-device
+ local name=radio0
+ export -n CONFIG_NUM_SECTIONS=1
+ name=radio0
+ append CONFIG_SECTIONS radio0
+ local var=CONFIG_SECTIONS
+ local value=radio0
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0
+ [ -n  ]
+ config_cb wifi-device radio0
+ local type=wifi-device
+ local section=radio0
+ append DEVICES radio0
+ local var=DEVICES
+ local value=radio0
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1 radio0
+ config_set radio0 vifs
+ local section=radio0
+ local option=vifs
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio0_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=
+ config_set radio0 ht_capab
+ local section=radio0
+ local option=ht_capab
+ local value=
+ local old_section=
+ CONFIG_SECTION=radio0
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio0_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=
+ config_get TYPE  TYPE
+ eval export -n -- TYPE=${CONFIG__TYPE:-${4}}
+ export -n -- TYPE=
+ export -n CONFIG_SECTION=radio0
+ export -n CONFIG_radio0_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio0_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio0_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:05:1b
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:05:1b
+ export -n CONFIG_radio0_macaddr=00:02:6f:38:05:1b
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:05:1b
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio0_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg033579
+ local cfgtype=wifi-iface
+ local name=cfg033579
+ export -n CONFIG_NUM_SECTIONS=2
+ name=cfg033579
+ append CONFIG_SECTIONS cfg033579
+ local var=CONFIG_SECTIONS
+ local value=cfg033579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579
+ [ -n  ]
+ config_cb wifi-iface cfg033579
+ local type=wifi-iface
+ local section=cfg033579
+ config_get TYPE radio0 TYPE
+ eval export -n -- TYPE=${CONFIG_radio0_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg033579
+ export -n CONFIG_cfg033579_TYPE=wifi-iface
+ option device radio0
+ local varname=device
+ shift
+ local value=radio0
+ export -n CONFIG_cfg033579_device=radio0
+ [ -n  ]
+ option_cb device radio0
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg033579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg033579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg033579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg033579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ config wifi-device radio1
+ local cfgtype=wifi-device
+ local name=radio1
+ export -n CONFIG_NUM_SECTIONS=3
+ name=radio1
+ append CONFIG_SECTIONS radio1
+ local var=CONFIG_SECTIONS
+ local value=radio1
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1
+ [ -n  ]
+ config_cb wifi-device radio1
+ local type=wifi-device
+ local section=radio1
+ append DEVICES radio1
+ local var=DEVICES
+ local value=radio1
+ local sep=
+ eval export -n -- "DEVICES=${DEVICES:+${DEVICES}${value:+$sep}}$value"
+ export -n -- DEVICES=radio0 radio1 radio0 radio1
+ config_set radio1 vifs
+ local section=radio1
+ local option=vifs
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option vifs
+ local varname=vifs
+ shift
+ local value=
+ export -n CONFIG_radio1_vifs=
+ [ -n  ]
+ option_cb vifs
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_set radio1 ht_capab
+ local section=radio1
+ local option=ht_capab
+ local value=
+ local old_section=cfg033579
+ CONFIG_SECTION=radio1
+ option ht_capab
+ local varname=ht_capab
+ shift
+ local value=
+ export -n CONFIG_radio1_ht_capab=
+ [ -n  ]
+ option_cb ht_capab
+ return 0
+ CONFIG_SECTION=cfg033579
+ config_get TYPE cfg033579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg033579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg033579 device
+ eval export -n -- device=${CONFIG_cfg033579_device:-${4}}
+ export -n -- device=radio0
+ config_get vifs radio0 vifs
+ eval export -n -- vifs=${CONFIG_radio0_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg033579
+ local var=vifs
+ local value=cfg033579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg033579
+ config_set radio0 vifs cfg033579
+ local section=radio0
+ local option=vifs
+ local value=cfg033579
+ local old_section=cfg033579
+ CONFIG_SECTION=radio0
+ option vifs cfg033579
+ local varname=vifs
+ shift
+ local value=cfg033579
+ export -n CONFIG_radio0_vifs=cfg033579
+ [ -n  ]
+ option_cb vifs cfg033579
+ return 0
+ CONFIG_SECTION=cfg033579
+ export -n CONFIG_SECTION=radio1
+ export -n CONFIG_radio1_TYPE=wifi-device
+ option type prism2
+ local varname=type
+ shift
+ local value=prism2
+ export -n CONFIG_radio1_type=prism2
+ [ -n  ]
+ option_cb type prism2
+ return 0
+ option channel 11
+ local varname=channel
+ shift
+ local value=11
+ export -n CONFIG_radio1_channel=11
+ [ -n  ]
+ option_cb channel 11
+ return 0
+ option macaddr 00:02:6f:38:e7:83
+ local varname=macaddr
+ shift
+ local value=00:02:6f:38:e7:83
+ export -n CONFIG_radio1_macaddr=00:02:6f:38:e7:83
+ [ -n  ]
+ option_cb macaddr 00:02:6f:38:e7:83
+ return 0
+ option disabled 1
+ local varname=disabled
+ shift
+ local value=1
+ export -n CONFIG_radio1_disabled=1
+ [ -n  ]
+ option_cb disabled 1
+ return 0
+ config wifi-iface cfg063579
+ local cfgtype=wifi-iface
+ local name=cfg063579
+ export -n CONFIG_NUM_SECTIONS=4
+ name=cfg063579
+ append CONFIG_SECTIONS cfg063579
+ local var=CONFIG_SECTIONS
+ local value=cfg063579
+ local sep=
+ eval export -n -- "CONFIG_SECTIONS=${CONFIG_SECTIONS:+${CONFIG_SECTIONS}${value:+$sep}}$value"
+ export -n -- CONFIG_SECTIONS=radio0 cfg033579 radio1 cfg063579
+ [ -n  ]
+ config_cb wifi-iface cfg063579
+ local type=wifi-iface
+ local section=cfg063579
+ config_get TYPE radio1 TYPE
+ eval export -n -- TYPE=${CONFIG_radio1_TYPE:-${4}}
+ export -n -- TYPE=wifi-device
+ export -n CONFIG_SECTION=cfg063579
+ export -n CONFIG_cfg063579_TYPE=wifi-iface
+ option device radio1
+ local varname=device
+ shift
+ local value=radio1
+ export -n CONFIG_cfg063579_device=radio1
+ [ -n  ]
+ option_cb device radio1
+ return 0
+ option network lan
+ local varname=network
+ shift
+ local value=lan
+ export -n CONFIG_cfg063579_network=lan
+ [ -n  ]
+ option_cb network lan
+ return 0
+ option mode ap
+ local varname=mode
+ shift
+ local value=ap
+ export -n CONFIG_cfg063579_mode=ap
+ [ -n  ]
+ option_cb mode ap
+ return 0
+ option ssid OpenWrt
+ local varname=ssid
+ shift
+ local value=OpenWrt
+ export -n CONFIG_cfg063579_ssid=OpenWrt
+ [ -n  ]
+ option_cb ssid OpenWrt
+ return 0
+ option encryption none
+ local varname=encryption
+ shift
+ local value=none
+ export -n CONFIG_cfg063579_encryption=none
+ [ -n  ]
+ option_cb encryption none
+ return 0
+ unset DATA
+ config_cb
+ local type=
+ local section=
+ config_get TYPE cfg063579 TYPE
+ eval export -n -- TYPE=${CONFIG_cfg063579_TYPE:-${4}}
+ export -n -- TYPE=wifi-iface
+ config_get device cfg063579 device
+ eval export -n -- device=${CONFIG_cfg063579_device:-${4}}
+ export -n -- device=radio1
+ config_get vifs radio1 vifs
+ eval export -n -- vifs=${CONFIG_radio1_vifs:-${4}}
+ export -n -- vifs=
+ append vifs cfg063579
+ local var=vifs
+ local value=cfg063579
+ local sep=
+ eval export -n -- "vifs=${vifs:+${vifs}${value:+$sep}}$value"
+ export -n -- vifs=cfg063579
+ config_set radio1 vifs cfg063579
+ local section=radio1
+ local option=vifs
+ local value=cfg063579
+ local old_section=cfg063579
+ CONFIG_SECTION=radio1
+ option vifs cfg063579
+ local varname=vifs
+ shift
+ local value=cfg063579
+ export -n CONFIG_radio1_vifs=cfg063579
+ [ -n  ]
+ option_cb vifs cfg063579
+ return 0
+ CONFIG_SECTION=cfg063579
+ return 0
+ :
+ config_get type radio0 type
+ eval export -n -- type=${CONFIG_radio0_type:-${4}}
+ export -n -- type=prism2
+ [ -n prism2 ]
+ devidx=1
+ :
+ config_get type radio1 type
+ eval export -n -- type=${CONFIG_radio1_type:-${4}}
+ export -n -- type=prism2
+ [ -n prism2 ]
+ devidx=2
+ :
+ config_get type radio2 type
+ eval export -n -- type=${CONFIG_radio2_type:-${4}}
+ export -n -- type=
+ [ -n  ]
+ break
+ cd /proc/sys/dev
+ [ -d ath ]
+ ls -d wifi*
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: wifi detect (prism2 issues)

Δημοσίευσηαπό acoul » Τετ, 04 Ιούλ 2012, 09:12

κυνηγώντας το BUG:

Κώδικας: Επιλογή όλων

--- build_dir/linux-ar71xx_generic/linux-3.5-rc5/arch/mips/pci/pci-ar71xx.c   2012-06-25 17:20:29.000000000 +0300
+++ /extra/openwrt/git/ar71xx/build_dir/linux-ar71xx_nand/linux-3.3.8/arch/mips/pci/pci-ar71xx.c   2012-07-04 08:34:59.527958705 +0300
@@ -1,7 +1,7 @@
 /*
  *  Atheros AR71xx PCI host controller driver
  *
- *  Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
  *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  *
  *  Parts of this file are based on Atheros' 2.6.15 BSP
@@ -19,172 +19,185 @@
 #include <linux/pci_regs.h>
 #include <linux/interrupt.h>
 
-#include <asm/mach-ar71xx/ar71xx.h>
-#include <asm/mach-ar71xx/pci.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/pci.h>
+
+#define AR71XX_PCI_MEM_BASE   0x10000000
+#define AR71XX_PCI_MEM_SIZE   0x08000000
+
+#define AR71XX_PCI_WIN0_OFFS      0x10000000
+#define AR71XX_PCI_WIN1_OFFS      0x11000000
+#define AR71XX_PCI_WIN2_OFFS      0x12000000
+#define AR71XX_PCI_WIN3_OFFS      0x13000000
+#define AR71XX_PCI_WIN4_OFFS      0x14000000
+#define AR71XX_PCI_WIN5_OFFS      0x15000000
+#define AR71XX_PCI_WIN6_OFFS      0x16000000
+#define AR71XX_PCI_WIN7_OFFS      0x07000000
+
+#define AR71XX_PCI_CFG_BASE      \
+   (AR71XX_PCI_MEM_BASE + AR71XX_PCI_WIN7_OFFS + 0x10000)
+#define AR71XX_PCI_CFG_SIZE      0x100
+
+#define AR71XX_PCI_REG_CRP_AD_CBE   0x00
+#define AR71XX_PCI_REG_CRP_WRDATA   0x04
+#define AR71XX_PCI_REG_CRP_RDDATA   0x08
+#define AR71XX_PCI_REG_CFG_AD      0x0c
+#define AR71XX_PCI_REG_CFG_CBE      0x10
+#define AR71XX_PCI_REG_CFG_WRDATA   0x14
+#define AR71XX_PCI_REG_CFG_RDDATA   0x18
+#define AR71XX_PCI_REG_PCI_ERR      0x1c
+#define AR71XX_PCI_REG_PCI_ERR_ADDR   0x20
+#define AR71XX_PCI_REG_AHB_ERR      0x24
+#define AR71XX_PCI_REG_AHB_ERR_ADDR   0x28
+
+#define AR71XX_PCI_CRP_CMD_WRITE   0x00010000
+#define AR71XX_PCI_CRP_CMD_READ      0x00000000
+#define AR71XX_PCI_CFG_CMD_READ      0x0000000a
+#define AR71XX_PCI_CFG_CMD_WRITE   0x0000000b
+
+#define AR71XX_PCI_INT_CORE      BIT(4)
+#define AR71XX_PCI_INT_DEV2      BIT(2)
+#define AR71XX_PCI_INT_DEV1      BIT(1)
+#define AR71XX_PCI_INT_DEV0      BIT(0)
 
-#undef DEBUG
-#ifdef DEBUG
-#define DBG(fmt, args...)   printk(KERN_DEBUG fmt, ## args)
-#else
-#define DBG(fmt, args...)
-#endif
-
-#define AR71XX_PCI_DELAY   100 /* msecs */
-
-#if 0
-#define PCI_IDSEL_BASE   PCI_IDSEL_ADL_START
-#else
-#define PCI_IDSEL_BASE   0
-#endif
+#define AR71XX_PCI_IRQ_COUNT      5
 
-static void __iomem *ar71xx_pcicfg_base;
 static DEFINE_SPINLOCK(ar71xx_pci_lock);
-static int ar71xx_pci_fixup_enable;
-
-static inline void ar71xx_pci_delay(void)
-{
-   mdelay(AR71XX_PCI_DELAY);
-}
+static void __iomem *ar71xx_pcicfg_base;
 
 /* Byte lane enable bits */
-static u8 ble_table[4][4] = {
+static const u8 ar71xx_pci_ble_table[4][4] = {
    {0x0, 0xf, 0xf, 0xf},
    {0xe, 0xd, 0xb, 0x7},
    {0xc, 0xf, 0x3, 0xf},
    {0xf, 0xf, 0xf, 0xf},
 };
 
+static const u32 ar71xx_pci_read_mask[8] = {
+   0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0
+};
+
 static inline u32 ar71xx_pci_get_ble(int where, int size, int local)
 {
    u32 t;
 
-   t = ble_table[size & 3][where & 3];
+   t = ar71xx_pci_ble_table[size & 3][where & 3];
    BUG_ON(t == 0xf);
    t <<= (local) ? 20 : 4;
+
    return t;
 }
 
 static inline u32 ar71xx_pci_bus_addr(struct pci_bus *bus, unsigned int devfn,
-               int where)
+                  int where)
 {
    u32 ret;
 
    if (!bus->number) {
       /* type 0 */
-      ret = (1 << (PCI_IDSEL_BASE + PCI_SLOT(devfn)))
-          | (PCI_FUNC(devfn) << 8) | (where & ~3);
+      ret = (1 << PCI_SLOT(devfn)) | (PCI_FUNC(devfn) << 8) |
+            (where & ~3);
    } else {
       /* type 1 */
-      ret = (bus->number << 16) | (PCI_SLOT(devfn) << 11)
-          | (PCI_FUNC(devfn) << 8) | (where & ~3) | 1;
+      ret = (bus->number << 16) | (PCI_SLOT(devfn) << 11) |
+            (PCI_FUNC(devfn) << 8) | (where & ~3) | 1;
    }
 
    return ret;
 }
 
-int ar71xx_pci_be_handler(int is_fixup)
+static int ar71xx_pci_check_error(int quiet)
 {
    void __iomem *base = ar71xx_pcicfg_base;
    u32 pci_err;
    u32 ahb_err;
 
-   pci_err = __raw_readl(base + PCI_REG_PCI_ERR) & 3;
+   pci_err = __raw_readl(base + AR71XX_PCI_REG_PCI_ERR) & 3;
    if (pci_err) {
-      if (!is_fixup)
-         printk(KERN_ALERT "PCI error %d at PCI addr 0x%x\n",
-            pci_err,
-            __raw_readl(base + PCI_REG_PCI_ERR_ADDR));
+      if (!quiet) {
+         u32 addr;
+
+         addr = __raw_readl(base + AR71XX_PCI_REG_PCI_ERR_ADDR);
+         pr_crit("ar71xx: %s bus error %d at addr 0x%x\n",
+            "PCI", pci_err, addr);
+      }
 
-      __raw_writel(pci_err, base + PCI_REG_PCI_ERR);
+      /* clear PCI error status */
+      __raw_writel(pci_err, base + AR71XX_PCI_REG_PCI_ERR);
    }
 
-   ahb_err = __raw_readl(base + PCI_REG_AHB_ERR) & 1;
+   ahb_err = __raw_readl(base + AR71XX_PCI_REG_AHB_ERR) & 1;
    if (ahb_err) {
-      if (!is_fixup)
-         printk(KERN_ALERT "AHB error at AHB address 0x%x\n",
-            __raw_readl(base + PCI_REG_AHB_ERR_ADDR));
+      if (!quiet) {
+         u32 addr;
 
-      __raw_writel(ahb_err, base + PCI_REG_AHB_ERR);
+         addr = __raw_readl(base + AR71XX_PCI_REG_AHB_ERR_ADDR);
+         pr_crit("ar71xx: %s bus error %d at addr 0x%x\n",
+            "AHB", ahb_err, addr);
+      }
+
+      /* clear AHB error status */
+      __raw_writel(ahb_err, base + AR71XX_PCI_REG_AHB_ERR);
    }
 
-   return (ahb_err | pci_err) ? 1 : 0;
+   return !!(ahb_err | pci_err);
+}
+
+static inline void ar71xx_pci_local_write(int where, int size, u32 value)
+{
+   void __iomem *base = ar71xx_pcicfg_base;
+   u32 ad_cbe;
+
+   value = value << (8 * (where & 3));
+
+   ad_cbe = AR71XX_PCI_CRP_CMD_WRITE | (where & ~3);
+   ad_cbe |= ar71xx_pci_get_ble(where, size, 1);
+
+   __raw_writel(ad_cbe, base + AR71XX_PCI_REG_CRP_AD_CBE);
+   __raw_writel(value, base + AR71XX_PCI_REG_CRP_WRDATA);
 }
 
 static inline int ar71xx_pci_set_cfgaddr(struct pci_bus *bus,
-         unsigned int devfn, int where, int size, u32 cmd)
+                unsigned int devfn,
+                int where, int size, u32 cmd)
 {
    void __iomem *base = ar71xx_pcicfg_base;
    u32 addr;
 
    addr = ar71xx_pci_bus_addr(bus, devfn, where);
 
-   DBG("PCI: set cfgaddr: %02x:%02x.%01x/%02x:%01d, addr=%08x\n",
-      bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
-      where, size, addr);
-
-   __raw_writel(addr, base + PCI_REG_CFG_AD);
+   __raw_writel(addr, base + AR71XX_PCI_REG_CFG_AD);
    __raw_writel(cmd | ar71xx_pci_get_ble(where, size, 0),
-           base + PCI_REG_CFG_CBE);
+           base + AR71XX_PCI_REG_CFG_CBE);
 
-   return ar71xx_pci_be_handler(1);
+   return ar71xx_pci_check_error(1);
 }
 
 static int ar71xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
               int where, int size, u32 *value)
 {
    void __iomem *base = ar71xx_pcicfg_base;
-   static u32 mask[8] = {0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0};
    unsigned long flags;
    u32 data;
-   int retry = 0;
+   int err;
    int ret;
 
    ret = PCIBIOS_SUCCESSFUL;
+   data = ~0;
 
-   DBG("PCI: read config: %02x:%02x.%01x/%02x:%01d\n", bus->number,
-         PCI_SLOT(devfn), PCI_FUNC(devfn), where, size);
-
-retry:
    spin_lock_irqsave(&ar71xx_pci_lock, flags);
 
-   if (bus->number == 0 && devfn == 0) {
-      u32 t;
-
-      t = PCI_CRP_CMD_READ | (where & ~3);
-
-      __raw_writel(t, base + PCI_REG_CRP_AD_CBE);
-      data = __raw_readl(base + PCI_REG_CRP_RDDATA);
-
-      DBG("PCI: rd local cfg, ad_cbe:%08x, data:%08x\n", t, data);
-
-   } else {
-      int err;
-
-      err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size,
-                  PCI_CFG_CMD_READ);
-
-      if (err == 0) {
-         data = __raw_readl(base + PCI_REG_CFG_RDDATA);
-      } else {
-         ret = PCIBIOS_DEVICE_NOT_FOUND;
-         data = ~0;
-      }
-   }
+   err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size,
+                 AR71XX_PCI_CFG_CMD_READ);
+   if (err)
+      ret = PCIBIOS_DEVICE_NOT_FOUND;
+   else
+      data = __raw_readl(base + AR71XX_PCI_REG_CFG_RDDATA);
 
    spin_unlock_irqrestore(&ar71xx_pci_lock, flags);
 
-   DBG("PCI: read config: data=%08x raw=%08x\n",
-      (data >> (8 * (where & 3))) & mask[size & 7], data);
-
-   *value = (data >> (8 * (where & 3))) & mask[size & 7];
-
-   /*
-    * PCI controller bug: sometimes reads to the PCI_COMMAND register
-    * return 0xffff, even though the PCI trace shows the correct value.
-    * Work around this by retrying reads to this register
-    */
-   if (where == PCI_COMMAND && (*value & 0xffff) == 0xffff && retry++ < 2)
-      goto retry;
+   *value = (data >> (8 * (where & 3))) & ar71xx_pci_read_mask[size & 7];
 
    return ret;
 }
@@ -194,92 +207,26 @@ static int ar71xx_pci_write_config(struc
 {
    void __iomem *base = ar71xx_pcicfg_base;
    unsigned long flags;
+   int err;
    int ret;
 
-   DBG("PCI: write config: %02x:%02x.%01x/%02x:%01d value=%08x\n",
-      bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
-      where, size, value);
-
    value = value << (8 * (where & 3));
    ret = PCIBIOS_SUCCESSFUL;
 
    spin_lock_irqsave(&ar71xx_pci_lock, flags);
-   if (bus->number == 0 && devfn == 0) {
-      u32 t;
-
-      t = PCI_CRP_CMD_WRITE | (where & ~3);
-      t |= ar71xx_pci_get_ble(where, size, 1);
-
-      DBG("PCI: wr local cfg, ad_cbe:%08x, value:%08x\n", t, value);
-
-      __raw_writel(t, base + PCI_REG_CRP_AD_CBE);
-      __raw_writel(value, base + PCI_REG_CRP_WRDATA);
-   } else {
-      int err;
 
-      err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size,
-                  PCI_CFG_CMD_WRITE);
+   err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size,
+                 AR71XX_PCI_CFG_CMD_WRITE);
+   if (err)
+      ret = PCIBIOS_DEVICE_NOT_FOUND;
+   else
+      __raw_writel(value, base + AR71XX_PCI_REG_CFG_WRDATA);
 
-      if (err == 0)
-         __raw_writel(value, base + PCI_REG_CFG_WRDATA);
-      else
-         ret = PCIBIOS_DEVICE_NOT_FOUND;
-   }
    spin_unlock_irqrestore(&ar71xx_pci_lock, flags);
 
    return ret;
 }
 
-static void ar71xx_pci_fixup(struct pci_dev *dev)
-{
-   u32 t;
-
-   if (!ar71xx_pci_fixup_enable)
-      return;
-
-   if (dev->bus->number != 0 || dev->devfn != 0)
-      return;
-
-   DBG("PCI: fixup host controller %s (%04x:%04x)\n", pci_name(dev),
-      dev->vendor, dev->device);
-
-   /* setup COMMAND register */
-   t = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE
-     | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK;
-
-   pci_write_config_word(dev, PCI_COMMAND, t);
-}
-DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, ar71xx_pci_fixup);
-
-int __init ar71xx_pcibios_map_irq(const struct pci_dev *dev, uint8_t slot,
-              uint8_t pin)
-{
-   int irq = -1;
-   int i;
-
-   slot -= PCI_IDSEL_ADL_START - PCI_IDSEL_BASE;
-
-   for (i = 0; i < ar71xx_pci_nr_irqs; i++) {
-      struct ar71xx_pci_irq *entry;
-
-      entry = &ar71xx_pci_irq_map[i];
-      if (entry->slot == slot && entry->pin == pin) {
-         irq = entry->irq;
-         break;
-      }
-   }
-
-   if (irq < 0) {
-      printk(KERN_ALERT "PCI: no irq found for pin%u@%s\n",
-            pin, pci_name((struct pci_dev *)dev));
-   } else {
-      printk(KERN_INFO "PCI: mapping irq %d to pin%u@%s\n",
-            irq, pin, pci_name((struct pci_dev *)dev));
-   }
-
-   return irq;
-}
-
 static struct pci_ops ar71xx_pci_ops = {
    .read   = ar71xx_pci_read_config,
    .write   = ar71xx_pci_write_config,
@@ -307,23 +254,23 @@ static struct pci_controller ar71xx_pci_
 
 static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   void __iomem *base = ar71xx_reset_base;
+   void __iomem *base = ath79_reset_base;
    u32 pending;
 
    pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
         __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
 
-   if (pending & PCI_INT_DEV0)
-      generic_handle_irq(AR71XX_PCI_IRQ_DEV0);
+   if (pending & AR71XX_PCI_INT_DEV0)
+      generic_handle_irq(ATH79_PCI_IRQ(0));
 
-   else if (pending & PCI_INT_DEV1)
-      generic_handle_irq(AR71XX_PCI_IRQ_DEV1);
+   else if (pending & AR71XX_PCI_INT_DEV1)
+      generic_handle_irq(ATH79_PCI_IRQ(1));
 
-   else if (pending & PCI_INT_DEV2)
-      generic_handle_irq(AR71XX_PCI_IRQ_DEV2);
+   else if (pending & AR71XX_PCI_INT_DEV2)
+      generic_handle_irq(ATH79_PCI_IRQ(2));
 
-   else if (pending & PCI_INT_CORE)
-      generic_handle_irq(AR71XX_PCI_IRQ_CORE);
+   else if (pending & AR71XX_PCI_INT_CORE)
+      generic_handle_irq(ATH79_PCI_IRQ(4));
 
    else
       spurious_interrupt();
@@ -331,84 +278,97 @@ static void ar71xx_pci_irq_handler(unsig
 
 static void ar71xx_pci_irq_unmask(struct irq_data *d)
 {
-   unsigned int irq = d->irq - AR71XX_PCI_IRQ_BASE;
-   void __iomem *base = ar71xx_reset_base;
+   unsigned int irq = d->irq - ATH79_PCI_IRQ_BASE;
+   void __iomem *base = ath79_reset_base;
    u32 t;
 
    t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
    __raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
 
    /* flush write */
-   (void) __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+   __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
 }
 
 static void ar71xx_pci_irq_mask(struct irq_data *d)
 {
-   unsigned int irq = d->irq - AR71XX_PCI_IRQ_BASE;
-   void __iomem *base = ar71xx_reset_base;
+   unsigned int irq = d->irq - ATH79_PCI_IRQ_BASE;
+   void __iomem *base = ath79_reset_base;
    u32 t;
 
    t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
    __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
 
    /* flush write */
-   (void) __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+   __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
 }
 
 static struct irq_chip ar71xx_pci_irq_chip = {
-   .name      = "AR71XX PCI ",
+   .name      = "AR71XX PCI",
    .irq_mask   = ar71xx_pci_irq_mask,
    .irq_unmask   = ar71xx_pci_irq_unmask,
    .irq_mask_ack   = ar71xx_pci_irq_mask,
 };
 
-static void __init ar71xx_pci_irq_init(void)
+static __init void ar71xx_pci_irq_init(void)
 {
-   void __iomem *base = ar71xx_reset_base;
+   void __iomem *base = ath79_reset_base;
    int i;
 
    __raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
    __raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
 
-   for (i = AR71XX_PCI_IRQ_BASE;
-        i < AR71XX_PCI_IRQ_BASE + AR71XX_PCI_IRQ_COUNT; i++)
+   BUILD_BUG_ON(ATH79_PCI_IRQ_COUNT < AR71XX_PCI_IRQ_COUNT);
+
+   for (i = ATH79_PCI_IRQ_BASE;
+        i < ATH79_PCI_IRQ_BASE + AR71XX_PCI_IRQ_COUNT; i++)
       irq_set_chip_and_handler(i, &ar71xx_pci_irq_chip,
                 handle_level_irq);
 
-   irq_set_chained_handler(AR71XX_CPU_IRQ_IP2, ar71xx_pci_irq_handler);
+   irq_set_chained_handler(ATH79_CPU_IRQ_IP2, ar71xx_pci_irq_handler);
 }
 
-int __init ar71xx_pcibios_init(void)
+static __init void ar71xx_pci_reset(void)
 {
-   void __iomem *ddr_base = ar71xx_ddr_base;
+   void __iomem *ddr_base = ath79_ddr_base;
+
+   ath79_device_reset_set(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
+   mdelay(100);
 
-   ar71xx_device_stop(RESET_MODULE_PCI_BUS | RESET_MODULE_PCI_CORE);
-   ar71xx_pci_delay();
+   ath79_device_reset_clear(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
+   mdelay(100);
 
-   ar71xx_device_start(RESET_MODULE_PCI_BUS | RESET_MODULE_PCI_CORE);
-   ar71xx_pci_delay();
+   __raw_writel(AR71XX_PCI_WIN0_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN0);
+   __raw_writel(AR71XX_PCI_WIN1_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN1);
+   __raw_writel(AR71XX_PCI_WIN2_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN2);
+   __raw_writel(AR71XX_PCI_WIN3_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN3);
+   __raw_writel(AR71XX_PCI_WIN4_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN4);
+   __raw_writel(AR71XX_PCI_WIN5_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN5);
+   __raw_writel(AR71XX_PCI_WIN6_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN6);
+   __raw_writel(AR71XX_PCI_WIN7_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN7);
 
-   ar71xx_pcicfg_base = ioremap_nocache(AR71XX_PCI_CFG_BASE,
-                  AR71XX_PCI_CFG_SIZE);
+   mdelay(100);
+}
+
+__init int ar71xx_pcibios_init(void)
+{
+   u32 t;
+
+   ar71xx_pcicfg_base = ioremap(AR71XX_PCI_CFG_BASE, AR71XX_PCI_CFG_SIZE);
    if (ar71xx_pcicfg_base == NULL)
       return -ENOMEM;
 
-   __raw_writel(PCI_WIN0_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN0);
-   __raw_writel(PCI_WIN1_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN1);
-   __raw_writel(PCI_WIN2_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN2);
-   __raw_writel(PCI_WIN3_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN3);
-   __raw_writel(PCI_WIN4_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN4);
-   __raw_writel(PCI_WIN5_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN5);
-   __raw_writel(PCI_WIN6_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN6);
-   __raw_writel(PCI_WIN7_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN7);
+   ar71xx_pci_reset();
 
-   ar71xx_pci_delay();
+   /* setup COMMAND register */
+   t = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE
+     | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK;
+   ar71xx_pci_local_write(PCI_COMMAND, 4, t);
 
    /* clear bus errors */
-   (void)ar71xx_pci_be_handler(1);
+   ar71xx_pci_check_error(1);
 
-   ar71xx_pci_fixup_enable = 1;
    ar71xx_pci_irq_init();
+
    register_pci_controller(&ar71xx_pci_controller);
 
    return 0;

έχει αφαιρεθεί το pci_fixup
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: wifi detect (prism2 issues)

Δημοσίευσηαπό acoul » Τετ, 04 Ιούλ 2012, 23:18

Κώδικας: Επιλογή όλων

(08:51:14 PM) nbd: the old code maps the pci host controller registers into the pci config register space
(08:51:25 PM) nbd: and uses a pci device fixup to alter its settings
(08:51:32 PM) nbd: whereas the new code simply writes that register directly

Κώδικας: Επιλογή όλων

(10:31:23 PM) nbd: my suggestion is related to a different fixup and the pci config register access functions

Κώδικας: Επιλογή όλων

(02:27:48 AM) nbd: adjust the config ops to map local access to bus0, devfn0

τι θέλει να πει ο ποιητής;
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: wifi detect (prism2 issues)

Δημοσίευσηαπό acoul » Παρ, 06 Ιούλ 2012, 13:58

εδώ είναι το ζουμί:

Κώδικας: Επιλογή όλων

 658 -static __devinit void ar71xx_pci_reset(void)
 659 +int __init ar71xx_pcibios_init(void)
 660  {
 661 -       void __iomem *ddr_base = ath79_ddr_base;
 662 -
 663 -       ath79_device_reset_set(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
 664 -       mdelay(100);
 665 +       void __iomem *ddr_base = ar71xx_ddr_base;
 666 
 667 -       ath79_device_reset_clear(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
 668 -       mdelay(100);
 669 +       ar71xx_device_stop(RESET_MODULE_PCI_BUS | RESET_MODULE_PCI_CORE);
 670 +       ar71xx_pci_delay();
 671 
 672 -       __raw_writel(AR71XX_PCI_WIN0_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN0);
 673 -       __raw_writel(AR71XX_PCI_WIN1_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN1);
 674 -       __raw_writel(AR71XX_PCI_WIN2_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN2);
 675 -       __raw_writel(AR71XX_PCI_WIN3_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN3);
 676 -       __raw_writel(AR71XX_PCI_WIN4_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN4);
 677 -       __raw_writel(AR71XX_PCI_WIN5_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN5);
 678 -       __raw_writel(AR71XX_PCI_WIN6_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN6);
 679 -       __raw_writel(AR71XX_PCI_WIN7_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN7);
 680 +       ar71xx_device_start(RESET_MODULE_PCI_BUS | RESET_MODULE_PCI_CORE);
 681 +       ar71xx_pci_delay();
 682 
 683 -       mdelay(100);
 684 -}
 685 -
 686 -static int __devinit ar71xx_pci_probe(struct platform_device *pdev)
 687 -{
 688 -       struct ar71xx_pci_controller *apc;
 689 -       struct resource *res;
 690 -       u32 t;
 691 -
 692 -       apc = kzalloc(sizeof(struct ar71xx_pci_controller), GFP_KERNEL);
 693 -       if (!apc)
 694 +       ar71xx_pcicfg_base = ioremap_nocache(AR71XX_PCI_CFG_BASE,
 695 +                                               AR71XX_PCI_CFG_SIZE);
 696 +       if (ar71xx_pcicfg_base == NULL)
 697                 return -ENOMEM;
 698 
 699 -       spin_lock_init(&apc->lock);
 700 -
 701 -       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base");
 702 -       if (!res)
 703 -               return -EINVAL;
 704 +       __raw_writel(PCI_WIN0_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN0);
 705 +       __raw_writel(PCI_WIN1_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN1);
 706 +       __raw_writel(PCI_WIN2_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN2);
 707 +       __raw_writel(PCI_WIN3_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN3);
 708 +       __raw_writel(PCI_WIN4_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN4);
 709 +       __raw_writel(PCI_WIN5_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN5);
 710 +       __raw_writel(PCI_WIN6_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN6);
 711 +       __raw_writel(PCI_WIN7_OFFS, ddr_base + AR71XX_DDR_REG_PCI_WIN7);
 712 
 713 -       apc->cfg_base = devm_request_and_ioremap(&pdev->dev, res);
 714 -       if (!apc->cfg_base)
 715 -               return -ENOMEM;
 716 -
 717 -       apc->irq = platform_get_irq(pdev, 0);
 718 -       if (apc->irq < 0)
 719 -               return -EINVAL;
 720 -
 721 -       apc->io_res.name = "PCI IO space";
 722 -       apc->io_res.start = 0;
 723 -       apc->io_res.end = 0;
 724 -       apc->io_res.flags = IORESOURCE_IO;
 725 -
 726 -       apc->mem_res.name = "PCI memory space";
 727 -       apc->mem_res.start = AR71XX_PCI_MEM_BASE;
 728 -       apc->mem_res.end = AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE - 1;
 729 -       apc->mem_res.flags = IORESOURCE_MEM;
 730 -
 731 -       ar71xx_pci_reset();
 732 -
 733 -       /* setup COMMAND register */
 734 -       t = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE
 735 -         | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | PCI_COMMAND_FAST_BACK;
 736 -       ar71xx_pci_local_write(apc, PCI_COMMAND, 4, t);
 737 +       ar71xx_pci_delay();
 738 
 739         /* clear bus errors */
 740 -       ar71xx_pci_check_error(apc, 1);
 741 -
 742 -       ar71xx_pci_irq_init(apc);
 743 +       (void)ar71xx_pci_be_handler(1);
 744 
 745 -       apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
 746 -       apc->pci_ctrl.mem_resource = &apc->mem_res;
 747 -       apc->pci_ctrl.io_resource = &apc->io_res;
 748 -
 749 -       register_pci_controller(&apc->pci_ctrl);
 750 +       ar71xx_pci_fixup_enable = 1;
 751 +       ar71xx_pci_irq_init();
 752 +       register_pci_controller(&ar71xx_pci_controller);
 753 
 754         return 0;
 755  }

Πηγή
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: AR71xx/pci hostap-driver kernel mainline BUG

Δημοσίευσηαπό acoul » Παρ, 06 Ιούλ 2012, 18:57

έφτιαξα ένα backport patch ακολουθώντας τις συμβουλές του nbd. Τα αποτελέσματα είναι τα ίδια, οι atheros κάρτες δουλεύουν κανονικά αλλά όχι οι prism2.x ...
Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα

Άβαταρ μέλους
acoul
Δημοσιεύσεις: 1054
Εγγραφή: Πέμ, 04 Ιουν 2009, 18:26
Τοποθεσία: Athens, Greece
Επικοινωνία:

Re: AR71xx/pci hostap-driver kernel mainline BUG

Δημοσίευσηαπό acoul » Παρ, 06 Ιούλ 2012, 20:16

Unified Configuration Interface
Πριν ρωτήσεις: PEBKAC !!
lede-ozonet
AWMN Dancing BGP
hackers are poets
Voice: 6980-090-497
Εικόνα


Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 1 επισκέπτης