rt2800 testing

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5121

notch

12-12-2008 19:17:30

Hi,

I've seen that there is some work being done on rt2800 (http//git.kernel.org/?p=linux/kernel/g ... perimental). I'm really looking forward to see full support of this chipset in mainline, so I would like to help testing the new driver. Unfortunately I was not able to compile drivers from this tree against 2.6.27.8. Is there any way to do this? If so, are there any other parts of the experimental tree I should copy (like mac80211)? Or should I maybe try to patch the latest compat-wireless using drivers from experimental?
As a last resort I can use the latest .28rc kernel. I didn't try it yet, but I guess everything should compile flowlessly, am I right?

greetings
Notch

Spy84464

12-12-2008 22:29:16

Hello,
have you considered pulling our kernel branch? [url1sr3rjkc]http://rt2x00.serialmonkey.com/wiki/index.php?title=Rt2x00_GIT_instructions[/url1sr3rjkc]
It should contain the very latest rt2x00 version. I do not know if rt2800(pci/usb) are currently working, but we received recently some code from Ralink which should hopefully help.

Regards,
Romain

IvD

13-12-2008 10:25:43

viewtopic.php?f=5&t=4200

nando4

26-01-2009 14:18:50

Hi everyone,

I can see the rt2800pci driver has been included in the latest git. I have downloaded the git, compiled it, along with hostapd, libnl1-1. Upon reboot, the RT2860 (pci) is recognised OK, ifconfig shows wlan0 and wmaster0. hostapd -dddd hostapd.cfg fails, with hostapd.cfg containing interface=wlan, driver=nl80211.

netmanager-gnome-applet does nothing automatically with this card. ifconfig wlan0 down.. iwconfig wlan0 mode adhoc essid .... performed, no result.

Can anyone confirm if the rt2800pci driver does work with the RT2860 card? If so, a list of steps would be appreciated, oh.. and is there a confirmation of packet injection in this driver?

nando

IvD

26-01-2009 17:32:26


Can anyone confirm if the rt2800pci driver does work with the RT2860 card? If so, a list of steps would be appreciated, oh.. and is there a confirmation of packet injection in this driver?
[/quotebx3gttb9]

[sarcasm]It is nice to see you at least [bbx3gttb9]read[/bbx3gttb9] the last few postings on this topic.... [/sarcasm]

nando4

26-01-2009 17:43:25

Yes.. thank you for noticing that I have been reading. Others with netbooks (U100/ASUS 1000H) have been reading as well. So interest is quite high in having injection drivers.

Though I am still not clear on one thing. Can anyone confirm that the rt2800pci driver does in fact work with the rt2860pci card? I consider it a waste of time to chug away otherwise with hostapd, ipconfig, iwconfig, etc.. if the underlying driver is going to ignore their requests.

Nando

IvD

26-01-2009 17:47:16

Since apparently you still don't understand what I have been saying over and over and over again, I am now going to make it very clear to you. Below is a direct quote from mailinglist and several topics

rt2800pci and rt2800usb have been promoted to the rt2x00.git master branch.
With a lot of help from Luis both rt2800pci and rt2800usb have made a lot of
progress this week. Overall the drivers are not very usable, but neither caused
any crashes or system hangs when the interface was brought up.

Ivo[/size1pd58pg5]

nando4

27-01-2009 10:15:15

thank you Ivo. Your last response is greatly appreciated by all wondering the progress of the rt2800pci driver.

Timmes

27-01-2009 22:05:28

I pull the kernel branch every time i see changes made to rt2800pci.c and will keep posting my findings in the other thread as soon as anything changes. For the time being it doesn't crash but it doesn't actually succeed in receiving any sort of frame (beacon or otherwise) whatsoever.

reanimator

25-02-2009 09:05:58

Hi,

I have fetched latest change set of rt2x00.git master and observe that [b1byvg2ws]rt2800pci_enable_readio()[/b1byvg2ws] failed with
[i1byvg2ws]"Indirect register access failed offset=0x7010, value=0x01500000"[/i1byvg2ws]

I am not sure about the value, but certainly the register was [b1byvg2ws]H2M_MAILBOX_CSR[/b1byvg2ws]. This seems to be [b1byvg2ws]rt2800pci_muc_request()[/b1byvg2ws] failed. My assumption that on-chip controller is not responding because for some reason the FW download was failed.

I have compared 2008_0918_RT2860_Linux_STA_v1.8.0.0 driver implementation and found that the FW downloaded twice.
First time [code1byvg2ws]rt_main_dev.c, rt28xx_init()->rtmp_init.c, NICLoadFirmware()[/code1byvg2ws]
Second time [code1byvg2ws]rt_main_dev.c rt28xx_init()->rtpm_init.c, NICInitializeAdapter()->NICLoadFirmware()[/code1byvg2ws] at the first time the retry block executed.

Has anybody experienced the same problem? If yes, has anybody tried to download the rt2860.bin FW twice in the same way like rt2860sta driver?

IvD

25-02-2009 17:28:57

That is an interesting comment, loading the firmware twice has indeed never been tested (at least I never created a rt2800pci version which did that, so I doubt anybody else has tried it).
Could you try to see what happens if the firmware is loaded twice?

reanimator

01-03-2009 05:48:28

