|
@@ -170,8 +170,7 @@ static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac)
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
QETH_CARD_TEXT(card, 2, "L2Sgmac");
|
|
QETH_CARD_TEXT(card, 2, "L2Sgmac");
|
|
- rc = qeth_setdel_makerc(card, qeth_l2_send_setdelmac(card, mac,
|
|
|
|
- IPA_CMD_SETGMAC));
|
|
|
|
|
|
+ rc = qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC);
|
|
if (rc == -EEXIST)
|
|
if (rc == -EEXIST)
|
|
QETH_DBF_MESSAGE(2, "Group MAC %pM already existing on %s\n",
|
|
QETH_DBF_MESSAGE(2, "Group MAC %pM already existing on %s\n",
|
|
mac, QETH_CARD_IFNAME(card));
|
|
mac, QETH_CARD_IFNAME(card));
|
|
@@ -186,8 +185,7 @@ static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac)
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
QETH_CARD_TEXT(card, 2, "L2Dgmac");
|
|
QETH_CARD_TEXT(card, 2, "L2Dgmac");
|
|
- rc = qeth_setdel_makerc(card, qeth_l2_send_setdelmac(card, mac,
|
|
|
|
- IPA_CMD_DELGMAC));
|
|
|
|
|
|
+ rc = qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC);
|
|
if (rc)
|
|
if (rc)
|
|
QETH_DBF_MESSAGE(2,
|
|
QETH_DBF_MESSAGE(2,
|
|
"Could not delete group MAC %pM on %s: %d\n",
|
|
"Could not delete group MAC %pM on %s: %d\n",
|
|
@@ -206,9 +204,8 @@ static int qeth_l2_write_mac(struct qeth_card *card, struct qeth_mac *mac)
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
if (mac->is_uc) {
|
|
if (mac->is_uc) {
|
|
- rc = qeth_setdel_makerc(card,
|
|
|
|
- qeth_l2_send_setdelmac(card, mac->mac_addr,
|
|
|
|
- IPA_CMD_SETVMAC));
|
|
|
|
|
|
+ rc = qeth_l2_send_setdelmac(card, mac->mac_addr,
|
|
|
|
+ IPA_CMD_SETVMAC);
|
|
} else {
|
|
} else {
|
|
rc = qeth_l2_send_setgroupmac(card, mac->mac_addr);
|
|
rc = qeth_l2_send_setgroupmac(card, mac->mac_addr);
|
|
}
|
|
}
|
|
@@ -582,7 +579,8 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac,
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
|
|
cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
|
|
memcpy(&cmd->data.setdelmac.mac, mac, OSA_ADDR_LEN);
|
|
memcpy(&cmd->data.setdelmac.mac, mac, OSA_ADDR_LEN);
|
|
- return qeth_send_ipa_cmd(card, iob, NULL, NULL);
|
|
|
|
|
|
+ return qeth_setdel_makerc(card, qeth_send_ipa_cmd(card, iob,
|
|
|
|
+ NULL, NULL));
|
|
}
|
|
}
|
|
|
|
|
|
static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
|
|
static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
|
|
@@ -590,8 +588,7 @@ static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
QETH_CARD_TEXT(card, 2, "L2Setmac");
|
|
QETH_CARD_TEXT(card, 2, "L2Setmac");
|
|
- rc = qeth_setdel_makerc(card, qeth_l2_send_setdelmac(card, mac,
|
|
|
|
- IPA_CMD_SETVMAC));
|
|
|
|
|
|
+ rc = qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC);
|
|
if (rc == 0) {
|
|
if (rc == 0) {
|
|
card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
|
|
card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
|
|
memcpy(card->dev->dev_addr, mac, OSA_ADDR_LEN);
|
|
memcpy(card->dev->dev_addr, mac, OSA_ADDR_LEN);
|
|
@@ -621,8 +618,7 @@ static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac)
|
|
QETH_CARD_TEXT(card, 2, "L2Delmac");
|
|
QETH_CARD_TEXT(card, 2, "L2Delmac");
|
|
if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))
|
|
if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))
|
|
return 0;
|
|
return 0;
|
|
- rc = qeth_setdel_makerc(card, qeth_l2_send_setdelmac(card, mac,
|
|
|
|
- IPA_CMD_DELVMAC));
|
|
|
|
|
|
+ rc = qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC);
|
|
if (rc == 0)
|
|
if (rc == 0)
|
|
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
|
|
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
|
|
return rc;
|
|
return rc;
|