Patch #1:
Necessary changes to Qemu itself... Makefile and hw/pci.c to include the
device:
diff -Naur qemu/hw/pci.c qemu-altered/hw/pci.c
--- qemu/hw/pci.c 2008-02-03 03:20:18.0 +0100
+++ qemu-altered/hw/pci.c 2008-03-01 12:59:50.0 +0100
@@ -636,6 +636,8 @@
Patch #2:
Setup code for the device
diff -Naur qemu/hw/atheros_wlan.c qemu-altered/hw/atheros_wlan.c
--- qemu/hw/atheros_wlan.c 1970-01-01 01:00:00.0 +0100
+++ qemu-altered/hw/atheros_wlan.c 2008-03-01 12:33:11.0 +0100
@@ -0,0 +1,348 @@
+/**
+ * QEMU WLAN device
Patch #3:
Setup code definitions. The 802.11 data structures, device memory, and
debugging macros.
diff -Naur qemu/hw/atheros_wlan.h qemu-altered/hw/atheros_wlan.h
--- qemu/hw/atheros_wlan.h 1970-01-01 01:00:00.0 +0100
+++ qemu-altered/hw/atheros_wlan.h 2008-03-01
Patch #4:
Virtual access point code. It is based on a message queue and a timer that
repeatedly injects the ingoing messages and replies into the queue. Outgoing
messages are parsed to extract the IP-datagram from the wireless packet and
passed on to Qemu.
There are 3 important functions
Patch #5:
The most important/difficult/ugly part: Hardware I/O. It is handled over a
direclty
mapped memory regions that is written to/read from the device driver code. Based
on ath5k and plenty of reverse engineering.
NOTE: I did NOT reimplement the hardware!! I simply handled the events as
Patch #6:
802.11 packet definitions. Code to create beacon frames, probe responses,
authentication frames, association replies, etc.
diff -Naur qemu/hw/atheros_wlan_packet.c qemu-altered/hw/atheros_wlan_packet.c
--- qemu/hw/atheros_wlan_packet.c 1970-01-01 01:00:00.0 +0100
+++
Patch #8:
CRC32 helper code. Sorry if there is already some global function that could
be used for this purpose. Simply took the code from Wireshark (license and
header documentation unchanged obviously).
diff -Naur qemu/hw/atheros_wlan_crc32.c qemu-altered/hw/atheros_wlan_crc32.c
---