* Shaddy Baddah | 2008-10-25 19:54:19 [+1100]: > [ 282.300681] Kernel unaligned access at TPC[10129b68] > zd_mac_rx+0x144/0x32c [zd1211rw] > > periodically is reported even after the ifconfig command completes > (seemingly successfully). > > Thanks in advance for your assistance, Could you try this patch: >From a46436536ab13926ff3f592cfa3c333e06a99a0a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <sebastian@xxxxxxxxxxxxx> Date: Sat, 25 Oct 2008 13:15:14 +0200 Subject: [PATCH] wireless/zd1211rw: use get_unaligned_le16 helper Signed-off-by: Sebastian Andrzej Siewior <sebastian@xxxxxxxxxxxxx> --- drivers/net/wireless/zd1211rw/zd_mac.c | 5 +++-- drivers/net/wireless/zd1211rw/zd_usb.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 4d7b98b..bf4b4a4 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c @@ -25,6 +25,7 @@ #include <linux/usb.h> #include <linux/jiffies.h> #include <net/ieee80211_radiotap.h> +#include <asm/unaligned.h> #include "zd_def.h" #include "zd_chip.h" @@ -662,7 +663,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) && !mac->pass_ctrl) return 0; - fc = *(__le16 *)buffer; + fc = get_unaligned_le32(buffer); need_padding = ieee80211_is_data_qos(fc) ^ ieee80211_has_a4(fc); skb = dev_alloc_skb(length + (need_padding ? 2 : 0)); @@ -758,7 +759,7 @@ void zd_process_intr(struct work_struct *work) u16 int_status; struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); - int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4)); + int_status = get_unaligned_le16(mac->intr_buffer+4); if (int_status & INT_CFG_NEXT_BCN) { if (net_ratelimit()) dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index a60ae86..0b27778 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c @@ -355,7 +355,7 @@ static inline void handle_regs_int(struct urb *urb) ZD_ASSERT(in_interrupt()); spin_lock(&intr->lock); - int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2)); + int_num = get_unaligned_le16(urb->transfer_buffer+2); if (int_num == CR_INTERRUPT) { struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context)); memcpy(&mac->intr_buffer, urb->transfer_buffer, -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html