Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79411
b: refs/heads/master
c: 40561b8
h: refs/heads/master
i:
  79409: fe5bd65
  79407: 9b90bb6
v: v3
  • Loading branch information
Ivo van Doorn authored and David S. Miller committed Jan 28, 2008
1 parent 79787c7 commit 9a534b9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 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: dd0d43ea0bbd4c4554b13d4a5d282f9c4d1b5591
refs/heads/master: 40561b8426c27f187e2ae496ed603e7c4e3ab818
9 changes: 3 additions & 6 deletions trunk/drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,16 +1139,13 @@ static void rt2500usb_fill_rxdone(struct data_entry *entry,
desc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
desc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS);

/*
* Trim the skb to clear the descriptor area.
*/
skb_pull(entry->skb, entry->ring->desc_size);

/*
* Set descriptor and data pointer.
*/
skbdesc->desc = entry->skb->data + skbdesc->data_len;
skbdesc->desc = entry->skb->data + desc->size;
skbdesc->desc_len = entry->ring->desc_size;
skbdesc->data = entry->skb->data;
skbdesc->data_len = desc->size;
}

/*
Expand Down
25 changes: 15 additions & 10 deletions trunk/drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
if (urb->actual_length < entry->ring->desc_size || urb->status)
goto skip_entry;

/*
* Fill in skb descriptor
*/
skbdesc = get_skb_desc(entry->skb);
skbdesc->ring = ring;
skbdesc->entry = entry;

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

Expand All @@ -283,9 +290,6 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
/*
* The data behind the ieee80211 header must be
* aligned on a 4 byte boundary.
* After that trim the entire buffer down to only
* contain the valid frame data excluding the device
* descriptor.
*/
hdr = (struct ieee80211_hdr *)entry->skb->data;
header_size =
Expand All @@ -295,16 +299,17 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
skb_push(entry->skb, 2);
memmove(entry->skb->data, entry->skb->data + 2, skb->len - 2);
}
skb_trim(entry->skb, desc.size);

/*
* Fill in skb descriptor
* Trim the entire buffer down to only contain the valid frame data
* excluding the device descriptor. The position of the descriptor
* varies. This means that we should check where the descriptor is
* and decide if we need to pull the data pointer to exclude the
* device descriptor.
*/
skbdesc = get_skb_desc(entry->skb);
skbdesc->desc_len = entry->ring->desc_size;
skbdesc->data_len = entry->skb->len;
skbdesc->ring = ring;
skbdesc->entry = entry;
if (skbdesc->data > skbdesc->desc)
skb_pull(entry->skb, skbdesc->desc_len);
skb_trim(entry->skb, desc.size);

/*
* Send the frame to rt2x00lib for further processing.
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/net/wireless/rt2x00/rt73usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,16 +1397,13 @@ static void rt73usb_fill_rxdone(struct data_entry *entry,
desc->size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
desc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS);

/*
* Pull the skb to clear the descriptor area.
*/
skb_pull(entry->skb, entry->ring->desc_size);

/*
* Set descriptor and data pointer.
*/
skbdesc->desc = entry->skb->data - skbdesc->desc_len;
skbdesc->data = entry->skb->data;
skbdesc->desc = entry->skb->data;
skbdesc->desc_len = entry->ring->desc_size;
skbdesc->data = entry->skb->data + entry->ring->desc_size;
skbdesc->data_len = desc->size;
}

/*
Expand Down

0 comments on commit 9a534b9

Please sign in to comment.