1*7ceae9b7SDaniel Gabay /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2*7ceae9b7SDaniel Gabay /* 3*7ceae9b7SDaniel Gabay * Copyright (C) 2024 Intel Corporation 4*7ceae9b7SDaniel Gabay */ 5*7ceae9b7SDaniel Gabay #ifndef __iwl_utils_h__ 6*7ceae9b7SDaniel Gabay #define __iwl_utils_h__ 7*7ceae9b7SDaniel Gabay 8*7ceae9b7SDaniel Gabay #ifdef CONFIG_INET 9*7ceae9b7SDaniel Gabay /** 10*7ceae9b7SDaniel Gabay * iwl_tx_tso_segment - Segments a TSO packet into subframes for A-MSDU. 11*7ceae9b7SDaniel Gabay * @skb: buffer to segment. 12*7ceae9b7SDaniel Gabay * @num_subframes: number of subframes to create. 13*7ceae9b7SDaniel Gabay * @netdev_flags: netdev feature flags. 14*7ceae9b7SDaniel Gabay * @mpdus_skbs: list to hold the segmented subframes. 15*7ceae9b7SDaniel Gabay * 16*7ceae9b7SDaniel Gabay * This function segments a large TCP packet into subframes. 17*7ceae9b7SDaniel Gabay * subframes are added to the mpdus_skbs list 18*7ceae9b7SDaniel Gabay * 19*7ceae9b7SDaniel Gabay * Returns: 0 on success and negative value on failure. 20*7ceae9b7SDaniel Gabay */ 21*7ceae9b7SDaniel Gabay int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes, 22*7ceae9b7SDaniel Gabay netdev_features_t netdev_flags, 23*7ceae9b7SDaniel Gabay struct sk_buff_head *mpdus_skbs); 24*7ceae9b7SDaniel Gabay #else 25*7ceae9b7SDaniel Gabay static inline 26*7ceae9b7SDaniel Gabay int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes, 27*7ceae9b7SDaniel Gabay netdev_features_t netdev_flags, 28*7ceae9b7SDaniel Gabay struct sk_buff_head *mpdus_skbs) 29*7ceae9b7SDaniel Gabay { 30*7ceae9b7SDaniel Gabay WARN_ON(1); 31*7ceae9b7SDaniel Gabay 32*7ceae9b7SDaniel Gabay return -1; 33*7ceae9b7SDaniel Gabay } 34*7ceae9b7SDaniel Gabay #endif /* CONFIG_INET */ 35*7ceae9b7SDaniel Gabay 36*7ceae9b7SDaniel Gabay #endif /* __iwl_utils_h__ */ 37