I realized this patch might be against too old a code base to be include.
But hopefully someone else in the same shoe can benefit from this too.
I will write separate email for the pkt too short errors.
Cheers.
Jun
This patch enables Airlink 101 (AWLL3026) run on a MMU-less ARM7 board.
*. Allow AL2230S RF to use the same code as AL2230 RF chip.
*. Fix unaligned put in ieee80211_tx.
*. Shift skb by 1 byte so that IP packat is aligned
There are still tons of pkt too short and frame errors, though overall
it is functioning.
Signed-off-by: Jun Sun <[EMAIL PROTECTED]>
diff -Nru linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf.c.orig
linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf.c
--- linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf.c.orig
2007-04-25 20:08:32.000000000 -0700
+++ linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf.c
2007-12-03 20:40:44.000000000 -0800
@@ -72,6 +72,7 @@
return r;
break;
case AL2230_RF:
+ case AL2230S_RF:
r = zd_rf_init_al2230(rf);
if (r)
return r;
diff -Nru
linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf_al2230.c.orig
linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
--- linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf_al2230.c.orig
2007-04-25 20:08:32.000000000 -0700
+++ linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
2007-12-03 20:41:21.000000000 -0800
@@ -358,12 +358,6 @@
{
struct zd_chip *chip = zd_rf_to_chip(rf);
- if (chip->al2230s_bit) {
- dev_err(zd_chip_dev(chip), "AL2230S devices are not yet "
- "supported by this driver.\n");
- return -ENODEV;
- }
-
rf->switch_radio_off = al2230_switch_radio_off;
if (chip->is_zd1211b) {
rf->init_hw = zd1211b_al2230_init_hw;
diff -Nru linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_mac.c.orig
linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_mac.c
--- linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_mac.c.orig
2007-04-25 20:08:32.000000000 -0700
+++ linux-2.6.21-wifi-cleanup/drivers/net/wireless/zd1211rw/zd_mac.c
2007-12-03 20:43:01.000000000 -0800
@@ -1166,14 +1166,14 @@
{
struct sk_buff *skb;
- skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length);
+ skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length + 1);
if (!skb) {
struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n");
ieee->stats.rx_dropped++;
return -ENOMEM;
}
- skb_reserve(skb, sizeof(struct zd_rt_hdr));
+ skb_reserve(skb, sizeof(struct zd_rt_hdr)+1);
memcpy(__skb_put(skb, length), buffer, length);
skb_queue_tail(&mac->rx_queue, skb);
tasklet_schedule(&mac->rx_tasklet);
diff -Nru linux-2.6.21-wifi-cleanup/net/ieee80211/ieee80211_tx.c.orig
linux-2.6.21-wifi-cleanup/net/ieee80211/ieee80211_tx.c
--- linux-2.6.21-wifi-cleanup/net/ieee80211/ieee80211_tx.c.orig 2007-04-25
20:08:32.000000000 -0700
+++ linux-2.6.21-wifi-cleanup/net/ieee80211/ieee80211_tx.c 2007-12-03
20:44:33.000000000 -0800
@@ -40,6 +40,7 @@
#include <linux/wireless.h>
#include <linux/etherdevice.h>
#include <asm/uaccess.h>
+#include <asm/unaligned.h>
#include <net/ieee80211.h>
@@ -144,7 +145,8 @@
snap->oui[1] = oui[1];
snap->oui[2] = oui[2];
- *(u16 *) (data + SNAP_SIZE) = htons(h_proto);
+ // *(u16 *) (data + SNAP_SIZE) = htons(h_proto);
+ put_unaligned(htons(h_proto), (u16*)(data + SNAP_SIZE));
return SNAP_SIZE + sizeof(u16);
}
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs