diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-29 10:39:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-04 09:47:06 +0100 |
commit | cc15bd10e716fcb472d611f24d76c795acb0f8c7 (patch) | |
tree | ee624de454e831304d471110cf6f8aef0d3b0fb7 /drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |
parent | net: adopt skb_network_offset() and similar helpers (diff) | |
download | linux-cc15bd10e716fcb472d611f24d76c795acb0f8c7.tar.xz linux-cc15bd10e716fcb472d611f24d76c795acb0f8c7.zip |
net: adopt skb_network_header_len() more broadly
(skb_transport_header(skb) - skb_network_header(skb))
can be replaced by skb_network_header_len(skb)
Add a DEBUG_NET_WARN_ON_ONCE() in skb_network_header_len()
to catch cases were the transport_header was not set.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/tx.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index e502f4ee9e1f..782ddc8c296b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -1015,8 +1015,7 @@ static int iwl_mvm_tx_tso(struct iwl_mvm *mvm, struct sk_buff *skb, netdev_features_t netdev_flags = NETIF_F_CSUM_MASK | NETIF_F_SG; u8 tid; - snap_ip_tcp = 8 + skb_transport_header(skb) - skb_network_header(skb) + - tcp_hdrlen(skb); + snap_ip_tcp = 8 + skb_network_header_len(skb) + tcp_hdrlen(skb); if (!mvmsta->max_amsdu_len || !ieee80211_is_data_qos(hdr->frame_control) || |