hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
....@@ -1203,6 +1203,7 @@
12031203 struct sk_buff_head mpdus_skbs;
12041204 unsigned int payload_len;
12051205 int ret;
1206
+ struct sk_buff *orig_skb = skb;
12061207
12071208 if (WARN_ON_ONCE(!mvmsta))
12081209 return -1;
....@@ -1235,8 +1236,17 @@
12351236
12361237 ret = iwl_mvm_tx_mpdu(mvm, skb, &info, sta);
12371238 if (ret) {
1239
+ /* Free skbs created as part of TSO logic that have not yet been dequeued */
12381240 __skb_queue_purge(&mpdus_skbs);
1239
- return ret;
1241
+ /* skb here is not necessarily same as skb that entered this method,
1242
+ * so free it explicitly.
1243
+ */
1244
+ if (skb == orig_skb)
1245
+ ieee80211_free_txskb(mvm->hw, skb);
1246
+ else
1247
+ kfree_skb(skb);
1248
+ /* there was error, but we consumed skb one way or another, so return 0 */
1249
+ return 0;
12401250 }
12411251 }
12421252