aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/xmit.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-03-02 17:18:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-05 14:39:40 -0500
commitce4fbdbf161b2676b3833412367113572d739253 (patch)
tree05754ea0b07d84d870c3940d492a97c7cd89e309 /drivers/net/wireless/b43/xmit.c
parent91ed19f5f66a7fe544f0ec385e981f43491d1d5a (diff)
b43: Pass more RX flags to mac80211
This changes the RX handler to pass more status flags to mac80211. It also changes part of the drop policy, if bad frames were requested. (Note that currently mac80211 will throw a WARN_ON in that case. But nothing bad will happen). This also removes some obsolete unused timestamping code. Signed-off-by: Michael Buesch <mb@bu3sch.de> 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.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index eae9b805265..0f53c7e5e01 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -538,8 +538,14 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
538 chanstat = le16_to_cpu(rxhdr->channel); 538 chanstat = le16_to_cpu(rxhdr->channel);
539 phytype = chanstat & B43_RX_CHAN_PHYTYPE; 539 phytype = chanstat & B43_RX_CHAN_PHYTYPE;
540 540
541 if (macstat & B43_RX_MAC_FCSERR) 541 if (unlikely(macstat & B43_RX_MAC_FCSERR)) {
542 dev->wl->ieee_stats.dot11FCSErrorCount++; 542 dev->wl->ieee_stats.dot11FCSErrorCount++;
543 status.flag |= RX_FLAG_FAILED_FCS_CRC;
544 }
545 if (unlikely(phystat0 & (B43_RX_PHYST0_PLCPHCF | B43_RX_PHYST0_PLCPFV)))
546 status.flag |= RX_FLAG_FAILED_PLCP_CRC;
547 if (phystat0 & B43_RX_PHYST0_SHORTPRMBL)
548 status.flag |= RX_FLAG_SHORTPRE;
543 if (macstat & B43_RX_MAC_DECERR) { 549 if (macstat & B43_RX_MAC_DECERR) {
544 /* Decryption with the given key failed. 550 /* Decryption with the given key failed.
545 * Drop the packet. We also won't be able to decrypt it with 551 * Drop the packet. We also won't be able to decrypt it with
@@ -606,8 +612,12 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
606 phytype == B43_PHYTYPE_A); 612 phytype == B43_PHYTYPE_A);
607 else 613 else
608 status.rate_idx = b43_plcp_get_bitrate_idx_cck(plcp); 614 status.rate_idx = b43_plcp_get_bitrate_idx_cck(plcp);
609 if (unlikely(status.rate_idx == -1)) 615 if (unlikely(status.rate_idx == -1)) {
610 goto drop; 616 /* PLCP seems to be corrupted.
617 * Drop the frame, if we are not interested in corrupted frames. */
618 if (!(dev->wl->filter_flags & FIF_PLCPFAIL))
619 goto drop;
620 }
611 status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT); 621 status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);
612 622
613 /* 623 /*
@@ -661,7 +671,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
661 goto drop; 671 goto drop;
662 } 672 }
663 673
664 dev->stats.last_rx = jiffies;
665 ieee80211_rx_irqsafe(dev->wl->hw, skb, &status); 674 ieee80211_rx_irqsafe(dev->wl->hw, skb, &status);
666 675
667 return; 676 return;