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

Commit d63b548f authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: allow passing transmitter station on RX



Sometimes drivers already looked up, or know out-of-band
from their device, which station transmitted a given RX
frame. Allow them to pass the station pointer to mac80211
to save the extra lookup.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e596af82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -686,7 +686,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,

	memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));

	ieee80211_rx_napi(priv->hw, skb, priv->napi);
	ieee80211_rx_napi(priv->hw, NULL, skb, priv->napi);
}

static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in)
+1 −1
Original line number Diff line number Diff line
@@ -1499,5 +1499,5 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
	memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));

	/* pass it as regular rx to mac80211 */
	ieee80211_rx_napi(mvm->hw, skb, NULL);
	ieee80211_rx_napi(mvm->hw, NULL, skb, NULL);
}
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
				fraglen, rxb->truesize);
	}

	ieee80211_rx_napi(mvm->hw, skb, napi);
	ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
	if (iwl_mvm_check_pn(mvm, skb, queue, sta))
		kfree_skb(skb);
	else
		ieee80211_rx_napi(mvm->hw, skb, napi);
		ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
}

static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
+4 −3
Original line number Diff line number Diff line
@@ -3855,11 +3855,12 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
 * This function must be called with BHs disabled.
 *
 * @hw: the hardware this frame came in on
 * @sta: the station the frame was received from, or %NULL
 * @skb: the buffer to receive, owned by mac80211 after this call
 * @napi: the NAPI context
 */
void ieee80211_rx_napi(struct ieee80211_hw *hw, struct sk_buff *skb,
		       struct napi_struct *napi);
void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
		       struct sk_buff *skb, struct napi_struct *napi);

/**
 * ieee80211_rx - receive frame
@@ -3883,7 +3884,7 @@ void ieee80211_rx_napi(struct ieee80211_hw *hw, struct sk_buff *skb,
 */
static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
	ieee80211_rx_napi(hw, skb, NULL);
	ieee80211_rx_napi(hw, NULL, skb, NULL);
}

/**
Loading