Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael Buesch and committed by
John W. Linville
ce4fbdbf 91ed19f5

+13 -8
-3
drivers/net/wireless/b43/b43.h
··· 550 550 551 551 struct b43_stats { 552 552 u8 link_noise; 553 - /* Store the last TX/RX times here for updating the leds. */ 554 - unsigned long last_tx; 555 - unsigned long last_rx; 556 553 }; 557 554 558 555 struct b43_key {
-1
drivers/net/wireless/b43/dma.c
··· 1425 1425 break; 1426 1426 slot = next_slot(ring, slot); 1427 1427 } 1428 - dev->stats.last_tx = jiffies; 1429 1428 if (ring->stopped) { 1430 1429 B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME); 1431 1430 ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
+13 -4
drivers/net/wireless/b43/xmit.c
··· 538 538 chanstat = le16_to_cpu(rxhdr->channel); 539 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 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 549 if (macstat & B43_RX_MAC_DECERR) { 544 550 /* Decryption with the given key failed. 545 551 * Drop the packet. We also won't be able to decrypt it with ··· 612 606 phytype == B43_PHYTYPE_A); 613 607 else 614 608 status.rate_idx = b43_plcp_get_bitrate_idx_cck(plcp); 615 - if (unlikely(status.rate_idx == -1)) 616 - goto drop; 609 + if (unlikely(status.rate_idx == -1)) { 610 + /* PLCP seems to be corrupted. 611 + * Drop the frame, if we are not interested in corrupted frames. */ 612 + if (!(dev->wl->filter_flags & FIF_PLCPFAIL)) 613 + goto drop; 614 + } 617 615 status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT); 618 616 619 617 /* ··· 671 661 goto drop; 672 662 } 673 663 674 - dev->stats.last_rx = jiffies; 675 664 ieee80211_rx_irqsafe(dev->wl->hw, skb, &status); 676 665 677 666 return;