aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/xmit.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-08-11 11:16:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-22 14:45:59 -0400
commit17030f48e31adde5b043741c91ba143f5f7db0fd (patch)
tree2a3ad5748e949da0dcbdfe9139db82030f809969 /drivers/net/wireless/b43/xmit.c
parent5d852905561a979dfb4d8a68f7313dcb8f055bec (diff)
b43: support new RX header, noticed to be used in 598.314+ fw
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/xmit.c')
-rw-r--r--drivers/net/wireless/b43/xmit.c21
1 files changed, 16 insertions, 5 deletions
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)) {