diff options
author | Julian Wiedmann | 2019-02-12 18:33:17 +0100 |
---|---|---|
committer | David S. Miller | 2019-02-12 19:14:24 +0100 |
commit | c21532771e9f965a609d4280bade7139b1452273 (patch) | |
tree | 4ecdbc9d42769a3c92e4d851d5cfe21bce7db39c /drivers/s390/net/qeth_core.h | |
parent | s390/qeth: reduce data length for ARP cache query (diff) | |
download | kernel-qcow2-linux-c21532771e9f965a609d4280bade7139b1452273.tar.gz kernel-qcow2-linux-c21532771e9f965a609d4280bade7139b1452273.tar.xz kernel-qcow2-linux-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.h')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index f35e0b58ba4e..07840f9c0bb3 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -1000,7 +1000,8 @@ void qeth_tx_timeout(struct net_device *); void qeth_prepare_control_data(struct qeth_card *, int, struct qeth_cmd_buffer *); void qeth_release_buffer(struct qeth_channel *, struct qeth_cmd_buffer *); -void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob); +void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, + u16 cmd_length); struct qeth_cmd_buffer *qeth_wait_for_buffer(struct qeth_channel *); int qeth_query_switch_attributes(struct qeth_card *card, struct qeth_switch_info *sw_info); |