Skip to content

Commit e78d787

Browse files
benzeajmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: include link ID when releasing frames
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: b8a85a1 ("wifi: iwlwifi: mvm: rxmq: report link ID to mac80211") Signed-off-by: Benjamin Berg <[email protected]> Tested-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240320232419.bbbd5e9bfe80.Iec1bf5c884e371f7bc5ea2534ed9ea8d3f2c0bf6@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 19d82bd commit e78d787

File tree

1 file changed

+8
-12
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+8
-12
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,13 @@ static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm,
236236
static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
237237
struct napi_struct *napi,
238238
struct sk_buff *skb, int queue,
239-
struct ieee80211_sta *sta,
240-
struct ieee80211_link_sta *link_sta)
239+
struct ieee80211_sta *sta)
241240
{
242241
if (unlikely(iwl_mvm_check_pn(mvm, skb, queue, sta))) {
243242
kfree_skb(skb);
244243
return;
245244
}
246245

247-
if (sta && sta->valid_links && link_sta) {
248-
struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
249-
250-
rx_status->link_valid = 1;
251-
rx_status->link_id = link_sta->link_id;
252-
}
253-
254246
ieee80211_rx_napi(mvm->hw, sta, skb, napi);
255247
}
256248

@@ -588,7 +580,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
588580
while ((skb = __skb_dequeue(skb_list))) {
589581
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
590582
reorder_buf->queue,
591-
sta, NULL /* FIXME */);
583+
sta);
592584
reorder_buf->num_stored--;
593585
}
594586
}
@@ -2213,6 +2205,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
22132205
if (IS_ERR(sta))
22142206
sta = NULL;
22152207
link_sta = rcu_dereference(mvm->fw_id_to_link_sta[id]);
2208+
2209+
if (sta && sta->valid_links && link_sta) {
2210+
rx_status->link_valid = 1;
2211+
rx_status->link_id = link_sta->link_id;
2212+
}
22162213
}
22172214
} else if (!is_multicast_ether_addr(hdr->addr2)) {
22182215
/*
@@ -2356,8 +2353,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
23562353
!(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
23572354
rx_status->flag |= RX_FLAG_AMSDU_MORE;
23582355

2359-
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
2360-
link_sta);
2356+
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
23612357
}
23622358
out:
23632359
rcu_read_unlock();

0 commit comments

Comments
 (0)