This is a note to let you know that I've just added the patch titled

    ath9k_htc: Fix an endian issue

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ath9k_htc-fix-an-endian-issue.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 2c27392dc4d4f5ee8a3967a520b8f6cac0418031 Mon Sep 17 00:00:00 2001
From: Sujith Manoharan <[email protected]>
Date: Sun, 27 Feb 2011 09:23:52 +0530
Subject: ath9k_htc: Fix an endian issue

From: Sujith Manoharan <[email protected]>

commit 2c27392dc4d4f5ee8a3967a520b8f6cac0418031 upstream.

The stream length/tag fields have to be in little endian
format. Fixing this makes the driver work on big-endian
platforms.

Tested-by: [email protected]
Signed-off-by: Sujith Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/wireless/ath/ath9k/hif_usb.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -210,8 +210,9 @@ static int __hif_usb_tx(struct hif_devic
        struct tx_buf *tx_buf = NULL;
        struct sk_buff *nskb = NULL;
        int ret = 0, i;
-       u16 *hdr, tx_skb_cnt = 0;
+       u16 tx_skb_cnt = 0;
        u8 *buf;
+       __le16 *hdr;
 
        if (hif_dev->tx.tx_skb_cnt == 0)
                return 0;
@@ -236,9 +237,9 @@ static int __hif_usb_tx(struct hif_devic
 
                buf = tx_buf->buf;
                buf += tx_buf->offset;
-               hdr = (u16 *)buf;
-               *hdr++ = nskb->len;
-               *hdr++ = ATH_USB_TX_STREAM_MODE_TAG;
+               hdr = (__le16 *)buf;
+               *hdr++ = cpu_to_le16(nskb->len);
+               *hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
                buf += 4;
                memcpy(buf, nskb->data, nskb->len);
                tx_buf->len = nskb->len + 4;


Patches currently in stable-queue which might be from 
[email protected] are

queue-2.6.37/ath9k_htc-fix-an-endian-issue.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to