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:
CNSS_WLAN Service 2017-10-20 00:01:58 -07:00 • committed by Gerrit - the friendly Code Review server
commit 058aed75dc
3 changed files with 16 additions and 0 deletions

View file

@ -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) */

View file

@ -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)) {

View file

@ -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)) {