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

Commit f4bda337 authored by Thomas Pedersen's avatar Thomas Pedersen Committed by Johannes Berg
Browse files

mac80211: support RX_FLAG_MACTIME_END



Allow drivers to indicate their mactime is at RX completion and adjust
for this in mac80211. Also rename the existing RX_FLAG_MACTIME_MPDU to
RX_FLAG_MACTIME_START to clarify its intent. Based on similar code by
Johannes Berg.

Signed-off-by: default avatarThomas Pedersen <thomas@cozybit.com>
[fix docs, atheros drivers]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 2a91c9f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1349,7 +1349,7 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
	 * right now, so it's not too bad...
	 * right now, so it's not too bad...
	 */
	 */
	rxs->mactime = ath5k_extend_tsf(ah, rs->rs_tstamp);
	rxs->mactime = ath5k_extend_tsf(ah, rs->rs_tstamp);
	rxs->flag |= RX_FLAG_MACTIME_MPDU;
	rxs->flag |= RX_FLAG_MACTIME_START;


	rxs->freq = ah->curchan->center_freq;
	rxs->freq = ah->curchan->center_freq;
	rxs->band = ah->curchan->band;
	rxs->band = ah->curchan->band;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1082,7 +1082,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
	rx_status->freq = hw->conf.channel->center_freq;
	rx_status->freq = hw->conf.channel->center_freq;
	rx_status->signal =  rxbuf->rxstatus.rs_rssi + ATH_DEFAULT_NOISE_FLOOR;
	rx_status->signal =  rxbuf->rxstatus.rs_rssi + ATH_DEFAULT_NOISE_FLOOR;
	rx_status->antenna = rxbuf->rxstatus.rs_antenna;
	rx_status->antenna = rxbuf->rxstatus.rs_antenna;
	rx_status->flag |= RX_FLAG_MACTIME_MPDU;
	rx_status->flag |= RX_FLAG_MACTIME_START;


	return true;
	return true;


+1 −1
Original line number Original line Diff line number Diff line
@@ -976,7 +976,7 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
	rx_status->freq = hw->conf.channel->center_freq;
	rx_status->freq = hw->conf.channel->center_freq;
	rx_status->signal = ah->noise + rx_stats->rs_rssi;
	rx_status->signal = ah->noise + rx_stats->rs_rssi;
	rx_status->antenna = rx_stats->rs_antenna;
	rx_status->antenna = rx_stats->rs_antenna;
	rx_status->flag |= RX_FLAG_MACTIME_MPDU;
	rx_status->flag |= RX_FLAG_MACTIME_START;
	if (rx_stats->rs_moreaggr)
	if (rx_stats->rs_moreaggr)
		rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
		rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;


+1 −1
Original line number Original line Diff line number Diff line
@@ -796,7 +796,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
		status.mactime += mactime;
		status.mactime += mactime;
		if (low_mactime_now <= mactime)
		if (low_mactime_now <= mactime)
			status.mactime -= 0x10000;
			status.mactime -= 0x10000;
		status.flag |= RX_FLAG_MACTIME_MPDU;
		status.flag |= RX_FLAG_MACTIME_START;
	}
	}


	chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
	chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
+1 −1
Original line number Original line Diff line number Diff line
@@ -557,7 +557,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev,
		status.mactime += mactime;
		status.mactime += mactime;
		if (low_mactime_now <= mactime)
		if (low_mactime_now <= mactime)
			status.mactime -= 0x10000;
			status.mactime -= 0x10000;
		status.flag |= RX_FLAG_MACTIME_MPDU;
		status.flag |= RX_FLAG_MACTIME_START;
	}
	}


	chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
	chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
Loading