Skip to content

Commit 3c64191

Browse files
zandreygregkh
authored andcommitted
rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request
[ Upstream commit e56b3d9 ] 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: 039ee17 ("rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()") Signed-off-by: Andrey Zhizhikin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f999ca8 commit 3c64191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/rndis_host.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
387387
reply_len = sizeof *phym;
388388
retval = rndis_query(dev, intf, u.buf,
389389
RNDIS_OID_GEN_PHYSICAL_MEDIUM,
390-
0, (void **) &phym, &reply_len);
390+
reply_len, (void **)&phym, &reply_len);
391391
if (retval != 0 || !phym) {
392392
/* OID is optional so don't fail here. */
393393
phym_unspec = cpu_to_le32(RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED);

0 commit comments

Comments
 (0)