qeth: Fix command sizes
authorStefan Raspl <raspl@linux.vnet.ibm.com>
Fri, 27 Feb 2015 11:52:33 +0000 (12:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Mar 2015 04:38:29 +0000 (23:38 -0500)
This patch adjusts two instances where we were using the (too big)
struct qeth_ipacmd_setadpparms size instead of the commands' actual
size. This didn't do any harm, but wasted a few bytes.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c

index 642c77c76b8432d07534e393335353cfbc27233a..3466d3cb76474c2092cdd1d679d3a7704e793984 100644 (file)
@@ -4218,7 +4218,7 @@ void qeth_setadp_promisc_mode(struct qeth_card *card)
        QETH_CARD_TEXT_(card, 4, "mode:%x", mode);
 
        iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE,
-                       sizeof(struct qeth_ipacmd_setadpparms));
+                       sizeof(struct qeth_ipacmd_setadpparms_hdr) + 8);
        if (!iob)
                return;
        cmd = (struct qeth_ipa_cmd *)(iob->data + IPA_PDU_HEADER_SIZE);
@@ -4290,7 +4290,8 @@ int qeth_setadpparms_change_macaddr(struct qeth_card *card)
        QETH_CARD_TEXT(card, 4, "chgmac");
 
        iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS,
-                                  sizeof(struct qeth_ipacmd_setadpparms));
+                                  sizeof(struct qeth_ipacmd_setadpparms_hdr) +
+                                  sizeof(struct qeth_change_addr));
        if (!iob)
                return -ENOMEM;
        cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);