# [SOLVED] wireless rt3070 WPA (on ARM/Via VT8500)

## WendyB

I'm, quite adventurous, trying to make Gentoo run on a ARM-based cheap netbook. To my surprise things work out quite well, making it even more frustrating that I'm trying for over a week now to make the encrypted wireless work, a problem seemingly unrelated to the architecture. Despite the challenging hardware  I now have a full fledged Gentoo install with XFCE, Pidgin, browser and all software but no network, which makes a netbook a bit useless.

What works:

Connecting without encryption

Problem:

WPA/WPA2 doesn't work: It seems to associate, but the modem/router says it's offline/unregistered or says it failed to authorize

One little problem with the netbook is that it seems to forget about the time once disconnected from mains. I'm not sure whether time is used for the encryption? Should modem and laptop be time-synchronized?

The modem/router is an:

FRITZ!Box Fon WLAN 7170 Annex A

Firmware version 58.04.82 

I'm using the special kernel from here:

http://gitorious.org/linux-on-via-vt8500

uname -a gives:

```
Linux easypc 2.6.37-rc3-easypc #6 PREEMPT Sat Dec 11 08:27:06 CET 2010 armv5tejl ARM926EJ-S rev 5 (v5l) Benign BV07 Mini Netbook GNU/Linux
```

I have downloaded the driver from the Ralink site and using this file:

2010_0831_RT3070_Linux_STA_v2.4.0.1_DPO.bz2

The rt2870sta driver fromt he kernel is disabled

blacklist.conf

```
blacklist rt2800usb

blacklist rt2x00usb

blacklist rt2x00lib
```

The wireless is activated using GPIO pins and acts like an USB-stick. After activating it shows up in lsusb:

```
Bus 001 Device 006: ID 148f:3070 Ralink Technology, Corp. 

...

Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```

I'm using this command to try to connect:

```
ifconfig ra0 up

iwconfig ra0 mode managed

iwpriv ra0 set SSID="blabla"

iwpriv ra0 set AuthMode=WPAPSK

iwpriv ra0 set EncrypType=TKIP

iwpriv ra0 set WPAPSK=<HEX passphrase>
```

Modem router reacts with an endless list of:

16.12.10 02:58:44 WLAN station deregistered. Name: easypc, MAC address: XX:XX:XX:XX:XX:XX. 

(where XX.. is the MAC address)

There's no preceding line where it registers

Using cnetworkmanager I coma to the point where the modem/router says:

15.12.10 20:29:01 WLAN registration failed: Authorization failed. Name: easypc, MAC address: XX:XX:XX:XX:XX:XX.

The driver spits out an huge amount of data:

Here some parts I tried to isolate from the syslog

This is the loading of the driver:

