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

Commit 764895d3 authored by Stefan Brüns's avatar Stefan Brüns Committed by David S. Miller
Browse files

sierra_net: Skip validating irrelevant fields for IDLE LSIs



When the context is deactivated, the link_type is set to 0xff, which
triggers a warning message, and results in a wrong link status, as
the LSI is ignored.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a70348e
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -384,6 +384,13 @@ static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen)
		return -1;
		return -1;
	}
	}


	/* Validate the session state */
	if (lsi->session_state == SIERRA_NET_SESSION_IDLE) {
		netdev_err(dev->net, "Session idle, 0x%02x\n",
			   lsi->session_state);
		return 0;
	}

	/* Validate the protocol  - only support UMTS for now */
	/* Validate the protocol  - only support UMTS for now */
	if (lsi->protocol == SIERRA_NET_PROTOCOL_UMTS) {
	if (lsi->protocol == SIERRA_NET_PROTOCOL_UMTS) {
		struct lsi_umts_single *single = (struct lsi_umts_single *)lsi;
		struct lsi_umts_single *single = (struct lsi_umts_single *)lsi;
@@ -417,13 +424,6 @@ static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen)
		return 0;
		return 0;
	}
	}


	/* Validate the session state */
	if (lsi->session_state == SIERRA_NET_SESSION_IDLE) {
		netdev_err(dev->net, "Session idle, 0x%02x\n",
			lsi->session_state);
		return 0;
	}

	/* Set link_sense true */
	/* Set link_sense true */
	return 1;
	return 1;
}
}