summaryrefslogtreecommitdiff
path: root/drivers/net/usb/huawei_cdc_ncm.c
diff options
context:
space:
mode:
authorAlexander Bersenev <bay@hackerdom.ru>2020-03-06 01:33:16 +0500
committerDavid S. Miller <davem@davemloft.net>2020-03-11 22:59:31 -0700
commit0fa81b304a7973a499f844176ca031109487dd31 (patch)
treefc70d769637f9eb97c1fa980edc616432431558d /drivers/net/usb/huawei_cdc_ncm.c
parent81f954a44567567c7d74a97b1db78fb43afc253d (diff)
cdc_ncm: Implement the 32-bit version of NCM Transfer Block
The NCM specification defines two formats of transfer blocks: with 16-bit fields (NTB-16) and with 32-bit fields (NTB-32). Currently only NTB-16 is implemented. This patch adds the support of NTB-32. The motivation behind this is that some devices such as E5785 or E5885 from the current generation of Huawei LTE routers do not support NTB-16. The previous generations of Huawei devices are also use NTB-32 by default. Also this patch enables NTB-32 by default for Huawei devices. During the 2019 ValdikSS made five attempts to contact Huawei to add the NTB-16 support to their router firmware, but they were unsuccessful. Signed-off-by: Alexander Bersenev <bay@hackerdom.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/huawei_cdc_ncm.c')
-rw-r--r--drivers/net/usb/huawei_cdc_ncm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/usb/huawei_cdc_ncm.c b/drivers/net/usb/huawei_cdc_ncm.c
index e15a472c6a54..099d84827004 100644
--- a/drivers/net/usb/huawei_cdc_ncm.c
+++ b/drivers/net/usb/huawei_cdc_ncm.c
@@ -77,11 +77,11 @@ static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev,
*/
drvflags |= CDC_NCM_FLAG_NDP_TO_END;
- /* Additionally, it has been reported that some Huawei E3372H devices, with
- * firmware version 21.318.01.00.541, come out of reset in NTB32 format mode, hence
- * needing to be set to the NTB16 one again.
+ /* For many Huawei devices the NTB32 mode is the default and the best mode
+ * they work with. Huawei E5785 and E5885 devices refuse to work in NTB16 mode at all.
*/
- drvflags |= CDC_NCM_FLAG_RESET_NTB16;
+ drvflags |= CDC_NCM_FLAG_PREFER_NTB32;
+
ret = cdc_ncm_bind_common(usbnet_dev, intf, 1, drvflags);
if (ret)
goto err;