Skip to content

Commit 66de4b1

Browse files
zx2c4davem330
authored andcommitted
net: iwlwifi: use skb_list_walk_safe helper for gso segments
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 536577f commit 66de4b1

File tree

1 file changed

+2
-7
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -847,10 +847,7 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
847847
else if (next)
848848
consume_skb(skb);
849849

850-
while (next) {
851-
tmp = next;
852-
next = tmp->next;
853-
850+
skb_list_walk_safe(next, tmp, next) {
854851
memcpy(tmp->cb, cb, sizeof(tmp->cb));
855852
/*
856853
* Compute the length of all the data added for the A-MSDU.
@@ -880,9 +877,7 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
880877
skb_shinfo(tmp)->gso_size = 0;
881878
}
882879

883-
tmp->prev = NULL;
884-
tmp->next = NULL;
885-
880+
skb_mark_not_on_list(tmp);
886881
__skb_queue_tail(mpdus_skb, tmp);
887882
i++;
888883
}

0 commit comments

Comments
 (0)