[PATCH] libertas: more endianness fixes, in tx.c this time
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 26 May 2007 03:39:34 +0000 (23:39 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 18:28:45 +0000 (14:28 -0400)
Now we finally get connectivity. For a while, before something else dies...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/tx.c

index 10d1db0ab3a660ce29bb8d672c7def7c986cc824..17c437635a00845932231337c5d8aac1a00a89cf 100644 (file)
@@ -110,7 +110,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
                /* skip the radiotap header */
                p802x_hdr += sizeof(struct tx_radiotap_hdr);
                plocaltxpd->tx_packet_length =
-                       cpu_to_le32(le32_to_cpu(plocaltxpd->tx_packet_length)
+                       cpu_to_le16(le16_to_cpu(plocaltxpd->tx_packet_length)
                                    - sizeof(struct tx_radiotap_hdr));
 
        }
@@ -130,11 +130,11 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
 
        ptr += sizeof(struct txpd);
 
-       lbs_dbg_hex("Tx Data", (u8 *) p802x_hdr, le32_to_cpu(plocaltxpd->tx_packet_length));
-       memcpy(ptr, p802x_hdr, le32_to_cpu(plocaltxpd->tx_packet_length));
+       lbs_dbg_hex("Tx Data", (u8 *) p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length));
+       memcpy(ptr, p802x_hdr, le16_to_cpu(plocaltxpd->tx_packet_length));
        ret = priv->hw_host_to_card(priv, MVMS_DAT,
                                    priv->adapter->tmptxbuf,
-                                   le32_to_cpu(plocaltxpd->tx_packet_length) +
+                                   le16_to_cpu(plocaltxpd->tx_packet_length) +
                                    sizeof(struct txpd));
 
        if (ret) {