```
Dec 14 23:04:33 easypc klogd: usb 1-1.2: new high speed USB device using vt8500-ehci and address 4

Dec 14 23:04:35 easypc klogd: rtusb init --->

Dec 14 23:04:35 easypc klogd: ===>rt2870_probe()!

Dec 14 23:04:35 easypc klogd: --> RTMPAllocAdapterBlock

Dec 14 23:04:35 easypc klogd: 

Dec 14 23:04:35 easypc klogd: 

Dec 14 23:04:35 easypc klogd: === pAd = c546f000, size = 504592 ===

Dec 14 23:04:35 easypc klogd: 

Dec 14 23:04:35 easypc klogd: <-- RTMPAllocAdapterBlock, Status=0

Dec 14 23:04:35 easypc klogd: NumEndpoints=7

Dec 14 23:04:35 easypc klogd: BULK IN MaxPacketSize = 512

Dec 14 23:04:35 easypc klogd: EP address = 0x81

Dec 14 23:04:35 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:35 easypc klogd: EP address = 0x 1  

Dec 14 23:04:35 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:35 easypc klogd: EP address = 0x 2  

Dec 14 23:04:36 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:36 easypc klogd: EP address = 0x 3  

Dec 14 23:04:36 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:36 easypc klogd: EP address = 0x 4  

Dec 14 23:04:36 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:36 easypc klogd: EP address = 0x 5  

Dec 14 23:04:36 easypc klogd: BULK OUT MaxPacketSize = 512

Dec 14 23:04:36 easypc klogd: EP address = 0x 6  

Dec 14 23:04:36 easypc klogd: STA Driver version-2.4.0.1

Dec 14 23:04:36 easypc klogd: NVM is EFUSE

Dec 14 23:04:36 easypc klogd: Allocate a net device with private data size=0!

Dec 14 23:04:36 easypc klogd: Allocate net device ops success!

Dec 14 23:04:36 easypc klogd: The name of the new ra interface is ra0...

Dec 14 23:04:36 easypc klogd: ------------[ cut here ]------------

Dec 14 23:04:36 easypc klogd: WARNING: at include/linux/netdevice.h:1557 RtmpPhyNetDevInit+0xdc/0x118 [rt3370sta]()

Dec 14 23:04:36 easypc klogd: Modules linked in: rt3370sta(+) 8250 apm_emulation mousedev rtc_vt8500 psmouse rtc_core evdev serio_raw

Dec 14 23:04:36 easypc klogd: [<c002e804>] (unwind_backtrace+0x0/0xf4) from [<c003c094>] (warn_slowpath_common+0x4c/0x64)

Dec 14 23:04:36 easypc klogd: [<c003c094>] (warn_slowpath_common+0x4c/0x64) from [<c003c0c8>] (warn_slowpath_null+0x1c/0x24)

Dec 14 23:04:36 easypc klogd: [<c003c0c8>] (warn_slowpath_null+0x1c/0x24) from [<bf0a17f4>] (RtmpPhyNetDevInit+0xdc/0x118 [rt3370sta])

Dec 14 23:04:36 easypc klogd: [<bf0a17f4>] (RtmpPhyNetDevInit+0xdc/0x118 [rt3370sta]) from [<bf0b0ed4>] (rtusb_probe+0x19c/0x3f8 [rt3370sta])

Dec 14 23:04:36 easypc klogd: [<bf0b0ed4>] (rtusb_probe+0x19c/0x3f8 [rt3370sta]) from [<c0204a60>] (usb_probe_interface+0xe0/0x17c)

Dec 14 23:04:36 easypc klogd: [<c0204a60>] (usb_probe_interface+0xe0/0x17c) from [<c01da2b0>] (driver_probe_device+0xa4/0x1b4)

Dec 14 23:04:36 easypc klogd: [<c01da2b0>] (driver_probe_device+0xa4/0x1b4) from [<c01da44c>] (__driver_attach+0x8c/0x90)

Dec 14 23:04:36 easypc klogd: [<c01da44c>] (__driver_attach+0x8c/0x90) from [<c01d9aa8>] (bus_for_each_dev+0x64/0x8c)

Dec 14 23:04:36 easypc klogd: [<c01d9aa8>] (bus_for_each_dev+0x64/0x8c) from [<c01d9428>] (bus_add_driver+0x184/0x260)

Dec 14 23:04:36 easypc klogd: [<c01d9428>] (bus_add_driver+0x184/0x260) from [<c01da704>] (driver_register+0x78/0x13c)

Dec 14 23:04:36 easypc klogd: [<c01da704>] (driver_register+0x78/0x13c) from [<c0204770>] (usb_register_driver+0x6c/0x148)

Dec 14 23:04:36 easypc klogd: [<c0204770>] (usb_register_driver+0x6c/0x148) from [<c00223c0>] (do_one_initcall+0x30/0x1ac)

Dec 14 23:04:36 easypc klogd: [<c00223c0>] (do_one_initcall+0x30/0x1ac) from [<c006c4cc>] (sys_init_module+0x120/0x14b0)

Dec 14 23:04:36 easypc klogd: [<c006c4cc>] (sys_init_module+0x120/0x14b0) from [<c0028dc0>] (ret_fast_syscall+0x0/0x2c)

Dec 14 23:04:36 easypc klogd: ---[ end trace 308fde8fb48ed759 ]---

Dec 14 23:04:36 easypc klogd: netif_stop_queue() cannot be called before register_netdev()RtmpOSNetDevAttach()--->

Dec 14 23:04:36 easypc klogd: <---RtmpOSNetDevAttach(), ret=0

Dec 14 23:04:36 easypc klogd: <===rt2870_probe()!

Dec 14 23:04:36 easypc klogd: usbcore: registered new interface driver rt2870

Dec 14 23:05:48 easypc klogd: Allocate 8192 memory for BA reordering

Dec 14 23:05:48 easypc klogd: MAC_CSR0  [ Ver:Rev=0x30700201]

Dec 14 23:05:49 easypc klogd: <=== RtmpAsicLoadFirmware (status=0)

Dec 14 23:05:49 easypc klogd: --> RTMPAllocTxRxRingMemory

Dec 14 23:05:49 easypc klogd: --> NICInitTransmit

Dec 14 23:05:49 easypc klogd: MGMT Ring: total 32 entry allocated

Dec 14 23:05:49 easypc klogd: <-- NICInitTransmit(Status=0)

Dec 14 23:05:49 easypc klogd: --> NICInitRecv

Dec 14 23:05:49 easypc klogd: <-- NICInitRecv(Status=0)

Dec 14 23:05:49 easypc klogd: <-- RTMPAllocTxRxRingMemory, Status=0

Dec 14 23:05:49 easypc klogd: --> MLME Initialize

Dec 14 23:05:49 easypc klogd: <-- MLME Initialize

Dec 14 23:05:49 easypc klogd: --> UserCfgInit

Dec 14 23:05:49 easypc klogd: --> UserCfgInit. BACapability = 0x3024040

Dec 14 23:05:49 easypc klogd: <-- UserCfgInit

Dec 14 23:05:49 easypc klogd: --> NICInitializeAdapter

Dec 14 23:05:49 easypc klogd: <== DMA offset 0x208 = 0x0

Dec 14 23:05:49 easypc klogd: --> NICInitializeAsic

Dec 14 23:05:49 easypc klogd: MAC_CSR0  [ Ver:Rev=0x30700201]

Dec 14 23:05:49 easypc klogd: -->RTUSBVenderReset

Dec 14 23:05:49 easypc klogd: <--RTUSBVenderReset

Dec 14 23:05:49 easypc klogd: BBP version = 60

Dec 14 23:05:50 easypc klogd: --->Disable TSF synchronization

Dec 14 23:05:50 easypc klogd: <-- NICInitializeAsic

Dec 14 23:05:50 easypc klogd: <-- NICInitializeAdapter

Dec 14 23:05:50 easypc klogd: CountryRegion=5

Dec 14 23:05:50 easypc klogd: CountryRegionABand=7

Dec 14 23:05:50 easypc klogd: CountryCode=NL ^E^G

Dec 14 23:05:50 easypc klogd: RTMPSetProfileParameters::(SSID=11n-AP)

Dec 14 23:05:50 easypc klogd: RTMPSetProfileParameters::(NetworkType=1)

Dec 14 23:05:50 easypc klogd: Channel=0

Dec 14 23:05:50 easypc klogd: PhyMode=5

Dec 14 23:05:50 easypc klogd: BeaconPeriod=100

Dec 14 23:05:50 easypc klogd: TxPower=100

Dec 14 23:05:50 easypc klogd: BGProtection=0

Dec 14 23:05:50 easypc klogd: TxPreamble=0

Dec 14 23:05:50 easypc klogd: RTSThreshold=2347

Dec 14 23:05:50 easypc klogd: FragThreshold=2346

Dec 14 23:05:50 easypc klogd: TxBurst=1

Dec 14 23:05:50 easypc klogd: PktAggregate=0

Dec 14 23:05:50 easypc klogd: WmmCapable=1

Dec 14 23:05:50 easypc klogd: AckPolicy[0]=0

Dec 14 23:05:50 easypc klogd: AckPolicy[1]=0

Dec 14 23:05:50 easypc klogd: AckPolicy[2]=0

Dec 14 23:05:50 easypc klogd: AckPolicy[3]=0

Dec 14 23:05:50 easypc klogd: APSDCapable=0

Dec 14 23:05:50 easypc klogd: APSDAC0  0

Dec 14 23:05:50 easypc klogd: APSDAC1  0

Dec 14 23:05:50 easypc klogd: APSDAC2  0

Dec 14 23:05:50 easypc klogd: APSDAC3  0

Dec 14 23:05:50 easypc klogd: IEEE80211H=0

Dec 14 23:05:50 easypc klogd: WirelessEvent=0

Dec 14 23:05:50 easypc klogd: RTMPSetProfileParameters::(AuthMode=4)

Dec 14 23:05:50 easypc klogd: RTMPSetProfileParameters::(EncrypType=4)

Dec 14 23:05:50 easypc klogd: WPAPSK Key length(0) error, required 8 ~ 64 characters!(keyStr=)

Dec 14 23:05:50 easypc klogd: DefaultKeyID(0~3)=0

Dec 14 23:05:50 easypc klogd: Key1Str is Invalid key length(0) or Type(0)

Dec 14 23:05:50 easypc klogd: Key2Str is Invalid key length(0) or Type(0)

Dec 14 23:05:50 easypc klogd: Key3Str is Invalid key length(0) or Type(0)

Dec 14 23:05:50 easypc klogd: Key4Str is Invalid key length(0) or Type(0)

Dec 14 23:05:50 easypc klogd: HT: MIMOPS Mode  = 3

Dec 14 23:05:50 easypc klogd: HT: BA Decline  = Disable

Dec 14 23:05:50 easypc klogd: HT: Auto BA  = Enable

Dec 14 23:05:50 easypc klogd: HT: RDG = Enable(+HTC)

Dec 14 23:05:50 easypc klogd: HT: Tx A-MSDU = Disable

Dec 14 23:05:50 easypc klogd: HT: MPDU Density = 4

Dec 14 23:05:50 easypc klogd: HT: BA Windw Size = 64

Dec 14 23:05:50 easypc klogd: HT: Guard Interval = 400

Dec 14 23:05:50 easypc klogd: HT: Operate Mode = Mixed Mode

Dec 14 23:05:50 easypc klogd: HT: Channel Width = 40 MHz

Dec 14 23:05:50 easypc klogd: HT: Ext Channel = BELOW

Dec 14 23:05:50 easypc klogd: HT: MCS = AUTO

Dec 14 23:05:50 easypc klogd: HT: STBC = 0

Dec 14 23:05:50 easypc klogd: HT: Disallow TKIP mode = ON

Dec 14 23:05:50 easypc klogd: MlmeSetPsmBit = 0

Dec 14 23:05:50 easypc klogd: PSMode=0

Dec 14 23:05:50 easypc klogd: AutoRoaming=0

Dec 14 23:05:50 easypc klogd: RoamThreshold=-70  dBm

Dec 14 23:05:50 easypc klogd: TGnWifiTest=0

Dec 14 23:05:50 easypc klogd: BeaconLostTime=400 

Dec 14 23:05:50 easypc klogd: 1. Phy Mode = 5

Dec 14 23:05:50 easypc klogd: 2. Phy Mode = 5

Dec 14 23:05:50 easypc klogd: --> NICReadEEPROMParameters

Dec 14 23:05:50 easypc klogd: NVM is Efuse and its size =2d[2d0-2fc] 

Dec 14 23:05:50 easypc klogd: eFuseGetFreeBlockCount is 0xc

Dec 14 23:05:50 easypc klogd: NVM is Efuse and force to use EEPROM Buffer Mode=0

Dec 14 23:05:50 easypc klogd: --> E2PROM_CSR = 0x20408

Dec 14 23:05:50 easypc klogd: --> EEPROMAddressNum = 6

Dec 14 23:05:50 easypc klogd: Initialize MAC Address from E2PROM 

Dec 14 23:05:50 easypc klogd: E2PROM MAC: =00:a1:b0:40:7b:71

Dec 14 23:05:50 easypc klogd: Use the MAC address what is assigned from EEPROM. 

Dec 14 23:05:50 easypc klogd: Current MAC: =00:a1:b0:40:7b:71

Dec 14 23:05:50 easypc klogd: E2PROM: Version = 1, FAE release #1

Dec 14 23:05:50 easypc klogd: NICReadEEPROMParameters: RxPath = 1, TxPath = 1

Dec 14 23:05:50 easypc klogd: phy mode> Error! The chip does not support 5G band 5!

Dec 14 23:05:50 easypc klogd: RTMPSetPhyMode : PhyMode=9, channel=0 

Dec 14 23:05:50 easypc klogd: country code=5/7, RFIC=5, PHY mode=9, support 14 channels

Dec 14 23:05:50 easypc klogd: BuildChannel # 1 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 2 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 3 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 4 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 5 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 6 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 7 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 8 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 9 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 10 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 11 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 12 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 13 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 14 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  RTMPSetPhyMode: channel is out of range, use first channel=1 

Dec 14 23:05:50 easypc klogd: RTMPSetHT : HT_mode(0), ExtOffset(3), MCS(33), BW(1), STBC(0), SHORTGI(1)

Dec 14 23:05:50 easypc klogd: RTMPSetHT : RxBAWinLimit = 64

Dec 14 23:05:50 easypc klogd: RTMPSetHT : AMsduSize = 0, MimoPs = 3, MpduDensity = 4, MaxRAmpduFactor = 3

Dec 14 23:05:50 easypc klogd: EDCA [#0]: AIFSN CWmin CWmax  TXOP(us)  ACM

Dec 14 23:05:50 easypc klogd:      AC_BE       3      4      6         0     0

Dec 14 23:05:50 easypc klogd:      AC_BK       7      4     10         0     0

Dec 14 23:05:50 easypc klogd:      AC_VI       1      3      4      3008     0

Dec 14 23:05:50 easypc klogd:      AC_VO       1      2      3      1504     0

Dec 14 23:05:50 easypc klogd: RTMPSetIndividualHT : Desired MCS = 33

Dec 14 23:05:50 easypc klogd: MlmeUpdateHtTxRates===> 

Dec 14 23:05:50 easypc klogd:  MlmeUpdateHtTxRates<---.AMsduSize = 0  

Dec 14 23:05:50 easypc klogd: TX: MCS[0] = ff (choose 7), BW = 1, ShortGI = 1, MODE = 2,  

Dec 14 23:05:50 easypc klogd: MlmeUpdateHtTxRates<=== 

Dec 14 23:05:50 easypc klogd: Chip specific bbpRegTbSize=0!

Dec 14 23:05:50 easypc klogd: E2PROM: G Tssi[-4 .. +4] = 255 255 255 255 - 255 -255 255 255 255, step=255, tuning=0

Dec 14 23:05:50 easypc klogd: E2PROM: A Tssi[-4 .. +4] = 0 0 0 0 - 0 -0 0 0 0, step=0, tuning=0

Dec 14 23:05:50 easypc klogd: E2PROM: RF FreqOffset=0x2b 

Dec 14 23:05:50 easypc klogd: Txpower per Rate

Dec 14 23:05:50 easypc klogd: Gpwrdelta = 0, Apwrdelta = 0 .

Dec 14 23:05:50 easypc klogd: 20MHz BW, 2.4G band-aaaa6666,  Adata = aaaa6666,  Gdata = aaaa6666 

Dec 14 23:05:50 easypc klogd: 20MHz BW, 2.4G band-aaaa6688,  Adata = aaaa6688,  Gdata = aaaa6688 

Dec 14 23:05:50 easypc last message repeated 2 times

Dec 14 23:05:50 easypc klogd: 20MHz BW, 2.4G band-ffff6688,  Adata = ffff6688,  Gdata = ffff6688 

Dec 14 23:05:50 easypc klogd: <-- NICReadEEPROMParameters

Dec 14 23:05:50 easypc klogd: 3. Phy Mode = 9

Dec 14 23:05:50 easypc klogd: --> NICInitAsicFromEEPROM

Dec 14 23:05:50 easypc klogd: RTMPFilterCalibration - CaliBW20RfR24=0x8, CaliBW40RfR24=0x27

Dec 14 23:05:50 easypc klogd: RTMPSetLED::Mode=1,HighByte=0x20,LowByte=0x01

Dec 14 23:05:50 easypc klogd: NICInitAsicFromEEPROM: pAd->TxPowerCtrl.bInternalTxALC = 0

Dec 14 23:05:50 easypc klogd: Use Hw Radio Control Pin=0; if used Pin=0;

Dec 14 23:05:50 easypc klogd: TxPath = 1, RxPath = 1, RFIC=5, Polar+LED mode=1

Dec 14 23:05:50 easypc klogd: <-- NICInitAsicFromEEPROM

Dec 14 23:05:50 easypc klogd: RTMPSetPhyMode : PhyMode=9, channel=1 

Dec 14 23:05:50 easypc klogd: country code=5/7, RFIC=5, PHY mode=9, support 14 channels

Dec 14 23:05:50 easypc klogd: BuildChannel # 1 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 2 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 3 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 4 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 5 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 6 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 7 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 8 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 9 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 10 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 11 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 12 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 13 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  BuildChannel # 14 :: Pwr0 = 15, Pwr1 =5, 

Dec 14 23:05:50 easypc klogd:  RTMPSetHT : HT_mode(0), ExtOffset(3), MCS(33), BW(1), STBC(0), SHORTGI(1)

Dec 14 23:05:50 easypc klogd: RTMPSetHT : RxBAWinLimit = 64

Dec 14 23:05:50 easypc klogd: RTMPSetHT : AMsduSize = 0, MimoPs = 3, MpduDensity = 4, MaxRAmpduFactor = 3

Dec 14 23:05:50 easypc klogd: EDCA [#0]: AIFSN CWmin CWmax  TXOP(us)  ACM

Dec 14 23:05:50 easypc klogd:      AC_BE       3      4      6         0     0

Dec 14 23:05:50 easypc klogd:      AC_BK       7      4     10         0     0

Dec 14 23:05:50 easypc klogd:      AC_VI       1      3      4      3008     0

Dec 14 23:05:50 easypc klogd:      AC_VO       1      2      3      1504     0

Dec 14 23:05:50 easypc klogd: RTMPSetIndividualHT : Desired MCS = 33

Dec 14 23:05:50 easypc klogd: MlmeUpdateHtTxRates===> 

Dec 14 23:05:50 easypc klogd:  MlmeUpdateHtTxRates<---.AMsduSize = 0  

Dec 14 23:05:50 easypc klogd: TX: MCS[0] = ff (choose 7), BW = 1, ShortGI = 1, MODE = 2,  

Dec 14 23:05:50 easypc klogd: MlmeUpdateHtTxRates<=== 

Dec 14 23:05:50 easypc klogd: MCS Set = ff 00 00 00 01

Dec 14 23:05:50 easypc klogd: NDIS_STATUS_MEDIA_DISCONNECT Event B!

Dec 14 23:05:50 easypc klogd: RTUSBBulkReceive!

Dec 14 23:05:50 easypc klogd: <==== rt28xx_init, Status=0

Dec 14 23:05:50 easypc klogd: ==> RTMPEnableRxTx

Dec 14 23:05:50 easypc klogd: <== WRITE DMA offset 0x208 = 0x45

Dec 14 23:05:50 easypc klogd: <== RTMPEnableRxTx

Dec 14 23:05:50 easypc klogd: 0x1300 = 00064300
```

