diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-01-20 17:11:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-23 15:38:35 -0500 |
commit | b4068a80492022848c11123bf485aff5c902c583 (patch) | |
tree | 1481ac7b4e80ca4b6a92c83604dedaeb84210288 /drivers/net/wireless | |
parent | c64d2a9afbccd0aecb122d108770a407fe7b7e3f (diff) |
p54usb: fix packet loss with first generation devices
Artur Skawina confirmed that the first generation devices needs the same
URB_ZERO_PACKET flag, in oder to finish the pending transfer properly.
The second generation has been successfully fixed by
"p54usb: fix random traffic stalls (LM87)" (43af18f06d5)
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/p54/p54usb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 4487cc5c928b..5de2ebfb28c7 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -229,6 +229,8 @@ static void p54u_tx_3887(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
229 | usb_sndbulkpipe(priv->udev, P54U_PIPE_DATA), | 229 | usb_sndbulkpipe(priv->udev, P54U_PIPE_DATA), |
230 | skb->data, skb->len, FREE_AFTER_TX(skb) ? | 230 | skb->data, skb->len, FREE_AFTER_TX(skb) ? |
231 | p54u_tx_cb : p54u_tx_dummy_cb, skb); | 231 | p54u_tx_cb : p54u_tx_dummy_cb, skb); |
232 | addr_urb->transfer_flags |= URB_ZERO_PACKET; | ||
233 | data_urb->transfer_flags |= URB_ZERO_PACKET; | ||
232 | 234 | ||
233 | usb_anchor_urb(addr_urb, &priv->submitted); | 235 | usb_anchor_urb(addr_urb, &priv->submitted); |
234 | err = usb_submit_urb(addr_urb, GFP_ATOMIC); | 236 | err = usb_submit_urb(addr_urb, GFP_ATOMIC); |
@@ -237,7 +239,7 @@ static void p54u_tx_3887(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
237 | goto out; | 239 | goto out; |
238 | } | 240 | } |
239 | 241 | ||
240 | usb_anchor_urb(addr_urb, &priv->submitted); | 242 | usb_anchor_urb(data_urb, &priv->submitted); |
241 | err = usb_submit_urb(data_urb, GFP_ATOMIC); | 243 | err = usb_submit_urb(data_urb, GFP_ATOMIC); |
242 | if (err) | 244 | if (err) |
243 | usb_unanchor_urb(data_urb); | 245 | usb_unanchor_urb(data_urb); |
@@ -332,12 +334,13 @@ static void p54u_tx_net2280(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
332 | * free what's inside the transfer_buffer after the callback routine | 334 | * free what's inside the transfer_buffer after the callback routine |
333 | * has completed. | 335 | * has completed. |
334 | */ | 336 | */ |
335 | int_urb->transfer_flags |= URB_FREE_BUFFER; | 337 | int_urb->transfer_flags |= URB_FREE_BUFFER | URB_ZERO_PACKET; |
336 | 338 | ||
337 | usb_fill_bulk_urb(data_urb, priv->udev, | 339 | usb_fill_bulk_urb(data_urb, priv->udev, |
338 | usb_sndbulkpipe(priv->udev, P54U_PIPE_DATA), | 340 | usb_sndbulkpipe(priv->udev, P54U_PIPE_DATA), |
339 | hdr, skb->len + sizeof(*hdr), FREE_AFTER_TX(skb) ? | 341 | hdr, skb->len + sizeof(*hdr), FREE_AFTER_TX(skb) ? |
340 | p54u_tx_cb : p54u_tx_dummy_cb, skb); | 342 | p54u_tx_cb : p54u_tx_dummy_cb, skb); |
343 | data_urb->transfer_flags |= URB_ZERO_PACKET; | ||
341 | 344 | ||
342 | usb_anchor_urb(int_urb, &priv->submitted); | 345 | usb_anchor_urb(int_urb, &priv->submitted); |
343 | err = usb_submit_urb(int_urb, GFP_ATOMIC); | 346 | err = usb_submit_urb(int_urb, GFP_ATOMIC); |