diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
commit | 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (patch) | |
tree | e64954326ced9c365c52c256f01b5f9fb1bcae66 /drivers/net/usb/rndis_host.c | |
parent | ed85f2c3b2b72bd20f617ac749f5c22be8d0f66e (diff) | |
parent | 50fd4407b8bfbde7c1a0bfe4f24de7df37164342 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r-- | drivers/net/usb/rndis_host.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 06ae1b2b3b34..21a7785cb8b6 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -283,7 +283,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
283 | struct rndis_set_c *set_c; | 283 | struct rndis_set_c *set_c; |
284 | struct rndis_halt *halt; | 284 | struct rndis_halt *halt; |
285 | } u; | 285 | } u; |
286 | u32 tmp; | 286 | u32 tmp, phym_unspec; |
287 | __le32 *phym; | 287 | __le32 *phym; |
288 | int reply_len; | 288 | int reply_len; |
289 | unsigned char *bp; | 289 | unsigned char *bp; |
@@ -364,12 +364,15 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
364 | goto halt_fail_and_release; | 364 | goto halt_fail_and_release; |
365 | 365 | ||
366 | /* Check physical medium */ | 366 | /* Check physical medium */ |
367 | phym = NULL; | ||
367 | reply_len = sizeof *phym; | 368 | reply_len = sizeof *phym; |
368 | retval = rndis_query(dev, intf, u.buf, OID_GEN_PHYSICAL_MEDIUM, | 369 | retval = rndis_query(dev, intf, u.buf, OID_GEN_PHYSICAL_MEDIUM, |
369 | 0, (void **) &phym, &reply_len); | 370 | 0, (void **) &phym, &reply_len); |
370 | if (retval != 0) | 371 | if (retval != 0 || !phym) { |
371 | /* OID is optional so don't fail here. */ | 372 | /* OID is optional so don't fail here. */ |
372 | *phym = RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED; | 373 | phym_unspec = RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED; |
374 | phym = &phym_unspec; | ||
375 | } | ||
373 | if ((flags & FLAG_RNDIS_PHYM_WIRELESS) && | 376 | if ((flags & FLAG_RNDIS_PHYM_WIRELESS) && |
374 | *phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { | 377 | *phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) { |
375 | if (netif_msg_probe(dev)) | 378 | if (netif_msg_probe(dev)) |