Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1484228
| From | Harish Jenny K N <harish_kandiga@mentor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1 1/3] usb: gadget: NCM: link socket buffers to the device for tx packets |
| Date | 2016-09-15 16:30 +0200 |
| Message-ID | <shFPQ-88Q-39@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sf3F0-3UY-11@gated-at.bofh.it> <sf3F0-3UY-13@gated-at.bofh.it> <sf3F0-3UY-15@gated-at.bofh.it> <sf3F0-3UY-17@gated-at.bofh.it> <shFPQ-88Q-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Torsten Polle <tpolle@de.adit-jv.com> 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> --- drivers/usb/gadget/function/f_ncm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 6396037..b6771ad 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); -- 1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v1 0/3] Usb gadget ncm code cleanup Harish Jenny K N <harish_kandiga@mentor.com> - 2016-09-15 16:30 +0200 [PATCH v1 1/3] usb: gadget: NCM: link socket buffers to the device for tx packets Harish Jenny K N <harish_kandiga@mentor.com> - 2016-09-15 16:30 +0200
csiph-web