Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107099
b: refs/heads/master
c: b93ce43
h: refs/heads/master
i:
  107097: a956e93
  107095: 3415e80
v: v3
  • Loading branch information
Iwo Mergler authored and John W. Linville committed Jul 29, 2008
1 parent 3a582b4 commit 8ba5434
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e0c1abe748a30bc705a55f71bca8e04a83820f1
refs/heads/master: b93ce437eba7e0232683326f30d9d1167a872fad
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,7 @@ static void rt2500usb_write_beacon(struct queue_entry *entry)
int pipe = usb_sndbulkpipe(usb_dev, 1);
int length;
u16 reg;
u32 word, len;

/*
* Add the descriptor in front of the skb.
Expand All @@ -1129,6 +1130,17 @@ static void rt2500usb_write_beacon(struct queue_entry *entry)
memcpy(entry->skb->data, skbdesc->desc, skbdesc->desc_len);
skbdesc->desc = entry->skb->data;

/*
* Adjust the beacon databyte count. The current number is
* calculated before this function gets called, but falsely
* assumes that the descriptor was already present in the SKB.
*/
rt2x00_desc_read(skbdesc->desc, 0, &word);
len = rt2x00_get_field32(word, TXD_W0_DATABYTE_COUNT);
len += skbdesc->desc_len;
rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, len);
rt2x00_desc_write(skbdesc->desc, 0, word);

/*
* Disable beaconing while we are reloading the beacon data,
* otherwise we might be sending out invalid data.
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt73usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
unsigned int beacon_base;
u32 reg;
u32 word, len;

/*
* Add the descriptor in front of the skb.
Expand All @@ -1338,6 +1339,17 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
memcpy(entry->skb->data, skbdesc->desc, skbdesc->desc_len);
skbdesc->desc = entry->skb->data;

/*
* Adjust the beacon databyte count. The current number is
* calculated before this function gets called, but falsely
* assumes that the descriptor was already present in the SKB.
*/
rt2x00_desc_read(skbdesc->desc, 0, &word);
len = rt2x00_get_field32(word, TXD_W0_DATABYTE_COUNT);
len += skbdesc->desc_len;
rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, len);
rt2x00_desc_write(skbdesc->desc, 0, word);

/*
* Disable beaconing while we are reloading the beacon data,
* otherwise we might be sending out invalid data.
Expand Down

0 comments on commit 8ba5434

Please sign in to comment.