# Atheros wireless atphy0 problem



## vtty0 (May 29, 2010)

Hello.
I own Asus EE PC 1201N and have a problem with wifi:


```
ice# ifconfig wlan0 create wlandev atphy0
ifconfig: SIOCIFCREATE2: Device not configured
```


```
ice# pciconf -lv
alc0@pci0:9:0:0:        class=0x020000 card=0x14e51043 chip=0x10621969 rev=0xc0 hdr=0x00
    vendor     = 'Attansic (Now owned by Atheros)'
    class      = network
    subclass   = ethernet
```


```
[vtty0@ice ~]$ dmesg | grep atp
atphy0: <Atheros F1 10/100/1000 PHY> PHY 0 on miibus0
atphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
```


```
ice# kldstat -v | grep wlan
                225 wlan_wep
                224 wlan_tkip
                223 wlan_ccmp
                222 wlan_amrr
                227 wlan_sta
                226 wlan
```


```
ice# kldstat -v | grep ath
                156 uhub/uath
                71 pci/ath
```


```
ice# kldstat -v | grep atp
                88 miibus/atphy
                274 isa/atpic
                273 acpi/atpic
```


```
ice# kldstat -v | grep if
                217 if_faith
                221 if_tun
                219 if_gif
                218 if_firewire
 5    1 0xc6278000 5000     if_vlan.ko (/boot/kernel/if_vlan.ko)
                296 if_vlan
```

OS: FreeBSD 8.0-RELEASE #1: Fri May 28 15:20:16 EEST 2010
Kernel: my own i386 kernel

I've spent pretty much time for googling with no luck and any help will be appreciated.

Thanks.


----------



## vtty0 (May 29, 2010)

Here is also sysctl output:


```
[vtty0@ice ~]$ sysctl -a -o | grep hw.ath
hw.ath.bstuck: 4
hw.ath.txbuf: 200
hw.ath.rxbuf: 40
hw.ath.resetcal: 1200
hw.ath.shortcal: 100
hw.ath.longcal: 30
hw.ath.hal.swba_backoff: 0
hw.ath.hal.sw_brt: 10
hw.ath.hal.dma_brt: 2
```

Thanks.


----------



## vtty0 (May 29, 2010)

... and here is part of kernel config:


```
# Wireless NIC cards
device          wlan            # 802.11 support
options         IEEE80211_DEBUG # enable debug msgs
options         IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
device          wlan_wep        # 802.11 WEP support
device          wlan_ccmp       # 802.11 CCMP support
device          wlan_tkip       # 802.11 TKIP support
device          wlan_amrr       # AMRR transmit rate control algorithm
device          an              # Aironet 4500/4800 802.11 wireless NICs.
device          ath             # Atheros pci/cardbus NIC's
device          ath_hal         # pci/cardbus chip support
options         AH_SUPPORT_AR5416       # enable AR5416 tx/rx descriptors
device          ath_rate_sample # SampleRate tx rate control for ath
device          ral             # Ralink Technology RT2500 wireless NICs.
device          wi              # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device         wl              # Older non 802.11 Wavelan wireless NIC.
```

Thanks.


----------



## wblock@ (May 29, 2010)

vtty0 said:
			
		

> Hello.
> I own Asus EE PC 1201N and have a problem with wifi:
> 
> ice# ifconfig wlan0 create wlandev atphy0
> ...



Whoa, hold on!  atphy0 is a PHY connected to alc0, the wired Ethernet interface.  Atheros makes wired Ethernet, too.

Edit: Now that I look it up, the eee PC 1201n is supposed to have a Realtek wireless.  So first, find out what you really have:

`# pciconf -lv | grep -B3 -A1 network`


----------



## DutchDaemon (May 30, 2010)

@vtty0, format your posts correctly, that was rather unreadable.


----------



## vtty0 (May 30, 2010)

Hello.
Oh, sure... )
That's output of command:
`# pciconf -lv | grep -B3 -A1 network`


