Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Feb 28, 2009
2 parents 3c4f115 + acfa511 commit 778ef1e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 28 deletions.
23 changes: 12 additions & 11 deletions drivers/staging/panel/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2164,19 +2164,20 @@ static void __exit panel_cleanup_module(void)
if (scan_timer.function != NULL)
del_timer(&scan_timer);

if (keypad_enabled)
misc_deregister(&keypad_dev);
if (pprt != NULL) {
if (keypad_enabled)
misc_deregister(&keypad_dev);

if (lcd_enabled) {
panel_lcd_print("\x0cLCD driver " PANEL_VERSION
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-");
misc_deregister(&lcd_dev);
}

if (lcd_enabled) {
panel_lcd_print("\x0cLCD driver " PANEL_VERSION
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-");
misc_deregister(&lcd_dev);
/* TODO: free all input signals */
parport_release(pprt);
parport_unregister_device(pprt);
}

/* TODO: free all input signals */

parport_release(pprt);
parport_unregister_device(pprt);
parport_unregister_driver(&panel_driver);
}

Expand Down
1 change: 1 addition & 0 deletions drivers/staging/rtl8187se/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config RTL8187SE
tristate "RealTek RTL8187SE Wireless LAN NIC driver"
depends on PCI
depends on WIRELESS_EXT && COMPAT_NET_DEV_OPS
default N
---help---
19 changes: 10 additions & 9 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,21 @@ int ieee80211_crypto_init(void)
void ieee80211_crypto_deinit(void)
{
struct list_head *ptr, *n;
struct ieee80211_crypto_alg *alg = NULL;

if (hcrypt == NULL)
return;

for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs;
ptr = n, n = ptr->next) {
struct ieee80211_crypto_alg *alg =
(struct ieee80211_crypto_alg *) ptr;
list_del(ptr);
printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
"'%s' (deinit)\n", alg->ops->name);
kfree(alg);
list_for_each_safe(ptr, n, &hcrypt->algs) {
alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
if (alg) {
list_del(ptr);
printk(KERN_DEBUG
"ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
alg->ops->name);
kfree(alg);
}
}

kfree(hcrypt);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6161,10 +6161,10 @@ static void __exit rtl8180_pci_module_exit(void)
{
pci_unregister_driver (&rtl8180_pci_driver);
rtl8180_proc_module_remove();
ieee80211_crypto_deinit();
ieee80211_crypto_tkip_exit();
ieee80211_crypto_ccmp_exit();
ieee80211_crypto_wep_exit();
ieee80211_crypto_deinit();
DMESG("Exiting");
}

Expand Down
20 changes: 13 additions & 7 deletions drivers/staging/winbond/wbusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, &ltmp, 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, &ltmp, 4, HZ*100 );
if (nr < 0) {
err = nr;
goto error;
}

ltmp = cpu_to_le32(ltmp);
if (ltmp) { // Is already initialized?
Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 778ef1e

Please sign in to comment.