qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Atheros Wireless Device Emulation


From: Clemens Kolbitsch
Subject: [Qemu-devel] Atheros Wireless Device Emulation
Date: Thu, 28 Feb 2008 15:12:09 +0100
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

Hi!
This patch adds virtual wireless networking support to qemu-0.9.1.
Besides being funny having a wireless LAN in Qemu, I guess wireless driver 
developers could use this a lot.

I have 3 screenshots here:
http://stud4.tuwien.ac.at/~e0126605/qemu_atheros/atheros_wlan_hardware.jpg
http://stud4.tuwien.ac.at/~e0126605/qemu_atheros/atheros_wlan_connecting.jpg
http://stud4.tuwien.ac.at/~e0126605/qemu_atheros/atheros_wlan_connected.jpg


Some infos about the emulation:
 - We simulate an Atheros AR5212 NIC
 - Additionally, we have a virutal access point that can
   be used to connect to Qemu
 - The code is based on ath5k reverse engineering from
   about 10 months ago. I did not check what these guys
   did since then.
 - I added tons of hours doing reverse engineering.. but the
   code is still a MESS! I'm sorry, but at least it works ;-)
 - We can simulate different network card vendors. I.e.
   through an additional model-name, we can specify if the
   network card is identified as "Atheros XXXX" or "HP W400", etc.
   ---> different drivers are installed automatically by guest system
 - The hardware reverse engineering still lacks some stuff. Known
   problems:
        * Depending on the driver, you have to use a different model
           ---> official windows drivers VS. madwifi Linux driver
        * Newest madwifi code probably does not work
           ---> Use Madwifi 0.9.3. Works just fine ;-)
 - The networking-code is still a *little* ugly. Outbound connections
   work, but there seem to be problems for inbound connections (e.g.
   tcp-redirection, etc.)
 - VM Snapshots supported

Some infos about the patch:
 - 2 lines added to pci.c
 - added function declaration to pci.h
 - patched Makefile.target (2 lines)
 - added files qemu/hw/atheros_wlan_.*.[ch]
 - took 2 files from wireshark to generate CRC32 checksums
 - took 3 files from ath5k
 ---> licence people, please have a look if that is ok!!

Enabling emulation:

As I wrote above, there are still problems when using the same code for 
windows and linux guests. The model parameter helps here. Using the NIC on 
windows (that's how I tested):

qemu ... -net user -net nic,model=atheros_wlan_winxp_HPW400 ...

and

qemu ... -net user -net nic,model=atheros_wlan_linux_HPW400 ...

for Linux systems.

The "atheros_wlan" is the device itself, "_linux" / "_windows" is necessary 
because the reverse engineering is still buggy and "_HPW400" gives the NIC 
identification for the guest. HPW400 is the Hewlett-Packard W400 device, but 
there are some more (see the atheros_wlan_eeprom.h for details).

I have used the device on Debian (Kubuntu) Linux. The guests were WinXP-SP2 
and Kubuntu Linux, Kernel 2.6.20, MadWifi 0.9.3. My system is x86, so there 
might be problems with big/little endian I am not aware of!!

Please try the patch and let me know what you think of it!!

Greets,
Clemens

Attachment: atheros_wlan.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]