aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index b3cee032f578..3ac3cc1e03cc 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -177,9 +177,10 @@ static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac)
177 qeth_l2_send_delgroupmac_cb); 177 qeth_l2_send_delgroupmac_cb);
178} 178}
179 179
180static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac) 180static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac, int vmac)
181{ 181{
182 struct qeth_mc_mac *mc; 182 struct qeth_mc_mac *mc;
183 int rc;
183 184
184 mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC); 185 mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC);
185 186
@@ -188,8 +189,16 @@ static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac)
188 189
189 memcpy(mc->mc_addr, mac, OSA_ADDR_LEN); 190 memcpy(mc->mc_addr, mac, OSA_ADDR_LEN);
190 mc->mc_addrlen = OSA_ADDR_LEN; 191 mc->mc_addrlen = OSA_ADDR_LEN;
192 mc->is_vmac = vmac;
193
194 if (vmac) {
195 rc = qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC,
196 NULL);
197 } else {
198 rc = qeth_l2_send_setgroupmac(card, mac);
199 }
191 200
192 if (!qeth_l2_send_setgroupmac(card, mac)) 201 if (!rc)
193 list_add_tail(&mc->list, &card->mc_list); 202 list_add_tail(&mc->list, &card->mc_list);
194 else 203 else
195 kfree(mc); 204 kfree(mc);
@@ -201,7 +210,11 @@ static void qeth_l2_del_all_mc(struct qeth_card *card)
201 210
202 spin_lock_bh(&card->mclock); 211 spin_lock_bh(&card->mclock);
203 list_for_each_entry_safe(mc, tmp, &card->mc_list, list) { 212 list_for_each_entry_safe(mc, tmp, &card->mc_list, list) {
204 qeth_l2_send_delgroupmac(card, mc->mc_addr); 213 if (mc->is_vmac)
214 qeth_l2_send_setdelmac(card, mc->mc_addr,
215 IPA_CMD_DELVMAC, NULL);
216 else
217 qeth_l2_send_delgroupmac(card, mc->mc_addr);
205 list_del(&mc->list); 218 list_del(&mc->list);
206 kfree(mc); 219 kfree(mc);
207 } 220 }
@@ -590,7 +603,7 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
590static void qeth_l2_set_multicast_list(struct net_device *dev) 603static void qeth_l2_set_multicast_list(struct net_device *dev)
591{ 604{
592 struct qeth_card *card = dev->ml_priv; 605 struct qeth_card *card = dev->ml_priv;
593 struct dev_mc_list *dm; 606 struct dev_addr_list *dm;
594 607
595 if (card->info.type == QETH_CARD_TYPE_OSN) 608 if (card->info.type == QETH_CARD_TYPE_OSN)
596 return ; 609 return ;
@@ -599,7 +612,11 @@ static void qeth_l2_set_multicast_list(struct net_device *dev)
599 qeth_l2_del_all_mc(card); 612 qeth_l2_del_all_mc(card);
600 spin_lock_bh(&card->mclock); 613 spin_lock_bh(&card->mclock);
601 for (dm = dev->mc_list; dm; dm = dm->next) 614 for (dm = dev->mc_list; dm; dm = dm->next)
602 qeth_l2_add_mc(card, dm->dmi_addr); 615 qeth_l2_add_mc(card, dm->da_addr, 0);
616
617 for (dm = dev->uc_list; dm; dm = dm->next)
618 qeth_l2_add_mc(card, dm->da_addr, 1);
619
603 spin_unlock_bh(&card->mclock); 620 spin_unlock_bh(&card->mclock);
604 if (!qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE)) 621 if (!qeth_adp_supported(card, IPA_SETADP_SET_PROMISC_MODE))
605 return; 622 return;