```
[vtty0@ice ~]$ pciconf -lv | grep -B3 -A1 network
    subclass   = VGA
none5@pci0:7:0:0:       class=0x028000 card=0x11071a3b chip=0x817110ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    class      = network
alc0@pci0:9:0:0:        class=0x020000 card=0x14e51043 chip=0x10621969 rev=0xc0 hdr=0x00
    vendor     = 'Attansic (Now owned by Atheros)'
    class      = network
    subclass   = ethernet
[vtty0@ice ~]$
```


----------



## wblock@ (May 30, 2010)

vtty0 said:
			
		

> Hello.
> 
> 
> ```
> ...



The first is the wireless, the second is wired.  I'm not aware of a FreeBSD native driver for the Realtek, so look at ndisgen(8).


----------



## vtty0 (May 31, 2010)

Hello.
Thanks, wblock, I'll try it.

alc0 works fine:

```
ice# ifconfig
alc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC>
        ether 48:5b:39:12:4d:b1
        inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> metric 0 mtu 1460
        syncpeer: 224.0.0.240 maxupd: 128
ice#
```


```
ice# netstat -ar
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.1        UGS         4     3173   alc0
localhost          link#2             UH          0        0    lo0
192.168.1.0        link#1             U           1       24   alc0
192.168.1.11       link#1             UHS         0        0    lo0
```

So I'm looking for wereless driver now. Hope it will be included in future FreeBSD releases...


----------



## vtty0 (May 31, 2010)

GOTCHA!!!


```
[vtty0@ice ~/work/download/WinXP]$ ls -la
total 3372
drwxr-xr-x  2 vtty0  vtty0      512 31 Ð¼Ð°Ð¹ 07:59 .
drwx------  6 vtty0  vtty0      512 31 Ð¼Ð°Ð¹ 07:58 ..
-rw-r--r--  1 vtty0  vtty0    24403 31 Ð¼Ð°Ð¹ 07:58 net8192se.cat
-rw-r--r--  1 vtty0  vtty0   332832 31 Ð¼Ð°Ð¹ 07:58 net8192se.inf
-rw-r--r--  1 vtty0  vtty0   869920 31 Ð¼Ð°Ð¹ 07:58 rtl8192se.sys
-rwxr-xr-x  1 vtty0  vtty0  2142686 31 Ð¼Ð°Ð¹ 07:59 rtl8192se_sys.ko
[vtty0@ice ~/work/download/WinXP]$
```


```
ice# kldload /home/vtty0/work/download/WinXP/rtl8192se_sys.ko
ice# ifconfig wlan0 create wlandev ndis0
ice# ifconfig
alc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC>
        ether 48:5b:39:12:4d:b1
        inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> metric 0 mtu 1460
        syncpeer: 224.0.0.240 maxupd: 128
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 1c:4b:d6:6f:2a:ee
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 1c:4b:d6:6f:2a:ee
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 Mhz 11b)
        country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
        bintval 0
ice# ifconfig wlan0 scan
ice#
```

I'm going to go to check how it will works.

*2 wblock : thanks very much for your help, Sir!*


----------



## robkoolaid (Jun 30, 2010)

*Did this fix your problem?*

Hello, Vtty0. I'm thinking of buying the 1201N for freebsd but I want to make sure that all of the hardware works with the OS. If your wireless works now, how well does it work? Does it work in Wireless N mode? Also, do your other devices work? I'm quite new to freebsd. Thank you.


----------



## vtty0 (Jul 2, 2010)

Hello, robkoolaid , see PM. 
In two words: LAN, Sound, Video works fine, bluetooth not tested, wireless works (driver compiled from winXP via ndisgen).
IMPORTANT: when I use wireless hotspot hangs up periodically. The problem is not investigated by me but seems it is resolvable.


----------



## robkoolaid (Jul 2, 2010)

vtty0> One more question: did you use the i386 or the amd64 install?


----------



## vtty0 (Jul 3, 2010)

*robkoolaid* , I use i386 system. There is a problem with wine, flash in amd64 and I'm too lazy to find ways to use all this staff in amd64.


----------