I guess this is the part where it tries to connect using iwconfig:

```
Dec 16 08:21:51 easypc klogd: SCAN done, resume MSDU transmission ...

Dec 16 08:21:52 easypc klogd: Driver auto reconnect to last OID_802_11_SSID setting - Freya, len - 5

Dec 16 08:21:52 easypc klogd: CntlOidSsidProc():CNTL - 1 BSS of 8 BSS match the desire (5)SSID - Freya

Dec 16 08:21:52 easypc klogd: CNTL - iterate BSS 0 of 1

Dec 16 08:21:52 easypc klogd: SYNC - MlmeJoinReqAction(BSS #0)

Dec 16 08:21:52 easypc klogd: SYNC - BBP R4 to 20MHz.l

Dec 16 08:21:52 easypc klogd: SwitchChannel#1(RF=5, Pwr0=15, Pwr1=5, 1T), N=0xF1, K=0x02, R=0x02

Dec 16 08:21:52 easypc klogd: SYNC - Switch to ch 1, Wait BEACON from 00:24:fe:af:71:70

Dec 16 08:21:52 easypc klogd: SYNC - receive desired BEACON at JoinWaitBeacon... Channel = 1

Dec 16 08:21:52 easypc klogd: MlmeAux.ExtCapInfo=0

Dec 16 08:21:52 easypc klogd: RTMPUpdateMlmeRate ==>   MlmeTransmit = 0x0  

Dec 16 08:21:52 easypc klogd: SYNC - after JOIN, SupRateLen=4, ExtRateLen=8

Dec 16 08:21:52 easypc klogd: SwitchChannel#1(RF=5, Pwr0=15, Pwr1=5, 1T), N=0xF1, K=0x02, R=0x02

Dec 16 08:21:52 easypc klogd: !!! 20MHz !!! 

Dec 16 08:21:52 easypc klogd: AUTH - Send AUTH request seq#1 (Alg=0)...

Dec 16 08:21:52 easypc klogd: AUTH - Receive AUTH_RSP seq#2 to me (Alg=0, Status=0)

Dec 16 08:21:52 easypc klogd: CNTL - AUTH OK

Dec 16 08:21:52 easypc klogd: ASSOC - Send ASSOC request...

Dec 16 08:21:52 easypc klogd: ==> RTMPMakeRSNIE(STA)

Dec 16 08:21:52 easypc klogd: The primary RSNIE: c4853b1d, len = 22

Dec 16 08:21:52 easypc klogd: 0x0000 : 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 

Dec 16 08:21:52 easypc klogd: 0x0010 : 01 00 00 50 f2 02 

Dec 16 08:21:52 easypc klogd: PeerAssocRspAction():ASSOC - receive ASSOC_RSP to me (status=0)

Dec 16 08:21:52 easypc klogd: PeerAssocRspAction():MacTable [255].AMsduSize = 0. ClientStatusFlags = 0x0 

Dec 16 08:21:52 easypc klogd: AssocPostProc===>  AP.AMsduSize = 0. ClientStatusFlags = 0x0 

Dec 16 08:21:52 easypc klogd: AssocPostProc===>    (Mmps=0, AmsduSize=0, )

Dec 16 08:21:52 easypc klogd: AssocPostProc===> Store RSN_IE for WPA SM negotiation 

Dec 16 08:21:52 easypc klogd: RSN_IE: c48b4ffb, len = 26

Dec 16 08:21:52 easypc klogd: 0x0000 : dd 18 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 

Dec 16 08:21:52 easypc klogd: 0x0010 : f2 02 01 00 00 50 f2 02 00 00 

Dec 16 08:21:52 easypc klogd: !!!Infra LINK UP !!! 

Dec 16 08:21:52 easypc klogd: !!! LINK UP !!! (BssType=1, AID=1, ssid=Freya, Channel=1, CentralChannel = 1)

Dec 16 08:21:52 easypc klogd: !!! LINK UP !!! (Density =0, )

Dec 16 08:21:52 easypc klogd: ==============> AsicSetBssid 0:24:fe:af:71:70

Dec 16 08:21:52 easypc klogd: AsicSetEdcaParm

Dec 16 08:21:52 easypc klogd: NDIS_STATUS_MEDIA_DISCONNECT Event AA!

Dec 16 08:21:52 easypc klogd: RTMPWPARemoveAllKeys(AuthMode=4, WepStatus=4)

Dec 16 08:21:52 easypc klogd: AsicUpdateWcidAttributeEntry : WCID #1, KeyIndex #0, Alg=none

Dec 16 08:21:52 easypc klogd: ^I^IWCIDAttri = 0x1 

Dec 16 08:21:52 easypc klogd: AsicRemovePairwiseKeyEntry : Wcid #1 

Dec 16 08:21:52 easypc klogd: remove none key #0

Dec 16 08:21:52 easypc klogd: AsicRemoveSharedKeyEntry: #0 

Dec 16 08:21:52 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:52 easypc klogd: remove none key #1

Dec 16 08:21:52 easypc klogd: AsicRemoveSharedKeyEntry: #1 

Dec 16 08:21:52 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:52 easypc klogd: remove none key #2

Dec 16 08:21:52 easypc klogd: AsicRemoveSharedKeyEntry: #2 

Dec 16 08:21:52 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:52 easypc klogd: remove none key #3

Dec 16 08:21:52 easypc klogd: AsicRemoveSharedKeyEntry: #3 

Dec 16 08:21:52 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:52 easypc klogd: ComposePsPoll

Dec 16 08:21:52 easypc klogd: --->AsicEnableBssSync(INFRA mode)

Dec 16 08:21:52 easypc klogd: !!! LINK UP !!!  ClientStatusFlags=0)

Dec 16 08:21:52 easypc klogd: MlmeUpdateTxRates[MaxSupport = 54] = MaxDesire 54 Mbps

Dec 16 08:21:52 easypc klogd:  MlmeUpdateTxRates (MaxDesire=54, MaxSupport=54, MaxTxRate=54, MinRate=1, Rate Switching =1)

Dec 16 08:21:52 easypc klogd:  MlmeUpdateTxRates (TxRate=24, RtsRate=24, BasicRateBitmap=0x015f)

Dec 16 08:21:52 easypc klogd: MlmeUpdateTxRates (MlmeTransmit=0x0, MinHTPhyMode=0, MaxHTPhyMode=0x4004, HTPhyMode=0x4004)

Dec 16 08:21:52 easypc klogd: MlmeUpdateHtTxRates===> 

Dec 16 08:21:52 easypc klogd: !!! LINK UP !! (StaActive.bHtEnable =0, )

Dec 16 08:21:52 easypc klogd: NDIS_STATUS_MEDIA_CONNECT Event B!.BACapability = 3234040. ClientStatusFlags = 0

Dec 16 08:21:52 easypc klogd: RTMPSetLED::Mode=1,HighByte=0x60,LowByte=0x01

Dec 16 08:21:52 easypc klogd: Txburst 2

Dec 16 08:21:52 easypc klogd: !!!pAd->bNextDisableRxBA= 0 

Dec 16 08:21:52 easypc klogd: not supports 20/40 BSS COEX !!! 

Dec 16 08:21:52 easypc klogd: pAd->CommonCfg.bBssCoexEnable 1 !!! 

Dec 16 08:21:52 easypc klogd: pAd->CommonCfg.Channel 1 !!! 

Dec 16 08:21:52 easypc klogd: pAd->StaActive.SupportedHtPhy.bHtEnable 0 !!! 

Dec 16 08:21:52 easypc klogd: pAd->MlmeAux.ExtCapInfo.BssCoexstSup 0 !!! 

Dec 16 08:21:52 easypc klogd: pAd->CommonCfg.CentralChannel 1 !!! 

Dec 16 08:21:52 easypc klogd: pAd->CommonCfg.PhyMode 9 !!! 

Dec 16 08:21:52 easypc klogd: CNTL - Association successful on BSS #0

Dec 16 08:21:53 easypc klogd: Receive EAPOL-Key frame, TYPE = 3, Length = 95

Dec 16 08:21:55 easypc last message repeated 2 times

Dec 16 08:21:56 easypc klogd: AUTH_RSP - receive DE-AUTH from our AP (Reason=1)

Dec 16 08:21:56 easypc klogd: !!! LINK DOWN !!!

Dec 16 08:21:56 easypc klogd: !!! LINK DOWN 2!!!

Dec 16 08:21:56 easypc klogd: NDIS_STATUS_MEDIA_DISCONNECT Event A!

Dec 16 08:21:56 easypc klogd: MacTableDeleteEntry1 - Total= 0

Dec 16 08:21:56 easypc klogd: CmdThread : CMDTHREAD_SET_ASIC_WCID : WCID = 1, SetTid  = ffffffff, DeleteTid = ffffffff.

Dec 16 08:21:56 easypc klogd: 1-MACValue= 0,

Dec 16 08:21:56 easypc klogd: AsicSetEdcaParm

Dec 16 08:21:56 easypc klogd: 2-MACValue= 0,

Dec 16 08:21:56 easypc klogd: RTMPSetLED::Mode=1,HighByte=0x20,LowByte=0x01

Dec 16 08:21:56 easypc klogd: --->Disable TSF synchronization

Dec 16 08:21:56 easypc klogd: LinkDownCleanMlmeAux.ExtCapInfo!

Dec 16 08:21:56 easypc klogd: RTMPWPARemoveAllKeys(AuthMode=4, WepStatus=4)

Dec 16 08:21:56 easypc klogd: AsicUpdateWcidAttributeEntry : WCID #1, KeyIndex #0, Alg=none

Dec 16 08:21:56 easypc klogd: ^I^IWCIDAttri = 0x1 

Dec 16 08:21:56 easypc klogd: AsicRemovePairwiseKeyEntry : Wcid #1 

Dec 16 08:21:56 easypc klogd: remove none key #0

Dec 16 08:21:56 easypc klogd: AsicRemoveSharedKeyEntry: #0 

Dec 16 08:21:56 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:56 easypc klogd: remove none key #1

Dec 16 08:21:56 easypc klogd: AsicRemoveSharedKeyEntry: #1 

Dec 16 08:21:56 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:56 easypc klogd: remove none key #2

Dec 16 08:21:56 easypc klogd: AsicRemoveSharedKeyEntry: #2 

Dec 16 08:21:56 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:56 easypc klogd: remove none key #3

Dec 16 08:21:56 easypc klogd: AsicRemoveSharedKeyEntry: #3 

Dec 16 08:21:56 easypc klogd: Write: SHARED_KEY_MODE_BASE at this Bss[0] = 0x0 

Dec 16 08:21:56 easypc klogd: SwitchChannel#1(RF=5, Pwr0=15, Pwr1=5, 1T), N=0xF1, K=0x02, R=0x02

Dec 16 08:21:56 easypc klogd: CNTL - All roaming failed, restore to channel 1, Total BSS[08]

Dec 16 08:21:57 easypc klogd: Driver auto reconnect to last OID_802_11_SSID setting - Freya, len - 5

Dec 16 08:21:57 easypc klogd: CntlOidSsidProc():CNTL - 0 BSS of 7 BSS match the desire (5)SSID - Freya

Dec 16 08:21:57 easypc klogd: CntlOidSsidProc():CNTL - No matching BSS, start a new scan
```

