Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce4fbdbf authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville
Browse files

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: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 91ed19f5
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -550,9 +550,6 @@ struct b43_noise_calculation {


struct b43_stats {
struct b43_stats {
	u8 link_noise;
	u8 link_noise;
	/* Store the last TX/RX times here for updating the leds. */
	unsigned long last_tx;
	unsigned long last_rx;
};
};


struct b43_key {
struct b43_key {
+0 −1
Original line number Original line Diff line number Diff line
@@ -1425,7 +1425,6 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
			break;
			break;
		slot = next_slot(ring, slot);
		slot = next_slot(ring, slot);
	}
	}
	dev->stats.last_tx = jiffies;
	if (ring->stopped) {
	if (ring->stopped) {
		B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME);
		B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME);
		ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
		ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
+13 −4
Original line number Original line Diff line number Diff line
@@ -538,8 +538,14 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
	chanstat = le16_to_cpu(rxhdr->channel);
	chanstat = le16_to_cpu(rxhdr->channel);
	phytype = chanstat & B43_RX_CHAN_PHYTYPE;
	phytype = chanstat & B43_RX_CHAN_PHYTYPE;


	if (macstat & B43_RX_MAC_FCSERR)
	if (unlikely(macstat & B43_RX_MAC_FCSERR)) {
		dev->wl->ieee_stats.dot11FCSErrorCount++;
		dev->wl->ieee_stats.dot11FCSErrorCount++;
		status.flag |= RX_FLAG_FAILED_FCS_CRC;
	}
	if (unlikely(phystat0 & (B43_RX_PHYST0_PLCPHCF | B43_RX_PHYST0_PLCPFV)))
		status.flag |= RX_FLAG_FAILED_PLCP_CRC;
	if (phystat0 & B43_RX_PHYST0_SHORTPRMBL)
		status.flag |= RX_FLAG_SHORTPRE;
	if (macstat & B43_RX_MAC_DECERR) {
	if (macstat & B43_RX_MAC_DECERR) {
		/* Decryption with the given key failed.
		/* Decryption with the given key failed.
		 * Drop the packet. We also won't be able to decrypt it with
		 * 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)
						phytype == B43_PHYTYPE_A);
						phytype == B43_PHYTYPE_A);
	else
	else
		status.rate_idx = b43_plcp_get_bitrate_idx_cck(plcp);
		status.rate_idx = b43_plcp_get_bitrate_idx_cck(plcp);
	if (unlikely(status.rate_idx == -1))
	if (unlikely(status.rate_idx == -1)) {
		/* PLCP seems to be corrupted.
		 * Drop the frame, if we are not interested in corrupted frames. */
		if (!(dev->wl->filter_flags & FIF_PLCPFAIL))
			goto drop;
			goto drop;
	}
	status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);
	status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);


	/*
	/*
@@ -661,7 +671,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
		goto drop;
		goto drop;
	}
	}


	dev->stats.last_rx = jiffies;
	ieee80211_rx_irqsafe(dev->wl->hw, skb, &status);
	ieee80211_rx_irqsafe(dev->wl->hw, skb, &status);


	return;
	return;