summaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core_mpc.h
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-02-12 18:33:17 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-12 13:14:24 -0500
commitc21532771e9f965a609d4280bade7139b1452273 (patch)
tree4ecdbc9d42769a3c92e4d851d5cfe21bce7db39c /drivers/s390/net/qeth_core_mpc.h
parent84dbea461e490d7bba3706637efd7835eb3c8205 (diff)
downloadlinux-stable-c21532771e9f965a609d4280bade7139b1452273.tar.gz
linux-stable-c21532771e9f965a609d4280bade7139b1452273.tar.bz2
linux-stable-c21532771e9f965a609d4280bade7139b1452273.zip
s390/qeth: consolidate filling of low-level cmd length fields
The code to fill the IPA length fields is duplicated three times across the driver: 1. qeth_send_ipa_cmd() sets IPA_CMD_LENGTH, which matches the defaults in the IPA_PDU_HEADER template. 2. for OSN, qeth_osn_send_ipa_cmd() bypasses this logic and inserts the length passed by the caller. 3. SNMP commands (that can outgrow IPA_CMD_LENGTH) have their own way of setting the length fields, via qeth_send_ipa_snmp_cmd(). Consolidate this into qeth_prepare_ipa_cmd(), which all originators of IPA cmds already call during setup of their cmd. Let qeth_send_ipa_cmd() pull the length from the cmd instead of hard-coding IPA_CMD_LENGTH. For now, the SNMP code still needs to fix-up its length fields manually. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core_mpc.h')
-rw-r--r--drivers/s390/net/qeth_core_mpc.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h
index 07a48ee95dba..1ac88da91a40 100644
--- a/drivers/s390/net/qeth_core_mpc.h
+++ b/drivers/s390/net/qeth_core_mpc.h
@@ -21,8 +21,6 @@
extern unsigned char IPA_PDU_HEADER[];
#define QETH_IPA_CMD_DEST_ADDR(buffer) (buffer + 0x2c)
-#define IPA_CMD_LENGTH (IPA_PDU_HEADER_SIZE + sizeof(struct qeth_ipa_cmd))
-
#define QETH_SEQ_NO_LENGTH 4
#define QETH_MPC_TOKEN_LENGTH 4
#define QETH_MCL_LENGTH 4