Sometimes loading the driver fails, but that'sn not my biggest problem: switching the WiFI card off and on solves this most often:

```
Dec  8 04:17:35 easypc kernel: rtusb init --->

Dec  8 04:17:35 easypc kernel: 

Dec  8 04:17:35 easypc kernel: 

Dec  8 04:17:35 easypc kernel: === pAd = c525c000, size = 503096 ===

Dec  8 04:17:35 easypc kernel: 

Dec  8 04:17:35 easypc kernel: modprobe: page allocation failure. order:6, mode:0x20

Dec  8 04:17:35 easypc kernel: [<c0031804>] (unwind_backtrace+0x0/0xf4) from [<c0088c60>] (__alloc_pages_nodemask+0x4dc/0x59c)

Dec  8 04:17:35 easypc kernel: [<c0088c60>] (__alloc_pages_nodemask+0x4dc/0x59c) from [<c0032250>] (__dma_alloc+0x88/0x27c)

Dec  8 04:17:35 easypc kernel: [<c0032250>] (__dma_alloc+0x88/0x27c) from [<c00324c0>] (dma_alloc_coherent+0x50/0x5c)

Dec  8 04:17:35 easypc kernel: [<c00324c0>] (dma_alloc_coherent+0x50/0x5c) from [<bf06aa7c>] (RTMPAllocUsbBulkBufStruct+0x44/0xb0 [rt2870sta])

Dec  8 04:17:35 easypc kernel: [<bf06aa7c>] (RTMPAllocUsbBulkBufStruct+0x44/0xb0 [rt2870sta]) from [<bf06b0c8>] (RTMPAllocTxRxRingMemory+0x68/0x224 [rt2870sta])

Dec  8 04:17:35 easypc kernel: [<bf06b0c8>] (RTMPAllocTxRxRingMemory+0x68/0x224 [rt2870sta]) from [<bf02be84>] (RTMPAllocAdapterBlock+0xb8/0x1e4 [rt2870sta])

Dec  8 04:17:35 easypc kernel: [<bf02be84>] (RTMPAllocAdapterBlock+0xb8/0x1e4 [rt2870sta]) from [<bf072780>] (rtusb_probe+0x74/0x32c [rt2870sta])

Dec  8 04:17:35 easypc kernel: [<bf072780>] (rtusb_probe+0x74/0x32c [rt2870sta]) from [<c0236fd0>] (usb_probe_interface+0xe0/0x17c)

Dec  8 04:17:35 easypc kernel: [<c0236fd0>] (usb_probe_interface+0xe0/0x17c) from [<c01f6208>] (driver_probe_device+0xa4/0x1b4)

Dec  8 04:17:35 easypc kernel: [<c01f6208>] (driver_probe_device+0xa4/0x1b4) from [<c01f63a4>] (__driver_attach+0x8c/0x90)

Dec  8 04:17:35 easypc kernel: [<c01f63a4>] (__driver_attach+0x8c/0x90) from [<c01f5a00>] (bus_for_each_dev+0x64/0x8c)

Dec  8 04:17:35 easypc kernel: [<c01f5a00>] (bus_for_each_dev+0x64/0x8c) from [<c01f5380>] (bus_add_driver+0x184/0x260)

Dec  8 04:17:35 easypc kernel: [<c01f5380>] (bus_add_driver+0x184/0x260) from [<c01f665c>] (driver_register+0x78/0x13c)

Dec  8 04:17:35 easypc kernel: [<c01f665c>] (driver_register+0x78/0x13c) from [<c0236ce0>] (usb_register_driver+0x6c/0x148)

Dec  8 04:17:35 easypc kernel: [<c0236ce0>] (usb_register_driver+0x6c/0x148) from [<c00253c0>] (do_one_initcall+0x30/0x1ac)

Dec  8 04:17:35 easypc kernel: [<c00253c0>] (do_one_initcall+0x30/0x1ac) from [<c006f4bc>] (sys_init_module+0x120/0x14b0)

Dec  8 04:17:35 easypc kernel: [<c006f4bc>] (sys_init_module+0x120/0x14b0) from [<c002bdc0>] (ret_fast_syscall+0x0/0x2c)

Dec  8 04:17:35 easypc kernel: Mem-info:

Dec  8 04:17:35 easypc kernel: Normal per-cpu:

Dec  8 04:17:35 easypc kernel: CPU    0: hi:   18, btch:   3 usd:   2

Dec  8 04:17:35 easypc kernel: active_anon:3354 inactive_anon:6 isolated_anon:0

Dec  8 04:17:35 easypc kernel: active_file:1775 inactive_file:4444 isolated_file:0

Dec  8 04:17:35 easypc kernel: unevictable:0 dirty:7 writeback:0 unstable:0

Dec  8 04:17:35 easypc kernel: free:2613 slab_reclaimable:392 slab_unreclaimable:841

Dec  8 04:17:35 easypc kernel: mapped:1239 shmem:43 pagetables:93 bounce:0

Dec  8 04:17:35 easypc kernel: Normal free:10452kB min:1016kB low:1268kB high:1524kB active_anon:13416kB inactive_anon:24kB active_file:7100kB inactive_file:17776kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:65024kB mlocked:0kB dirty:28kB writeback:0kB mapped:4956kB shmem:172kB slab_reclaimable:1568kB slab_unreclaimable:3364kB kernel_stack:368kB pagetables:372kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no

Dec  8 04:17:35 easypc kernel: lowmem_reserve[]: 0 0

Dec  8 04:17:35 easypc kernel: Normal: 589*4kB 296*8kB 182*16kB 52*32kB 10*64kB 2*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 10452kB

Dec  8 04:17:35 easypc kernel: 6262 total pagecache pages

Dec  8 04:17:35 easypc kernel: 0 pages in swap cache

Dec  8 04:17:35 easypc kernel: Swap cache stats: add 0, delete 0, find 0/0

Dec  8 04:17:35 easypc kernel: Free swap  = 0kB

Dec  8 04:17:35 easypc kernel: Total swap = 0kB

Dec  8 04:17:35 easypc kernel: 16384 pages of RAM

Dec  8 04:17:35 easypc kernel: 2721 free pages

Dec  8 04:17:35 easypc kernel: 2277 reserved pages

Dec  8 04:17:35 easypc kernel: 1126 slab pages

Dec  8 04:17:35 easypc kernel: 5664 pages shared

Dec  8 04:17:35 easypc kernel: 0 pages swap cached

Dec  8 04:17:35 easypc kernel: <-- ERROR in Alloc Bulk buffer for HTTxContext!

Dec  8 04:17:35 easypc kernel: ---> RTMPFreeTxRxRingMemory

Dec  8 04:17:35 easypc kernel: <--- RTMPFreeTxRxRingMemory

Dec  8 04:17:35 easypc kernel: ERROR!!! Failed to allocate memory - TxRxRing

Dec  8 04:17:35 easypc kernel: <-- RTMPAllocAdapterBlock, Status=3

Dec  8 04:17:35 easypc kernel: rt2870: probe of 1-1.2:1.0 failed with error -1

Dec  8 04:17:35 easypc kernel: usbcore: registered new interface driver rt2870

Dec  8 04:18:40 easypc kernel: usbcore: deregistering interface driver rt2870

Dec  8 04:18:40 easypc kernel: <--- rtusb exit

Dec  8 04:18:50 easypc kernel: rtusb init --->

Dec  8 04:18:50 easypc kernel: 

Dec  8 04:18:50 easypc kernel: 

Dec  8 04:18:50 easypc kernel: === pAd = c5c25000, size = 503096 ===

Dec  8 04:18:50 easypc kernel: 

Dec  8 04:18:50 easypc kernel: modprobe: page allocation failure. order:6, mode:0x20

Dec  8 04:18:50 easypc kernel: [<c0031804>] (unwind_backtrace+0x0/0xf4) from [<c0088c60>] (__alloc_pages_nodemask+0x4dc/0x59c)

Dec  8 04:18:50 easypc kernel: [<c0088c60>] (__alloc_pages_nodemask+0x4dc/0x59c) from [<c0032250>] (__dma_alloc+0x88/0x27c)

Dec  8 04:18:50 easypc kernel: [<c0032250>] (__dma_alloc+0x88/0x27c) from [<c00324c0>] (dma_alloc_coherent+0x50/0x5c)

Dec  8 04:18:50 easypc kernel: [<c00324c0>] (dma_alloc_coherent+0x50/0x5c) from [<bf114a7c>] (RTMPAllocUsbBulkBufStruct+0x44/0xb0 [rt2870sta])

Dec  8 04:18:50 easypc kernel: [<bf114a7c>] (RTMPAllocUsbBulkBufStruct+0x44/0xb0 [rt2870sta]) from [<bf1150c8>] (RTMPAllocTxRxRingMemory+0x68/0x224 [rt2870sta])

Dec  8 04:18:50 easypc kernel: [<bf1150c8>] (RTMPAllocTxRxRingMemory+0x68/0x224 [rt2870sta]) from [<bf0d5e84>] (RTMPAllocAdapterBlock+0xb8/0x1e4 [rt2870sta])

Dec  8 04:18:50 easypc kernel: [<bf0d5e84>] (RTMPAllocAdapterBlock+0xb8/0x1e4 [rt2870sta]) from [<bf11c780>] (rtusb_probe+0x74/0x32c [rt2870sta])

Dec  8 04:18:50 easypc kernel: [<bf11c780>] (rtusb_probe+0x74/0x32c [rt2870sta]) from [<c0236fd0>] (usb_probe_interface+0xe0/0x17c)

Dec  8 04:18:50 easypc kernel: [<c0236fd0>] (usb_probe_interface+0xe0/0x17c) from [<c01f6208>] (driver_probe_device+0xa4/0x1b4)

Dec  8 04:18:50 easypc kernel: [<c01f6208>] (driver_probe_device+0xa4/0x1b4) from [<c01f63a4>] (__driver_attach+0x8c/0x90)

Dec  8 04:18:50 easypc kernel: [<c01f63a4>] (__driver_attach+0x8c/0x90) from [<c01f5a00>] (bus_for_each_dev+0x64/0x8c)

Dec  8 04:18:50 easypc kernel: [<c01f5a00>] (bus_for_each_dev+0x64/0x8c) from [<c01f5380>] (bus_add_driver+0x184/0x260)

Dec  8 04:18:50 easypc kernel: [<c01f5380>] (bus_add_driver+0x184/0x260) from [<c01f665c>] (driver_register+0x78/0x13c)

Dec  8 04:18:50 easypc kernel: [<c01f665c>] (driver_register+0x78/0x13c) from [<c0236ce0>] (usb_register_driver+0x6c/0x148)

Dec  8 04:18:50 easypc kernel: [<c0236ce0>] (usb_register_driver+0x6c/0x148) from [<c00253c0>] (do_one_initcall+0x30/0x1ac)

Dec  8 04:18:50 easypc kernel: [<c00253c0>] (do_one_initcall+0x30/0x1ac) from [<c006f4bc>] (sys_init_module+0x120/0x14b0)

Dec  8 04:18:50 easypc kernel: [<c006f4bc>] (sys_init_module+0x120/0x14b0) from [<c002bdc0>] (ret_fast_syscall+0x0/0x2c)

Dec  8 04:18:50 easypc kernel: Mem-info:

Dec  8 04:18:50 easypc kernel: Normal per-cpu:

Dec  8 04:18:50 easypc kernel: CPU    0: hi:   18, btch:   3 usd:  15

Dec  8 04:18:50 easypc kernel: active_anon:3363 inactive_anon:6 isolated_anon:0

Dec  8 04:18:50 easypc kernel: active_file:3646 inactive_file:2076 isolated_file:32

Dec  8 04:18:50 easypc kernel: unevictable:0 dirty:3 writeback:0 unstable:0

Dec  8 04:18:50 easypc kernel: free:2939 slab_reclaimable:384 slab_unreclaimable:857

Dec  8 04:18:50 easypc kernel: mapped:1161 shmem:43 pagetables:93 bounce:0

Dec  8 04:18:50 easypc kernel: Normal free:11756kB min:1016kB low:1268kB high:1524kB active_anon:13452kB inactive_anon:24kB active_file:14584kB inactive_file:8304kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:65024kB mlocked:0kB dirty:12kB writeback:0kB mapped:4644kB shmem:172kB slab_reclaimable:1536kB slab_unreclaimable:3428kB kernel_stack:368kB pagetables:372kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no

Dec  8 04:18:50 easypc kernel: lowmem_reserve[]: 0 0

Dec  8 04:18:50 easypc kernel: Normal: 1491*4kB 680*8kB 12*16kB 5*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 11756kB

Dec  8 04:18:50 easypc kernel: 5765 total pagecache pages

Dec  8 04:18:50 easypc kernel: 0 pages in swap cache

Dec  8 04:18:50 easypc kernel: Swap cache stats: add 0, delete 0, find 0/0

Dec  8 04:18:50 easypc kernel: Free swap  = 0kB

Dec  8 04:18:50 easypc kernel: Total swap = 0kB

Dec  8 04:18:50 easypc kernel: 16384 pages of RAM

Dec  8 04:18:50 easypc kernel: 3080 free pages

Dec  8 04:18:50 easypc kernel: 2277 reserved pages

Dec  8 04:18:50 easypc kernel: 1126 slab pages

Dec  8 04:18:50 easypc kernel: 5092 pages shared

Dec  8 04:18:50 easypc kernel: 0 pages swap cached

Dec  8 04:18:50 easypc kernel: <-- ERROR in Alloc Bulk buffer for HTTxContext!

Dec  8 04:18:50 easypc kernel: ---> RTMPFreeTxRxRingMemory

Dec  8 04:18:50 easypc kernel: <--- RTMPFreeTxRxRingMemory

Dec  8 04:18:50 easypc kernel: ERROR!!! Failed to allocate memory - TxRxRing

Dec  8 04:18:50 easypc kernel: <-- RTMPAllocAdapterBlock, Status=3

Dec  8 04:18:50 easypc kernel: rt2870: probe of 1-1.2:1.0 failed with error -1

Dec  8 04:18:50 easypc kernel: usbcore: registered new interface driver rt2870
```

