aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/p54usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/p54/p54usb.c')
-rw-r--r--drivers/net/wireless/p54/p54usb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index e9630b949256..2dd3cd41d0fe 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -244,13 +244,13 @@ static void p54u_tx_3887(struct ieee80211_hw *dev, struct sk_buff *skb,
244 usb_submit_urb(data_urb, GFP_ATOMIC); 244 usb_submit_urb(data_urb, GFP_ATOMIC);
245} 245}
246 246
247static __le32 p54u_lm87_chksum(const u32 *data, size_t length) 247static __le32 p54u_lm87_chksum(const __le32 *data, size_t length)
248{ 248{
249 u32 chk = 0; 249 u32 chk = 0;
250 250
251 length >>= 2; 251 length >>= 2;
252 while (length--) { 252 while (length--) {
253 chk ^= *data++; 253 chk ^= le32_to_cpu(*data++);
254 chk = (chk >> 5) ^ (chk << 3); 254 chk = (chk >> 5) ^ (chk << 3);
255 } 255 }
256 256
@@ -270,7 +270,7 @@ static void p54u_tx_lm87(struct ieee80211_hw *dev, struct sk_buff *skb,
270 if (!data_urb) 270 if (!data_urb)
271 return; 271 return;
272 272
273 checksum = p54u_lm87_chksum((u32 *)skb->data, skb->len); 273 checksum = p54u_lm87_chksum((__le32 *)skb->data, skb->len);
274 hdr = (struct lm87_tx_hdr *)skb_push(skb, sizeof(*hdr)); 274 hdr = (struct lm87_tx_hdr *)skb_push(skb, sizeof(*hdr));
275 hdr->chksum = checksum; 275 hdr->chksum = checksum;
276 hdr->device_addr = addr; 276 hdr->device_addr = addr;