mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 00:59:06 +00:00
b43: fix regression in PIO case
This patch fixes the regression, introduced by
commit 17030f48e3
From: Rafał Miłecki <zajec5@gmail.com>
Date: Thu, 11 Aug 2011 17:16:27 +0200
Subject: [PATCH] b43: support new RX header, noticed to be used in 598.314+ fw
in PIO case.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b25bfda382
commit
09009512e5
1 changed files with 13 additions and 3 deletions
|
@ -617,9 +617,19 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
|
||||||
const char *err_msg = NULL;
|
const char *err_msg = NULL;
|
||||||
struct b43_rxhdr_fw4 *rxhdr =
|
struct b43_rxhdr_fw4 *rxhdr =
|
||||||
(struct b43_rxhdr_fw4 *)wl->pio_scratchspace;
|
(struct b43_rxhdr_fw4 *)wl->pio_scratchspace;
|
||||||
|
size_t rxhdr_size = sizeof(*rxhdr);
|
||||||
|
|
||||||
BUILD_BUG_ON(sizeof(wl->pio_scratchspace) < 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. */
|
/* Check if we have data and wait for it to get ready. */
|
||||||
if (q->rev >= 8) {
|
if (q->rev >= 8) {
|
||||||
|
@ -657,11 +667,11 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
|
||||||
|
|
||||||
/* Get the preamble (RX header) */
|
/* Get the preamble (RX header) */
|
||||||
if (q->rev >= 8) {
|
if (q->rev >= 8) {
|
||||||
b43_block_read(dev, rxhdr, sizeof(*rxhdr),
|
b43_block_read(dev, rxhdr, rxhdr_size,
|
||||||
q->mmio_base + B43_PIO8_RXDATA,
|
q->mmio_base + B43_PIO8_RXDATA,
|
||||||
sizeof(u32));
|
sizeof(u32));
|
||||||
} else {
|
} else {
|
||||||
b43_block_read(dev, rxhdr, sizeof(*rxhdr),
|
b43_block_read(dev, rxhdr, rxhdr_size,
|
||||||
q->mmio_base + B43_PIO_RXDATA,
|
q->mmio_base + B43_PIO_RXDATA,
|
||||||
sizeof(u16));
|
sizeof(u16));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue