diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-28 00:49:46 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-28 00:49:46 (GMT) |
commit | 778ef1e6cbb049c9bcbf405936ee6f2b6e451892 (patch) | |
tree | 080232e75f0e138b8642af44b18d296011afdebb /drivers/staging/winbond/wbusb.c | |
parent | 3c4f1158cd887a1a8c1309fc6d07907160e8e820 (diff) | |
parent | acfa5110b83b171ec509eaf2d1a9e93a5f4709bd (diff) | |
download | linux-fsl-qoriq-778ef1e6cbb049c9bcbf405936ee6f2b6e451892.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: w35und: fix usb_control_msg() error handling in wb35_probe()
Staging: w35und: fix registration with wlan stack
Staging: panel: fix oops on panel_cleanup_module
Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211.
Staging: rtl8187se: fix Kconfig dependencies
Diffstat (limited to 'drivers/staging/winbond/wbusb.c')
-rw-r--r-- | drivers/staging/winbond/wbusb.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index b003f9a..f716b2e 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -319,16 +319,18 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id struct usb_device *udev = interface_to_usbdev(intf); struct wbsoft_priv *priv; struct ieee80211_hw *dev; - int err; + int nr, err; usb_get_dev(udev); // 20060630.2 Check the device if it already be opened - err = usb_control_msg(udev, usb_rcvctrlpipe( udev, 0 ), - 0x01, USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN, - 0x0, 0x400, <mp, 4, HZ*100 ); - if (err) + nr = usb_control_msg(udev, usb_rcvctrlpipe( udev, 0 ), + 0x01, USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN, + 0x0, 0x400, <mp, 4, HZ*100 ); + if (nr < 0) { + err = nr; goto error; + } ltmp = cpu_to_le32(ltmp); if (ltmp) { // Is already initialized? @@ -337,8 +339,10 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id } dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops); - if (!dev) + if (!dev) { + err = -ENOMEM; goto error; + } priv = dev->priv; @@ -369,9 +373,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id } dev->extra_tx_headroom = 12; /* FIXME */ - dev->flags = 0; + dev->flags = IEEE80211_HW_SIGNAL_UNSPEC; + dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); dev->channel_change_time = 1000; + dev->max_signal = 100; dev->queues = 1; dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz; |