rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Fri, 8 Jan 2021 09:58:39 +0000 (09:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 15:04:01 +0000 (16:04 +0100)
commit3c64191cad985df173532c8e666eca31028afd81
tree60fc7ffa4772eb5e5afe5c117ff4635803b1bf1c
parentf999ca8c5fc5c7c87f837c13ba4998d7a2777855
rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request

[ Upstream commit e56b3d94d939f52d46209b9e1b6700c5bfff3123 ]

MSFT ActiveSync implementation requires that the size of the response for
incoming query is to be provided in the request input length. Failure to
set the input size proper results in failed request transfer, where the
ActiveSync counterpart reports the NDIS_STATUS_INVALID_LENGTH (0xC0010014L)
error.

Set the input size for OID_GEN_PHYSICAL_MEDIUM query to the expected size
of the response in order for the ActiveSync to properly respond to the
request.

Fixes: 039ee17d1baa ("rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Link: https://lore.kernel.org/r/20210108095839.3335-1-andrey.zhizhikin@leica-geosystems.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/rndis_host.c