aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 52198f6797a4..2a6e81d5b579 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -709,7 +709,7 @@ static void virtnet_set_rx_mode(struct net_device *dev)
709 allmulti ? "en" : "dis"); 709 allmulti ? "en" : "dis");
710 710
711 /* MAC filter - use one buffer for both lists */ 711 /* MAC filter - use one buffer for both lists */
712 mac_data = buf = kzalloc(((dev->uc_count + dev->mc_count) * ETH_ALEN) + 712 mac_data = buf = kzalloc(((dev->uc.count + dev->mc_count) * ETH_ALEN) +
713 (2 * sizeof(mac_data->entries)), GFP_ATOMIC); 713 (2 * sizeof(mac_data->entries)), GFP_ATOMIC);
714 if (!buf) { 714 if (!buf) {
715 dev_warn(&dev->dev, "No memory for MAC address buffer\n"); 715 dev_warn(&dev->dev, "No memory for MAC address buffer\n");
@@ -719,16 +719,16 @@ static void virtnet_set_rx_mode(struct net_device *dev)
719 sg_init_table(sg, 2); 719 sg_init_table(sg, 2);
720 720
721 /* Store the unicast list and count in the front of the buffer */ 721 /* Store the unicast list and count in the front of the buffer */
722 mac_data->entries = dev->uc_count; 722 mac_data->entries = dev->uc.count;
723 i = 0; 723 i = 0;
724 list_for_each_entry(ha, &dev->uc_list, list) 724 list_for_each_entry(ha, &dev->uc.list, list)
725 memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN); 725 memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN);
726 726
727 sg_set_buf(&sg[0], mac_data, 727 sg_set_buf(&sg[0], mac_data,
728 sizeof(mac_data->entries) + (dev->uc_count * ETH_ALEN)); 728 sizeof(mac_data->entries) + (dev->uc.count * ETH_ALEN));
729 729
730 /* multicast list and count fill the end */ 730 /* multicast list and count fill the end */
731 mac_data = (void *)&mac_data->macs[dev->uc_count][0]; 731 mac_data = (void *)&mac_data->macs[dev->uc.count][0];
732 732
733 mac_data->entries = dev->mc_count; 733 mac_data->entries = dev->mc_count;
734 addr = dev->mc_list; 734 addr = dev->mc_list;