diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 449c8d393484..3078417b326b 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1121,6 +1121,7 @@ static void rt2500usb_write_beacon(struct queue_entry *entry) | |||
1121 | int pipe = usb_sndbulkpipe(usb_dev, 1); | 1121 | int pipe = usb_sndbulkpipe(usb_dev, 1); |
1122 | int length; | 1122 | int length; |
1123 | u16 reg; | 1123 | u16 reg; |
1124 | u32 word, len; | ||
1124 | 1125 | ||
1125 | /* | 1126 | /* |
1126 | * Add the descriptor in front of the skb. | 1127 | * Add the descriptor in front of the skb. |
@@ -1130,6 +1131,17 @@ static void rt2500usb_write_beacon(struct queue_entry *entry) | |||
1130 | skbdesc->desc = entry->skb->data; | 1131 | skbdesc->desc = entry->skb->data; |
1131 | 1132 | ||
1132 | /* | 1133 | /* |
1134 | * Adjust the beacon databyte count. The current number is | ||
1135 | * calculated before this function gets called, but falsely | ||
1136 | * assumes that the descriptor was already present in the SKB. | ||
1137 | */ | ||
1138 | rt2x00_desc_read(skbdesc->desc, 0, &word); | ||
1139 | len = rt2x00_get_field32(word, TXD_W0_DATABYTE_COUNT); | ||
1140 | len += skbdesc->desc_len; | ||
1141 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, len); | ||
1142 | rt2x00_desc_write(skbdesc->desc, 0, word); | ||
1143 | |||
1144 | /* | ||
1133 | * Disable beaconing while we are reloading the beacon data, | 1145 | * Disable beaconing while we are reloading the beacon data, |
1134 | * otherwise we might be sending out invalid data. | 1146 | * otherwise we might be sending out invalid data. |
1135 | */ | 1147 | */ |