----------

## DONAHUE

 *Quote:*   

> What works: 
> 
> Connecting without encryption

 

seems to say the problem is isolated to wpa_supplicant configuration or to the rt3070 driver not supporting wpa.

what did you do with this instruction from the driver readme?

 *Quote:*   

> In os/linux/config.mk 
> 
> 		modify to meet your need.
> 
> 	** Build for being controlled by NetworkManager or wpa_supplicant wext functions
> ...

 

do you have control of the router? does WEP work?

do you have wpa_gui? 

```
USE="qt4" emerge wpa_supplicant
```

 should provide

result of iwlist scan ra0?

content of /etc/conf.d/net?

content of /etc/wpa_supplicant/wpa_supplicant.conf?

baselayout1 or 2?

----------

## WendyB

Thanks for your quick reply.

Actually there is some progress because, after another day of fiddling I'm writing this from the laptop using

WPA  :Smile: 

The way I came here is after reboot start

wpa_supplicant -Dralink -irao0 -c /configfile

if it gives immediate errors I unload and load de kernel module

then after a few seconds I press ctrl+C

Now the ra0 interface is up

if i do ifconfig ra0 up immediately after reboot it gives an segmentation fault

now i can configure the driver with

iwpriv ra0 set SSID=Name

etc.

then i wait about 15 minutes and suddenly it' s online

