diff options
author | Torsten Polle <tpolle@de.adit-jv.com> | 2016-09-19 10:05:40 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-03 10:38:38 +0200 |
commit | 9a5380c3ba17b85b753ee7d6c42e94e1da81c00c (patch) | |
tree | 4c5288be36974052240231eb7848bf507c415d55 /drivers/usb/gadget/function | |
parent | 5bdcde90d745e111069900742d127310fb827b71 (diff) | |
download | linux-stable-9a5380c3ba17b85b753ee7d6c42e94e1da81c00c.tar.gz linux-stable-9a5380c3ba17b85b753ee7d6c42e94e1da81c00c.tar.bz2 linux-stable-9a5380c3ba17b85b753ee7d6c42e94e1da81c00c.zip |
usb: gadget: NCM: link socket buffers to the device for tx packets
Socket buffers should be linked to the (network) device that allocated
the buffers.
Signed-off-by: Torsten Polle <tpolle@de.adit-jv.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r-- | drivers/usb/gadget/function/f_ncm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 639603722709..b6771ad2485a 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -1078,6 +1078,7 @@ static struct sk_buff *ncm_wrap_ntb(struct gether *port, if (!ncm->skb_tx_data) goto err; + ncm->skb_tx_data->dev = ncm->netdev; ntb_data = (void *) skb_put(ncm->skb_tx_data, ncb_len); memset(ntb_data, 0, ncb_len); /* dwSignature */ @@ -1096,6 +1097,8 @@ static struct sk_buff *ncm_wrap_ntb(struct gether *port, GFP_ATOMIC); if (!ncm->skb_tx_ndp) goto err; + + ncm->skb_tx_ndp->dev = ncm->netdev; ntb_ndp = (void *) skb_put(ncm->skb_tx_ndp, opts->ndp_size); memset(ntb_ndp, 0, ncb_len); |