I have repeated the call sequence of [b3tfqtyqp]rt2800pci_enable_radio[/b3tfqtyqp] at the end of [b3tfqtyqp]rt2800pci_load_firmware[/b3tfqtyqp]
[code3tfqtyqp] /*--- 2009-02-28, #6:40, Download FW second time*/
if (unlikely(rt2800pci_wait_wpdma_ready(rt2x00dev) ||
rt2800pci_init_registers(rt2x00dev) ||
rt2800pci_wait_wpdma_ready(rt2x00dev) ||
rt2800pci_init_bbp(rt2x00dev)))
return -EIO;

reg = 0;
rt2x00_set_field32(&reg, PBF_SYS_CTRL_HOST_RAM_WRITE, 1);
rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, reg);

/*
* Write firmware to device.
*/
DEBUG(rt2x00dev, "Downloading FW second time.\n");
rt2x00pci_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
data, len);

rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000);
rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00001);

rt2x00pci_register_write(rt2x00dev, H2M_BBP_AGENT, 0);
rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0);

// Queues allocated during enabling radio by rt2x00
#if 0
DEBUG(rt2x00dev, "Initializing queues.\n");
rt2800pci_init_queues(rt2x00dev);
#endif // 0

/*
* Send signal to firmware during boot time.
*/
DEBUG(rt2x00dev, "Waiting for MCU ready.\n");
rt2800pci_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);

[/code3tfqtyqp]

and I get my WiFi card up and running. At least I may put it in ad-hoc mode
- [i3tfqtyqp]iwconfig wlan0 essid 'rt2860-debug'[/i3tfqtyqp]
- [i3tfqtyqp]iwconfig wlan0 mode ad-hoc[/i3tfqtyqp]
- [i3tfqtyqp]ifconfig wlan0 192.168.1.1 up[/i3tfqtyqp]

Unfortunately [i3tfqtyqp]iwlist wlan0[/i3tfqtyqp] give no result yet.

I have attached the log. May be somebody find the clue why scanning not working as expected.

IvD

01-03-2009 10:05:29

Could you post the patch (git diff) of the changes you made, that makes it easier for me to see what you exactly have changed.

In the changes above you commented out the call to rt2800pci_init_queues(), are you sure that is correct?

reanimator

01-03-2009 12:26:59

In the changes above you commented out the call to rt2800pci_init_queues(), are you sure that is correct?[/quote3gw7cira]

No, I am not. But if I keep this code, I get NULL pointer dereference (trace attaced).

Right now (after fetching the latest sources) I have two probelms
A) [i3gw7cira]iwlist scan[/i3gw7cira] failed to get the scan results.
B) MCU hangs up after interface down requested.

1) [i3gw7cira]iwconfig wlan0 mode ad-hoc[/i3gw7cira]
2) [i3gw7cira]iwconfig wlan0 essid 'rt2860-debug'[/i3gw7cira]
3) [i3gw7cira]ifconfig wlan0 192.168.1.1[/i3gw7cira]
4) [i3gw7cira]iwlist scan[/i3gw7cira]
5) [i3gw7cira]ifconfig wlan0 down[/i3gw7cira]

At step 4) I see the problem A). This is new, because perviously I got [i3gw7cira]No scan results[/i3gw7cira]. And I also don't see anymore scanning attempts in the log.

At step 5) I see the problem B). This problem was before the update.

IvD

01-03-2009 14:16:49

I just double checked the code, either I overlook something or the Firmware is only loaded twice when the BBP initialization fails.

rt_main_dev.c
[code1ucfxuvl]
// Load 8051 firmware
Status = NICLoadFirmware(pAd);
if (Status != NDIS_STATUS_SUCCESS)
{
DBGPRINT_ERR(("NICLoadFirmware failed, Status[=0x%08x]\n", Status));
goto err1;
}
[/code1ucfxuvl]

rtmp_init.c
[code1ucfxuvl]
// Initialze ASIC for TX & Rx operation
if (NICInitializeAsic(pAd , bHardReset) != NDIS_STATUS_SUCCESS)
{
if (j++ == 0)
{
NICLoadFirmware(pAd);
goto retry;
}
return NDIS_STATUS_FAILURE;
}
[/code1ucfxuvl]

The firmware is only loaded when NICInitializeAsic() returns a failure, if you look at the code in that function, you will see only 1 occurence where it returns failure

[code1ucfxuvl]
// Read BBP register, make sure BBP is up and running before write new data
Index = 0;
do
{
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R0, &R0);
DBGPRINT(RT_DEBUG_TRACE, ("BBP version = %x\n", R0));
} while ((++Index < 20) && ((R0 == 0xff) || (R0 == 0x00)));
//ASSERT(Index < 20); //this will cause BSOD on Check-build driver

if ((R0 == 0xff) || (R0 == 0x00))
return NDIS_STATUS_FAILURE;
[/code1ucfxuvl]

This code corresponds to the rt2x00 function rt2800pci_wait_bbp_ready() which is called by rt2800pci_init_bbp().
However that means that if the double firmware load was needed for you, you should never have come past this block in rt2800pci_enable_radio
[code1ucfxuvl]
if (unlikely(rt2800pci_wait_wpdma_ready(rt2x00dev) ||
rt2800pci_init_queues(rt2x00dev) ||
rt2800pci_init_registers(rt2x00dev) ||
rt2800pci_wait_wpdma_ready(rt2x00dev) ||
rt2800pci_init_bbp(rt2x00dev)))
return -EIO;
[/code1ucfxuvl]