Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277110
b: refs/heads/master
c: 0900951
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and John W. Linville committed Jan 3, 2012
1 parent ac8c179 commit 95233f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: b25bfda38236f349cde0d1b28952f4eea2148d3f
refs/heads/master: 09009512e5e7ab341b1554a256f81dd512c1f4bf
16 changes: 13 additions & 3 deletions trunk/drivers/net/wireless/b43/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,19 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
const char *err_msg = NULL;
struct b43_rxhdr_fw4 *rxhdr =
(struct b43_rxhdr_fw4 *)wl->pio_scratchspace;
size_t rxhdr_size = sizeof(*rxhdr);

BUILD_BUG_ON(sizeof(wl->pio_scratchspace) < sizeof(*rxhdr));
memset(rxhdr, 0, sizeof(*rxhdr));
switch (dev->fw.hdr_format) {
case B43_FW_HDR_410:
case B43_FW_HDR_351:
rxhdr_size -= sizeof(rxhdr->format_598) -
sizeof(rxhdr->format_351);
break;
case B43_FW_HDR_598:
break;
}
memset(rxhdr, 0, rxhdr_size);

/* Check if we have data and wait for it to get ready. */
if (q->rev >= 8) {
Expand Down Expand Up @@ -657,11 +667,11 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)

/* Get the preamble (RX header) */
if (q->rev >= 8) {
b43_block_read(dev, rxhdr, sizeof(*rxhdr),
b43_block_read(dev, rxhdr, rxhdr_size,
q->mmio_base + B43_PIO8_RXDATA,
sizeof(u32));
} else {
b43_block_read(dev, rxhdr, sizeof(*rxhdr),
b43_block_read(dev, rxhdr, rxhdr_size,
q->mmio_base + B43_PIO_RXDATA,
sizeof(u16));
}
Expand Down

0 comments on commit 95233f4

Please sign in to comment.