mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge "qcacld-3.0: set gso_size for non linear tcp packets" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
058aed75dc
3 changed files with 16 additions and 0 deletions
|
|
@ -167,4 +167,16 @@ static inline void netif_trans_update(struct net_device *dev)
|
|||
__func__, jiffies)
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
hdd_skb_fill_gso_size (struct net_device *dev,
|
||||
struct sk_buff *skb) {
|
||||
if (skb_cloned(skb) && skb_is_nonlinear(skb) &&
|
||||
skb_shinfo(skb)->gso_size == 0 &&
|
||||
ip_hdr(skb)->protocol == IPPROTO_TCP) {
|
||||
skb_shinfo(skb)->gso_size = dev->mtu -
|
||||
((skb_transport_header(skb) - skb_network_header(skb))
|
||||
+ tcp_hdrlen(skb));
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* end #if !defined(WLAN_HDD_TX_RX_H) */
|
||||
|
|
|
|||
|
|
@ -253,6 +253,8 @@ static inline struct sk_buff *hdd_skb_orphan(struct hdd_adapter *adapter,
|
|||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
#endif
|
||||
|
||||
hdd_skb_fill_gso_size(adapter->dev, skb);
|
||||
|
||||
nskb = skb_unshare(skb, GFP_ATOMIC);
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0))
|
||||
if (unlikely(hdd_ctx->config->tx_orphan_enable) && (nskb == skb)) {
|
||||
|
|
|
|||
|
|
@ -332,6 +332,8 @@ static inline struct sk_buff *hdd_skb_orphan(struct hdd_adapter *adapter,
|
|||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
#endif
|
||||
|
||||
hdd_skb_fill_gso_size(adapter->dev, skb);
|
||||
|
||||
nskb = skb_unshare(skb, GFP_ATOMIC);
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0))
|
||||
if (unlikely(hdd_ctx->config->tx_orphan_enable) && (nskb == skb)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue