Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a5380c3 authored by Torsten Polle's avatar Torsten Polle Committed by Felipe Balbi
Browse files

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: default avatarTorsten Polle <tpolle@de.adit-jv.com>
Signed-off-by: default avatarHarish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 5bdcde90
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);