Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e055d03d authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller
Browse files

isdn/gigaset: improve error handling querying firmware version



An out-of-place "OK" response to the "AT+GMR" (get firmware version)
command turns out to be, more often than not, a delayed response to
a previous command rather than an actual error, so continue waiting
for the version number in that case.

Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
CC: stable <stable@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62a1cfe0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ struct reply_t gigaset_tab_nocid[] =
								  ACT_INIT} },
	{RSP_OK,	121, 121, -1,			  0,  0, {ACT_GOTVER,
								  ACT_INIT} },
	{RSP_NONE,	121, 121, -1,			120,  0, {ACT_GETSTRING} },

/* leave dle mode */
	{RSP_INIT,	  0,   0, SEQ_DLE0,		201,  5, {0},	"^SDLE=0\r"},
@@ -1314,8 +1315,9 @@ static void do_action(int action, struct cardstate *cs,
		s = ev->ptr;

		if (!strcmp(s, "OK")) {
			/* OK without version string: assume old response */
			*p_genresp = 1;
			*p_resp_code = RSP_ERROR;
			*p_resp_code = RSP_NONE;
			break;
		}