Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87830
b: refs/heads/master
c: 9f5e60d
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and Jeff Garzik committed Mar 26, 2008
1 parent 599df70 commit c9367e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1186dee3e785679876f6b629609ec080842edda
refs/heads/master: 9f5e60dd5ffca938da4cabc197af8b9405b5512e
9 changes: 6 additions & 3 deletions trunk/drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
struct rndis_set_c *set_c;
struct rndis_halt *halt;
} u;
u32 tmp, *phym;
u32 tmp, phym_unspec, *phym;
int reply_len;
unsigned char *bp;

Expand Down Expand Up @@ -363,12 +363,15 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
goto halt_fail_and_release;

/* Check physical medium */
phym = NULL;
reply_len = sizeof *phym;
retval = rndis_query(dev, intf, u.buf, OID_GEN_PHYSICAL_MEDIUM,
0, (void **) &phym, &reply_len);
if (retval != 0)
if (retval != 0 || !phym) {
/* OID is optional so don't fail here. */
*phym = RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED;
phym_unspec = RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED;
phym = &phym_unspec;
}
if ((flags & FLAG_RNDIS_PHYM_WIRELESS) &&
*phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) {
if (netif_msg_probe(dev))
Expand Down

0 comments on commit c9367e2

Please sign in to comment.