Skip to content
Commit 6314dab4 authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller
Browse files

net: cdc_ncm: GetNtbFormat endian fix



The GetNtbFormat and SetNtbFormat requests operate on 16 bit little
endian values. We get away with ignoring this most of the time, because
we only care about USB_CDC_NCM_NTB16_FORMAT which is 0x0000.  This
fails for USB_CDC_NCM_NTB32_FORMAT.

Fix comparison between LE value from device and constant by converting
the constant to LE.

Reported-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Fixes: 2b02c20c ("cdc_ncm: Set NTB format again after altsetting switch for Huawei devices")
Cc: Enrico Mioso <mrkiko.rs@gmail.com>
Cc: Christian Panton <christian@panton.org>
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Acked-By: default avatarEnrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b74912a2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment