Changes in uspace/drv/nic/virtio-net/virtio-net.c [09ab0a9a:8fed3ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/virtio-net/virtio-net.c
r09ab0a9a r8fed3ef 211 211 ddf_msg(LVL_NOTE, "Unsupported number of virtqueues: %u", 212 212 num_queues); 213 rc = ELIMIT; 213 214 goto fail; 214 215 } … … 342 343 assert(descno < TX_BUFFERS); 343 344 344 /* Setup the packe dheader */345 /* Setup the packet header */ 345 346 virtio_net_hdr_t *hdr = (virtio_net_hdr_t *) virtio_net->tx_buf[descno]; 346 347 memset(hdr, 0, sizeof(virtio_net_hdr_t)); 347 348 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; 349 hdr->num_buffers = 0; 348 350 349 351 /* Copy packet data into the buffer just past the header */ … … 403 405 if (fun == NULL) { 404 406 rc = ENOMEM; 405 goto error;407 goto uninitialize; 406 408 } 407 409 nic_t *nic = ddf_dev_data_get(dev); … … 417 419 if (rc != EOK) { 418 420 ddf_msg(LVL_ERROR, "Failed binding device function"); 419 goto uninitialize;421 goto destroy; 420 422 } 421 423 … … 433 435 unbind: 434 436 ddf_fun_unbind(fun); 437 destroy: 438 ddf_fun_destroy(fun); 435 439 uninitialize: 436 440 virtio_net_uninitialize(dev); 437 error:438 441 return rc; 439 442 }
Note:
See TracChangeset
for help on using the changeset viewer.