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

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

mac80211: don't store napi struct



When introducing multiple RX queues, a single NAPI struct will not
be sufficient. Instead of trying to store multiple, simply change
the API to have the NAPI struct passed to the RX function. This of
course means that drivers using rx_irqsafe() cannot use NAPI, but
that seems a reasonable trade-off, particularly since only two of
all drivers are currently using it at all.

While at it, we can now remove the IEEE80211_RX_REORDER_TIMER flag
again since this code path cannot have a napi struct anyway.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 798a457d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -669,6 +669,8 @@ struct iwl_priv {
	/* ieee device used by generic ieee processing code */
	struct ieee80211_hw *hw;

	struct napi_struct *napi;

	struct list_head calib_results;

	struct workqueue_struct *workqueue;
+2 −1
Original line number Diff line number Diff line
@@ -2037,7 +2037,8 @@ static void iwl_napi_add(struct iwl_op_mode *op_mode,
{
	struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);

	ieee80211_napi_add(priv->hw, napi, napi_dev, poll, weight);
	netif_napi_add(napi_dev, napi, poll, weight);
	priv->napi = napi;
}

static const struct iwl_op_mode_ops iwl_dvm_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -786,7 +786,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,

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

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

static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in)
+1 −0
Original line number Diff line number Diff line
@@ -559,6 +559,7 @@ struct iwl_mvm {
	const struct iwl_cfg *cfg;
	struct iwl_phy_db *phy_db;
	struct ieee80211_hw *hw;
	struct napi_struct *napi;

	/* for protecting access to iwl_mvm */
	struct mutex mutex;
+2 −1
Original line number Diff line number Diff line
@@ -1316,7 +1316,8 @@ static void iwl_mvm_napi_add(struct iwl_op_mode *op_mode,
{
	struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);

	ieee80211_napi_add(mvm->hw, napi, napi_dev, poll, weight);
	netif_napi_add(napi_dev, napi, poll, weight);
	mvm->napi = napi;
}

static const struct iwl_op_mode_ops iwl_mvm_ops = {
Loading