aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c12
2 files changed, 24 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 */
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index fc320c0409db..866504612e8a 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1330,6 +1330,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
1330 struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); 1330 struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
1331 unsigned int beacon_base; 1331 unsigned int beacon_base;
1332 u32 reg; 1332 u32 reg;
1333 u32 word, len;
1333 1334
1334 /* 1335 /*
1335 * Add the descriptor in front of the skb. 1336 * Add the descriptor in front of the skb.
@@ -1339,6 +1340,17 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
1339 skbdesc->desc = entry->skb->data; 1340 skbdesc->desc = entry->skb->data;
1340 1341
1341 /* 1342 /*
1343 * Adjust the beacon databyte count. The current number is
1344 * calculated before this function gets called, but falsely
1345 * assumes that the descriptor was already present in the SKB.
1346 */
1347 rt2x00_desc_read(skbdesc->desc, 0, &word);
1348 len = rt2x00_get_field32(word, TXD_W0_DATABYTE_COUNT);
1349 len += skbdesc->desc_len;
1350 rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, len);
1351 rt2x00_desc_write(skbdesc->desc, 0, word);
1352
1353 /*
1342 * Disable beaconing while we are reloading the beacon data, 1354 * Disable beaconing while we are reloading the beacon data,
1343 * otherwise we might be sending out invalid data. 1355 * otherwise we might be sending out invalid data.
1344 */ 1356 */