Commit d782d80f authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: clean up drop conditions for received cmds

If qeth_check_ipa_data() consumed an event, there's no point in
processing it further. So drop it early, and make the surrounding code
a tiny bit more readable.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d19b93f4
...@@ -826,16 +826,17 @@ static void qeth_send_control_data_cb(struct qeth_card *card, ...@@ -826,16 +826,17 @@ static void qeth_send_control_data_cb(struct qeth_card *card,
if (IS_IPA(iob->data)) { if (IS_IPA(iob->data)) {
cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data);
cmd = qeth_check_ipa_data(card, cmd); cmd = qeth_check_ipa_data(card, cmd);
} if (!cmd)
if ((cmd == NULL) && (card->state != CARD_STATE_DOWN)) goto out;
goto out; if (IS_OSN(card) && card->osn_info.assist_cb &&
/*in case of OSN : check if cmd is set */ cmd->hdr.command != IPA_CMD_STARTLAN) {
if (card->info.type == QETH_CARD_TYPE_OSN && card->osn_info.assist_cb(card->dev, cmd);
cmd && goto out;
cmd->hdr.command != IPA_CMD_STARTLAN && }
card->osn_info.assist_cb != NULL) { } else {
card->osn_info.assist_cb(card->dev, cmd); /* non-IPA commands should only flow during initialization */
goto out; if (card->state != CARD_STATE_DOWN)
goto out;
} }
spin_lock_irqsave(&card->lock, flags); spin_lock_irqsave(&card->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment