mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
sierra_net: Skip validating irrelevant fields for IDLE LSIs
[ Upstream commit 764895d303 ]
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: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bed8b8627a
commit
9217eeefee
@@ -365,6 +365,13 @@ static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen)
|
||||
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 */
|
||||
if (lsi->protocol != SIERRA_NET_PROTOCOL_UMTS) {
|
||||
netdev_err(dev->net, "Protocol unsupported, 0x%02x\n",
|
||||
@@ -386,13 +393,6 @@ static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen)
|
||||
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 */
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user