aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
authorWolfgang Kufner <wolfgang.kufner@gmail.com>2010-12-13 06:39:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:36 -0500
commit739fd9405416e22732e46a9226a8cac379bd57fc (patch)
tree6a0e4652fdce359f5bc573ef843785a90bb87196 /drivers/net/wireless/rt2x00/rt73usb.c
parente85b4c04646f7fa62ebf0afe11cd8dffde689da7 (diff)
rt2x00: Pad beacon to multiple of 32 bits.
Pad beacon to a multiple of 32 bits in preparation for the change from memcpy_toio() to __iowrite32_copy() in register_multiwrite(). Signed-off-by: Wolfgang Kufner <wolfgang.kufner@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 0b3959bdd3eb..0b4e8590cbb7 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1546,6 +1546,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry,
1546{ 1546{
1547 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 1547 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
1548 unsigned int beacon_base; 1548 unsigned int beacon_base;
1549 unsigned int padding_len;
1549 u32 reg; 1550 u32 reg;
1550 1551
1551 /* 1552 /*
@@ -1573,11 +1574,13 @@ static void rt73usb_write_beacon(struct queue_entry *entry,
1573 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb); 1574 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
1574 1575
1575 /* 1576 /*
1576 * Write entire beacon with descriptor to register. 1577 * Write entire beacon with descriptor and padding to register.
1577 */ 1578 */
1579 padding_len = roundup(entry->skb->len, 4) - entry->skb->len;
1580 skb_pad(entry->skb, padding_len);
1578 beacon_base = HW_BEACON_OFFSET(entry->entry_idx); 1581 beacon_base = HW_BEACON_OFFSET(entry->entry_idx);
1579 rt2x00usb_register_multiwrite(rt2x00dev, beacon_base, 1582 rt2x00usb_register_multiwrite(rt2x00dev, beacon_base, entry->skb->data,
1580 entry->skb->data, entry->skb->len); 1583 entry->skb->len + padding_len);
1581 1584
1582 /* 1585 /*
1583 * Enable beaconing again. 1586 * Enable beaconing again.