aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/dma.c13
-rw-r--r--drivers/net/wireless/b43/dma.h7
-rw-r--r--drivers/net/wireless/b43/pio.c10
-rw-r--r--drivers/net/wireless/b43/xmit.c21
-rw-r--r--drivers/net/wireless/b43/xmit.h20
5 files changed, 58 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 83cba22ac6e8..d0d9aee44a59 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -858,8 +858,17 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
858 ring->current_slot = -1; 858 ring->current_slot = -1;
859 } else { 859 } else {
860 if (ring->index == 0) { 860 if (ring->index == 0) {
861 ring->rx_buffersize = B43_DMA0_RX_BUFFERSIZE; 861 switch (dev->fw.hdr_format) {
862 ring->frameoffset = B43_DMA0_RX_FRAMEOFFSET; 862 case B43_FW_HDR_598:
863 ring->rx_buffersize = B43_DMA0_RX_FW598_BUFSIZE;
864 ring->frameoffset = B43_DMA0_RX_FW598_FO;
865 break;
866 case B43_FW_HDR_410:
867 case B43_FW_HDR_351:
868 ring->rx_buffersize = B43_DMA0_RX_FW351_BUFSIZE;
869 ring->frameoffset = B43_DMA0_RX_FW351_FO;
870 break;
871 }
863 } else 872 } else
864 B43_WARN_ON(1); 873 B43_WARN_ON(1);
865 } 874 }
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h
index cdf87094efe8..546d19cbf5d5 100644
--- a/drivers/net/wireless/b43/dma.h
+++ b/drivers/net/wireless/b43/dma.h
@@ -162,12 +162,15 @@ struct b43_dmadesc_generic {
162 162
163/* Misc DMA constants */ 163/* Misc DMA constants */
164#define B43_DMA_RINGMEMSIZE PAGE_SIZE 164#define B43_DMA_RINGMEMSIZE PAGE_SIZE
165#define B43_DMA0_RX_FRAMEOFFSET 30 165/* Offset of frame with actual data */
166#define B43_DMA0_RX_FW598_FO 38
167#define B43_DMA0_RX_FW351_FO 30
166 168
167/* DMA engine tuning knobs */ 169/* DMA engine tuning knobs */
168#define B43_TXRING_SLOTS 256 170#define B43_TXRING_SLOTS 256
169#define B43_RXRING_SLOTS 64 171#define B43_RXRING_SLOTS 64
170#define B43_DMA0_RX_BUFFERSIZE (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN) 172#define B43_DMA0_RX_FW598_BUFSIZE (B43_DMA0_RX_FW598_FO + IEEE80211_MAX_FRAME_LEN)
173#define B43_DMA0_RX_FW351_BUFSIZE (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)
171 174
172/* Pointer poison */ 175/* Pointer poison */
173#define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM)) 176#define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM))
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index 6e4228c3ed1b..ce8a4bdc7e1d 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -676,7 +676,15 @@ data_ready:
676 goto rx_error; 676 goto rx_error;
677 } 677 }
678 678
679 macstat = le32_to_cpu(rxhdr->mac_status); 679 switch (dev->fw.hdr_format) {
680 case B43_FW_HDR_598:
681 macstat = le32_to_cpu(rxhdr->format_598.mac_status);
682 break;
683 case B43_FW_HDR_410:
684 case B43_FW_HDR_351:
685 macstat = le32_to_cpu(rxhdr->format_351.mac_status);
686 break;
687 }
680 if (macstat & B43_RX_MAC_FCSERR) { 688 if (macstat & B43_RX_MAC_FCSERR) {
681 if (!(q->dev->wl->filter_flags & FIF_FCSFAIL)) { 689 if (!(q->dev->wl->filter_flags & FIF_FCSFAIL)) {
682 /* Drop frames with failed FCS. */ 690 /* Drop frames with failed FCS. */
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index b02170d6614a..5b8240935fa9 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -653,8 +653,9 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
653 struct ieee80211_hdr *wlhdr; 653 struct ieee80211_hdr *wlhdr;
654 const struct b43_rxhdr_fw4 *rxhdr = _rxhdr; 654 const struct b43_rxhdr_fw4 *rxhdr = _rxhdr;
655 __le16 fctl; 655 __le16 fctl;
656 u16 phystat0, phystat3, chanstat, mactime; 656 u16 phystat0, phystat3;
657 u32 macstat; 657 u16 uninitialized_var(chanstat), uninitialized_var(mactime);
658 u32 uninitialized_var(macstat);
658 u16 chanid; 659 u16 chanid;
659 u16 phytype; 660 u16 phytype;
660 int padding; 661 int padding;
@@ -664,9 +665,19 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
664 /* Get metadata about the frame from the header. */ 665 /* Get metadata about the frame from the header. */
665 phystat0 = le16_to_cpu(rxhdr->phy_status0); 666 phystat0 = le16_to_cpu(rxhdr->phy_status0);
666 phystat3 = le16_to_cpu(rxhdr->phy_status3); 667 phystat3 = le16_to_cpu(rxhdr->phy_status3);
667 macstat = le32_to_cpu(rxhdr->mac_status); 668 switch (dev->fw.hdr_format) {
668 mactime = le16_to_cpu(rxhdr->mac_time); 669 case B43_FW_HDR_598:
669 chanstat = le16_to_cpu(rxhdr->channel); 670 macstat = le32_to_cpu(rxhdr->format_598.mac_status);
671 mactime = le16_to_cpu(rxhdr->format_598.mac_time);
672 chanstat = le16_to_cpu(rxhdr->format_598.channel);
673 break;
674 case B43_FW_HDR_410:
675 case B43_FW_HDR_351:
676 macstat = le32_to_cpu(rxhdr->format_351.mac_status);
677 mactime = le16_to_cpu(rxhdr->format_351.mac_time);
678 chanstat = le16_to_cpu(rxhdr->format_351.channel);
679 break;
680 }
670 phytype = chanstat & B43_RX_CHAN_PHYTYPE; 681 phytype = chanstat & B43_RX_CHAN_PHYTYPE;
671 682
672 if (unlikely(macstat & B43_RX_MAC_FCSERR)) { 683 if (unlikely(macstat & B43_RX_MAC_FCSERR)) {
diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h
index dccf7c1b20a3..f6e8bc436d5a 100644
--- a/drivers/net/wireless/b43/xmit.h
+++ b/drivers/net/wireless/b43/xmit.h
@@ -250,9 +250,23 @@ struct b43_rxhdr_fw4 {
250 } __packed; 250 } __packed;
251 __le16 phy_status2; /* PHY RX Status 2 */ 251 __le16 phy_status2; /* PHY RX Status 2 */
252 __le16 phy_status3; /* PHY RX Status 3 */ 252 __le16 phy_status3; /* PHY RX Status 3 */
253 __le32 mac_status; /* MAC RX status */ 253 union {
254 __le16 mac_time; 254 /* Tested with 598.314, 644.1001 and 666.2 */
255 __le16 channel; 255 struct {
256 __le16 phy_status4; /* PHY RX Status 4 */
257 __le16 phy_status5; /* PHY RX Status 5 */
258 __le32 mac_status; /* MAC RX status */
259 __le16 mac_time;
260 __le16 channel;
261 } format_598 __packed;
262
263 /* Tested with 351.126, 410.2160, 478.104 and 508.* */
264 struct {
265 __le32 mac_status; /* MAC RX status */
266 __le16 mac_time;
267 __le16 channel;
268 } format_351 __packed;
269 } __packed;
256} __packed; 270} __packed;
257 271
258/* PHY RX Status 0 */ 272/* PHY RX Status 0 */