then dhcpcd ra0 and I'm ready to start xdm

I see now that i should have used -Dwext because i have set both options to y in de config.mk file

/etc/init.d/net.ra0 start

also gives a segmentation fault

once the interface is up 'iwlist ra0'  gives a nice list of AP's

I have recompiled the kernel with SLAB instead of SLUB, because I read somewhere this would be more stable, especially for 3rd party drivers

this is in wpa_supplicant.conf:

ap_scan=1

eapol_version=1

countrycode=NL

network={

  ssid="Freya"

  mode=0

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=TKIP

  group=TKIP

  psk="blabla"

  priority=2

}

/etc/conf.d/net is empty

I can do anything I want with the router. But I would really like to use WPA because I'm living in the center of town with lots of restaurants and bars around me.

I haven' t tried WEP

I' m not sure which baselayout I have

Most GUI s are masked for arm/~arm 

I have tried wicd (from sourcecode) but it seems to conflict with networkmanager

I also have NetworkManager installed, but not started. and cnetworkmanager

I guess I should now edit /etc/conf.d/net to make ' ifconfig ra0 up'  and ' /etc/init.d/net.ra0 start'   to work

and change to -Dwext or recompile the ralink driver

the long delay before association might just be because of the 800Mhz processor (and 56MB of RAM)

