All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Benjamin Berg <benjamin.berg@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 01/17] wifi: iwlwifi: mvm: include link ID when releasing frames
Date: Wed, 20 Mar 2024 23:26:22 +0200	[thread overview]
Message-ID: <20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid> (raw)
In-Reply-To: <20240320212638.1446082-1-miriam.rachel.korenblit@intel.com>

From: Benjamin Berg <benjamin.berg@intel.com>

When releasing frames from the reorder buffer, the link ID was not
included in the RX status information. This subsequently led mac80211 to
drop the frame. Change it so that the link information is set
immediately when possible so that it doesn't not need to be filled in
anymore when submitting the frame to mac80211.

Fixes: b8a85a1d42d7 ("wifi: iwlwifi: mvm: rxmq: report link ID to mac80211")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 ++++++++-----------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 1484eaedf452..ce8d83c771a7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -236,21 +236,13 @@ static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm,
 static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
 					    struct napi_struct *napi,
 					    struct sk_buff *skb, int queue,
-					    struct ieee80211_sta *sta,
-					    struct ieee80211_link_sta *link_sta)
+					    struct ieee80211_sta *sta)
 {
 	if (unlikely(iwl_mvm_check_pn(mvm, skb, queue, sta))) {
 		kfree_skb(skb);
 		return;
 	}
 
-	if (sta && sta->valid_links && link_sta) {
-		struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
-
-		rx_status->link_valid = 1;
-		rx_status->link_id = link_sta->link_id;
-	}
-
 	ieee80211_rx_napi(mvm->hw, sta, skb, napi);
 }
 
@@ -588,7 +580,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
 		while ((skb = __skb_dequeue(skb_list))) {
 			iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
 							reorder_buf->queue,
-							sta, NULL /* FIXME */);
+							sta);
 			reorder_buf->num_stored--;
 		}
 	}
@@ -2213,6 +2205,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
 			if (IS_ERR(sta))
 				sta = NULL;
 			link_sta = rcu_dereference(mvm->fw_id_to_link_sta[id]);
+
+			if (sta && sta->valid_links && link_sta) {
+				rx_status->link_valid = 1;
+				rx_status->link_id = link_sta->link_id;
+			}
 		}
 	} else if (!is_multicast_ether_addr(hdr->addr2)) {
 		/*
@@ -2356,8 +2353,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
 		    !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
 			rx_status->flag |= RX_FLAG_AMSDU_MORE;
 
-		iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
-						link_sta);
+		iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
 	}
 out:
 	rcu_read_unlock();
-- 
2.34.1


  reply	other threads:[~2024-03-20 21:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 21:26 [PATCH 00/17] wifi: iwlwifi: updates - 2024-03-20 Miri Korenblit
2024-03-20 21:26 ` Miri Korenblit [this message]
2024-03-20 21:26 ` [PATCH 02/17] wifi: iwlwifi: mvm: guard against invalid STA ID on removal Miri Korenblit
2024-03-20 21:26 ` [PATCH 03/17] wifi: iwlwifi: mvm: assign link STA ID lookups during restart Miri Korenblit
2024-03-20 21:26 ` [PATCH 04/17] wifi: iwlwifi: mvm: fix active link counting during recovery Miri Korenblit
2024-03-20 21:26 ` [PATCH 05/17] wifi: iwlwifi: mvm: mark EMLSR disabled in cleanup iterator Miri Korenblit
2024-03-20 21:26 ` [PATCH 06/17] wifi: iwlwifi: remove devices that never came out Miri Korenblit
2024-03-20 21:26 ` [PATCH 07/17] wifi: iwlwifi: remove wrong CRF_IDs Miri Korenblit
2024-03-20 21:26 ` [PATCH 08/17] wifi: iwlwifi: Print a specific device name Miri Korenblit
2024-03-20 21:26 ` [PATCH 09/17] wifi: iwlwifi: add support for BZ_W Miri Korenblit
2024-03-20 21:26 ` [PATCH 10/17] wifi: iwlwifi: mvm: Remove outdated comment Miri Korenblit
2024-03-20 21:26 ` [PATCH 11/17] wifi: iwlwifi: mvm: handle debugfs names more carefully Miri Korenblit
2024-03-20 21:26 ` [PATCH 12/17] wifi: iwlwifi: mvm: Declare HE/EHT capabilities support for P2P interfaces Miri Korenblit
2024-03-20 21:26 ` [PATCH 13/17] wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9 Miri Korenblit
2024-03-20 21:26 ` [PATCH 14/17] wifi: iwlwifi: mvm: set wider BW OFDMA ignore correctly Miri Korenblit
2024-03-20 21:26 ` [PATCH 15/17] wifi: iwlwifi: mvm: select STA mask only for active links Miri Korenblit
2024-03-25 14:27   ` Johannes Berg
2024-03-20 21:26 ` [PATCH 16/17] wifi: iwlwifi: mvm: don't change BA sessions during restart Miri Korenblit
2024-03-20 21:26 ` [PATCH 17/17] wifi: iwlwifi: reconfigure TLC during HW restart Miri Korenblit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=benjamin.berg@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.