diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-06-27 17:01:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-27 10:18:23 -0700 |
commit | 5cfbe10a000aec92003d72061d250aa7a95bc02a (patch) | |
tree | 2e219909a71e935dbae16e199114f2ef7f8c8990 /drivers/s390/net/qeth_core_mpc.h | |
parent | b9150461e5a6f4a78d0ef8a4d4f2a41f5a12d979 (diff) | |
download | lwn-5cfbe10a000aec92003d72061d250aa7a95bc02a.tar.gz lwn-5cfbe10a000aec92003d72061d250aa7a95bc02a.zip |
s390/qeth: dynamically allocate diag cmds
Add a new wrapper that allocates DIAG cmds of the right size, and fills
in the common fields.
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h index 46f038580a72..5cec877d972f 100644 --- a/drivers/s390/net/qeth_core_mpc.h +++ b/drivers/s390/net/qeth_core_mpc.h @@ -599,6 +599,11 @@ struct qeth_ipacmd_diagass { __u8 cdata[64]; } __attribute__ ((packed)); +#define DIAG_HDR_LEN offsetofend(struct qeth_ipacmd_diagass, ext) +#define DIAG_SUB_HDR_LEN (offsetofend(struct qeth_ipacmd_diagass, ext) -\ + offsetof(struct qeth_ipacmd_diagass, \ + subcmd_len)) + /* VNIC Characteristics IPA Command: *****************************************/ /* IPA commands/sub commands for VNICC */ #define IPA_VNICC_QUERY_CHARS 0x00000000L |