]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/6.6.26/wifi-iwlwifi-mvm-include-link-id-when-releasing-fram.patch
Linux 6.6.26
[thirdparty/kernel/stable-queue.git] / releases / 6.6.26 / wifi-iwlwifi-mvm-include-link-id-when-releasing-fram.patch
1 From 99565fe1089186da366d4902296b66882e75c79a Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 20 Mar 2024 23:26:22 +0200
4 Subject: wifi: iwlwifi: mvm: include link ID when releasing frames
5
6 From: Benjamin Berg <benjamin.berg@intel.com>
7
8 [ Upstream commit e78d7877308989ef91b64a3c746ae31324c07caa ]
9
10 When releasing frames from the reorder buffer, the link ID was not
11 included in the RX status information. This subsequently led mac80211 to
12 drop the frame. Change it so that the link information is set
13 immediately when possible so that it doesn't not need to be filled in
14 anymore when submitting the frame to mac80211.
15
16 Fixes: b8a85a1d42d7 ("wifi: iwlwifi: mvm: rxmq: report link ID to mac80211")
17 Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
18 Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
19 Reviewed-by: Johannes Berg <johannes.berg@intel.com>
20 Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
21 Link: https://msgid.link/20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid
22 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 20 ++++++++-----------
26 1 file changed, 8 insertions(+), 12 deletions(-)
27
28 diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
29 index 92b3e18dbe877..e9360b555ac93 100644
30 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
31 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
32 @@ -236,21 +236,13 @@ static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm,
33 static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
34 struct napi_struct *napi,
35 struct sk_buff *skb, int queue,
36 - struct ieee80211_sta *sta,
37 - struct ieee80211_link_sta *link_sta)
38 + struct ieee80211_sta *sta)
39 {
40 if (unlikely(iwl_mvm_check_pn(mvm, skb, queue, sta))) {
41 kfree_skb(skb);
42 return;
43 }
44
45 - if (sta && sta->valid_links && link_sta) {
46 - struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
47 -
48 - rx_status->link_valid = 1;
49 - rx_status->link_id = link_sta->link_id;
50 - }
51 -
52 ieee80211_rx_napi(mvm->hw, sta, skb, napi);
53 }
54
55 @@ -636,7 +628,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
56 while ((skb = __skb_dequeue(skb_list))) {
57 iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
58 reorder_buf->queue,
59 - sta, NULL /* FIXME */);
60 + sta);
61 reorder_buf->num_stored--;
62 }
63 }
64 @@ -2489,6 +2481,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
65 if (IS_ERR(sta))
66 sta = NULL;
67 link_sta = rcu_dereference(mvm->fw_id_to_link_sta[id]);
68 +
69 + if (sta && sta->valid_links && link_sta) {
70 + rx_status->link_valid = 1;
71 + rx_status->link_id = link_sta->link_id;
72 + }
73 }
74 } else if (!is_multicast_ether_addr(hdr->addr2)) {
75 /*
76 @@ -2630,8 +2627,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
77 !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
78 rx_status->flag |= RX_FLAG_AMSDU_MORE;
79
80 - iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
81 - link_sta);
82 + iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
83 }
84 out:
85 rcu_read_unlock();
86 --
87 2.43.0
88