mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
msm: mhi-net-dev: Don't over-write skb length
Once the read operation is done, mhi-net driver adds the read data to the buffer by invoking skb_put() which takes care of updating the length of skb. In the existing logic, mhi-net driver is updating skb length thus skb length is getting incremented twice causing extra (unwanted) data then read to the client. Fixing the same by removing the redundant length update logic. Also move skb_put() ahead of eth_type_trans() as skb length is being used in eth_type_trans(). Change-Id: I11c420a68f2ad69e8a58f29c620917382ff172f7 Signed-off-by: Veerabhadrarao Badiganti <quic_vbadigan@quicinc.com> Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
This commit is contained in:
parent
41978afa6c
commit
d8d32ae605
1 changed files with 1 additions and 2 deletions
|
|
@ -238,14 +238,13 @@ static void mhi_dev_net_read_completion_cb(void *req)
|
|||
struct sk_buff *skb = mreq->context;
|
||||
unsigned long flags;
|
||||
|
||||
skb->len = mreq->transfer_len;
|
||||
skb_put(skb, mreq->transfer_len);
|
||||
|
||||
if (net_handle->eth_iface)
|
||||
skb->protocol = eth_type_trans(skb, net_handle->dev);
|
||||
else
|
||||
skb->protocol = mhi_dev_net_eth_type_trans(skb);
|
||||
|
||||
skb_put(skb, mreq->transfer_len);
|
||||
net_handle->dev->stats.rx_packets++;
|
||||
skb->dev = net_handle->dev;
|
||||
netif_rx(skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue