aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/p54/p54usb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 17f89c7eb098..c44a200059d2 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -301,6 +301,8 @@ static void p54u_tx_net2280(struct ieee80211_hw *dev, struct sk_buff *skb)
301 struct net2280_tx_hdr *hdr; 301 struct net2280_tx_hdr *hdr;
302 struct net2280_reg_write *reg; 302 struct net2280_reg_write *reg;
303 int err = 0; 303 int err = 0;
304 __le32 addr = ((struct p54_hdr *) skb->data)->req_id;
305 __le16 len = cpu_to_le16(skb->len);
304 306
305 reg = kmalloc(sizeof(*reg), GFP_ATOMIC); 307 reg = kmalloc(sizeof(*reg), GFP_ATOMIC);
306 if (!reg) 308 if (!reg)
@@ -325,8 +327,8 @@ static void p54u_tx_net2280(struct ieee80211_hw *dev, struct sk_buff *skb)
325 327
326 hdr = (void *)skb_push(skb, sizeof(*hdr)); 328 hdr = (void *)skb_push(skb, sizeof(*hdr));
327 memset(hdr, 0, sizeof(*hdr)); 329 memset(hdr, 0, sizeof(*hdr));
328 hdr->device_addr = ((struct p54_hdr *)skb->data)->req_id; 330 hdr->len = len;
329 hdr->len = cpu_to_le16(skb->len + sizeof(struct p54_hdr)); 331 hdr->device_addr = addr;
330 332
331 usb_fill_bulk_urb(int_urb, priv->udev, 333 usb_fill_bulk_urb(int_urb, priv->udev,
332 usb_sndbulkpipe(priv->udev, P54U_PIPE_DEV), reg, sizeof(*reg), 334 usb_sndbulkpipe(priv->udev, P54U_PIPE_DEV), reg, sizeof(*reg),