Hello,
I have found that sierra_net does not work properly on big-endian
systems, bytes needs to be flipped before checking.
Signed-off-by: Maris Paupe <marisp@xxxxx>
---
kernel/linux6/drivers/net/usb/sierra_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/linux6/drivers/net/usb/sierra_net.c
b/kernel/linux6/drivers/net/usb/sierra_net.c
index f1942d6..4a8497b 100644
--- a/kernel/linux6/drivers/net/usb/sierra_net.c
+++ b/kernel/linux6/drivers/net/usb/sierra_net.c
@@ -779,7 +779,7 @@ static int sierra_net_bind(struct usbnet *dev,
struct usb_interface *intf)
dev_dbg(&dev->udev->dev, "Fw attr: %x\n", fwattr);
/* test whether firmware supports DHCP */
- if (!(status == sizeof(fwattr) && (fwattr &
SWI_GET_FW_ATTR_MASK))) {
+ if (!(status == sizeof(fwattr) && (le16_to_cpu(fwattr) &
SWI_GET_FW_ATTR_MASK))) {
/* found incompatible firmware version */
dev_err(&dev->udev->dev, "Incompatible driver and firmware"
" versions\n");
---
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html