Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102907
b: refs/heads/master
c: a26cbc6
h: refs/heads/master
i:
  102905: 0512ae0
  102903: 03bf4c8
v: v3
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Jun 14, 2008
1 parent 80f64cd commit db90600
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 239c249d06b0c68ae06b10d9d6ad1f8e7f39452b
refs/heads/master: a26cbc650846b74dd7f46dd877fd30c472df14a1
10 changes: 3 additions & 7 deletions trunk/drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,14 +1156,10 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
u32 word1;

/*
* Copy descriptor to the skb->cb array, this has 2 benefits:
* 1) Each descriptor word is 4 byte aligned.
* 2) Descriptor is safe from moving of frame data in rt2x00usb.
* Copy descriptor to the skbdesc->desc buffer, making it safe from moving of
* frame data in rt2x00usb.
*/
skbdesc->desc_len =
min_t(u16, entry->queue->desc_size, sizeof(entry->skb->cb));
memcpy(entry->skb->cb, rxd, skbdesc->desc_len);
skbdesc->desc = entry->skb->cb;
memcpy(skbdesc->desc, rxd, skbdesc->desc_len);
rxd = (__le32 *)skbdesc->desc;

/*
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
struct sk_buff *skb;
struct skb_frame_desc *skbdesc;
struct rxdone_entry_desc rxdesc;
u8 rxd[32];

if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) ||
!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
Expand All @@ -286,15 +287,12 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
skbdesc = get_skb_frame_desc(entry->skb);
memset(skbdesc, 0, sizeof(*skbdesc));
skbdesc->entry = entry;
skbdesc->desc = rxd;
skbdesc->desc_len = entry->queue->desc_size;

memset(&rxdesc, 0, sizeof(rxdesc));
rt2x00dev->ops->lib->fill_rxdone(entry, &rxdesc);

/*
* Trim the skb to the correct size.
*/
skb_trim(entry->skb, rxdesc.size);

/*
* Allocate a new sk buffer to replace the current one.
* If allocation fails, we should drop the current frame
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/net/wireless/rt2x00/rt73usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,14 +1428,10 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
u32 word1;

/*
* Copy descriptor to the skb->cb array, this has 2 benefits:
* 1) Each descriptor word is 4 byte aligned.
* 2) Descriptor is safe from moving of frame data in rt2x00usb.
* Copy descriptor to the skbdesc->desc buffer, making it safe from moving of
* frame data in rt2x00usb.
*/
skbdesc->desc_len =
min_t(u16, entry->queue->desc_size, sizeof(entry->skb->cb));
memcpy(entry->skb->cb, rxd, skbdesc->desc_len);
skbdesc->desc = entry->skb->cb;
memcpy(skbdesc->desc, rxd, skbdesc->desc_len);
rxd = (__le32 *)skbdesc->desc;

/*
Expand Down

0 comments on commit db90600

Please sign in to comment.