thanks for your reply

----------

## DONAHUE

most relevant is probably the inclusion of modules_ra0=( "wpa_supplicant" ) in /etc/conf.d/net if in baselayout1 or spelled as modules_ra0="wpa_supplicant" if in baselayout2.

```
emerge -s baselayout
```

to check version

suggested /etc/conf.d/net:

```
modules_ra0=( "wpa_supplicant" )

wpa_supplicant_ra0="-Dwext"

wpa_timeout_ra0=15

config_ra0=( "dhcp" )

dhcpcd_ra0="-t 10" 
```

Suggested /etc/wpa_supplicant/wpa_supplicant.conf: *Quote:*   

> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
> 
> update_config=1
> 
> network={
> ...

 

based on rt2870's here; and, BTW no network manager and no wicd, straight gentoo networking

another btw, you should be able to use wpa_gui in xfce and in fact add wpa_gui in the session startup of XFCE. It’s in the Session and startup configuration GUI.

----------

## WendyB

Thanks for your advice. I have tried your suggested settings but nothing works.

In the end it turns out to be a memory allocation problem. Making the system lighter by skipping some unneeded services seems to have solved the problem.

I have removed networkmanager and wpa_supplicant from the system and using iwpriv commands it now reliable connects with WPA2

Thanks for your help  :Wink: 

----------

## DONAHUE

good show!!

----------

## WendyB

This is the first result:

https://forums.gentoo.org/viewtopic-p-6532581.html#6532581

----------

## anli

 *WendyB wrote:*   

> I have removed networkmanager and wpa_supplicant from the system and using iwpriv commands it now reliable connects with WPA2

 

WendyB,

Can you, please, show your final connection sript  (I mean iwpriv and Ko commands) and .dat file?

----------

## WendyB

 *anli wrote:*   

>  *WendyB wrote:*   I have removed networkmanager and wpa_supplicant from the system and using iwpriv commands it now reliable connects with WPA2 
> 
> WendyB,
> 
> Can you, please, show your final connection sript  (I mean iwpriv and Ko commands) and .dat file?

 

/etc/Wireless/RT2870STA/RT2870STA.dat

also softlinked from

/etc/Wireless/RT3070STA/RT3070STA.dat

```
#The word of "Default" must not be removed

Default

CountryRegion=5

CountryRegionABand=7

CountryCode=NL

ChannelGeography=1

SSID=11n-AP

NetworkType=Infra

WirelessMode=5

Channel=0

BeaconPeriod=100

TxPower=100

BGProtection=0

TxPreamble=0

RTSThreshold=2347

FragThreshold=2346

TxBurst=1

PktAggregate=0

WmmCapable=1

AckPolicy=0;0;0;0

AuthMode=WPAPSK

EncrypType=TKIP

WPAPSK=

DefaultKeyID=1

Key1Type=0

Key1Str=

Key2Type=0

Key2Str=

Key3Type=0

Key3Str=

Key4Type=0

Key4Str=

PSMode=CAM

AutoRoaming=0

RoamThreshold=70

APSDCapable=0

APSDAC=0;0;0;0

HT_RDG=1

HT_EXTCHA=0

HT_OpMode=0

HT_MpduDensity=4

HT_BW=1

HT_BADecline=0

HT_AutoBA=1

HT_AMSDU=0

HT_BAWinSize=64

HT_GI=1

HT_MCS=33

HT_MIMOPSMode=3

HT_DisallowTKIP=1

HT_STBC=0

EthConvertMode=

EthCloneMac=

IEEE80211H=0

TGnWifiTest=0

WirelessEvent=0

MeshId=MESH

MeshAutoLink=1

MeshAuthMode=OPEN

MeshEncrypType=NONE

MeshWPAKEY=

MeshDefaultkey=1

MeshWEPKEY=

CarrierDetect=0

AntDiversity=0

BeaconLostTime=4

FtSupport=0

Wapiifname=ra0

WapiPsk=

WapiPskType=

WapiUserCertPath=

WapiAsCertPath=

PSP_XLINK_MODE=0

WscManufacturer=

WscModelName=

WscDeviceName=

WscModelNumber=

WscSerialNumber=

RadioOn=1

```

```
ifconfig ra0 up

iwconfig ra0 mode managed

iwpriv ra0 set SSID="Freya"

iwpriv ra0 set AuthMode=WPA2PSK

iwpriv ra0 set EncrypType=AES

iwpriv ra0 set WPAPSK="password"

sleep 10

dhcpcd ra0

/etc/init.d/ntp-client start
```

This is what I'm using now.

Or do you need the specific EasyPC commands to activate the wlan device?

----------

## anli

WendyB,

Thanks! Probably my problem is there isn't long sleep before DHCP client initing.

----------

## WendyB

 *anli wrote:*   

> WendyB,
> 
> Thanks! Probably my problem is there isn't long sleep before DHCP client initing.

 

The last three lines I added recently. Before that I checked dmesg to see what te driver was doing. Once it starts scanning for an access point I run this script

Sometimes with this sleep of 10 dhcpcd is too early.

I used the have the debug logging mode on. It's an option in the Ralink drivers under the regular network drivers in kernel config.

Oh, and I needed to install crda (for the right scanning frequencies).

----------

