Typically, the r argument passed to nfc_shdlc_connect_complete() comes from xmit() cb which returns, in successfull usecase, number of successfully transmited bytes. Therefore, e.g. sending UA frame the shdlc will go into wrong state (DISCONNECTED insted of CONNECTED). Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@xxxxxxxxx> --- net/nfc/hci/shdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c index fe66cbc..12feb58 100644 --- a/net/nfc/hci/shdlc.c +++ b/net/nfc/hci/shdlc.c @@ -309,7 +309,7 @@ static void nfc_shdlc_connect_complete(struct nfc_shdlc *shdlc, int r) del_timer_sync(&shdlc->connect_timer); - if (r == 0) { + if (r >= 0) { shdlc->ns = 0; shdlc->nr = 0; shdlc->dnr = 0; -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html