Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90160
b: refs/heads/master
c: 2ae2385
h: refs/heads/master
v: v3
  • Loading branch information
Mattias Nissler authored and John W. Linville committed Mar 13, 2008
1 parent 8c08e41 commit 16b18ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 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: 2d1be5b0d17134ddba65c752557b1f47c8009db2
refs/heads/master: 2ae23854dc0af617d9a0e3ab51a0cc51485ebbf2
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,13 +1123,10 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,

/*
* Copy descriptor to the available headroom inside the skbuffer.
* Remove the original copy by trimming the skbuffer.
*/
skb_push(entry->skb, offset);
memcpy(entry->skb->data, rxd, entry->queue->desc_size);
rxd = (__le32 *)entry->skb->data;
skb_pull(entry->skb, offset);
skb_trim(entry->skb, rxdesc->size);

/*
* The descriptor is now aligned to 4 bytes and thus it is
Expand All @@ -1154,12 +1151,18 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
rxdesc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS);

/*
* Adjust the skb memory window to the frame boundaries.
*/
skb_pull(entry->skb, offset);
skb_trim(entry->skb, rxdesc->size);

/*
* Set descriptor and data pointer.
*/
skbdesc->data = entry->skb->data;
skbdesc->data_len = rxdesc->size;
skbdesc->desc = entry->skb->data - offset;
skbdesc->desc = rxd;
skbdesc->desc_len = entry->queue->desc_size;
}

Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/rt2x00/rt73usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,13 +1376,10 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,

/*
* Copy descriptor to the available headroom inside the skbuffer.
* Remove the original copy by pulling the skbuffer.
*/
skb_push(entry->skb, offset);
memcpy(entry->skb->data, rxd, entry->queue->desc_size);
rxd = (__le32 *)entry->skb->data;
skb_pull(entry->skb, offset + entry->queue->desc_size);
skb_trim(entry->skb, rxdesc->size);

/*
* The descriptor is now aligned to 4 bytes and thus it is
Expand All @@ -1404,12 +1401,18 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
rxdesc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
rxdesc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS);

/*
* Adjust the skb memory window to the frame boundaries.
*/
skb_pull(entry->skb, offset + entry->queue->desc_size);
skb_trim(entry->skb, rxdesc->size);

/*
* Set descriptor and data pointer.
*/
skbdesc->data = entry->skb->data;
skbdesc->data_len = rxdesc->size;
skbdesc->desc = entry->skb->data - offset;
skbdesc->desc = rxd;
skbdesc->desc_len = entry->queue->desc_size;
}

Expand Down

0 comments on commit 16b18ef

Please sign in to comment.