Commit 778ef1e6 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 3c4f1158 acfa5110
...@@ -2164,19 +2164,20 @@ static void __exit panel_cleanup_module(void) ...@@ -2164,19 +2164,20 @@ static void __exit panel_cleanup_module(void)
if (scan_timer.function != NULL) if (scan_timer.function != NULL)
del_timer(&scan_timer); del_timer(&scan_timer);
if (keypad_enabled) if (pprt != NULL) {
misc_deregister(&keypad_dev); 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) { /* TODO: free all input signals */
panel_lcd_print("\x0cLCD driver " PANEL_VERSION parport_release(pprt);
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-"); parport_unregister_device(pprt);
misc_deregister(&lcd_dev);
} }
/* TODO: free all input signals */
parport_release(pprt);
parport_unregister_device(pprt);
parport_unregister_driver(&panel_driver); parport_unregister_driver(&panel_driver);
} }
......
config RTL8187SE config RTL8187SE
tristate "RealTek RTL8187SE Wireless LAN NIC driver" tristate "RealTek RTL8187SE Wireless LAN NIC driver"
depends on PCI depends on PCI
depends on WIRELESS_EXT && COMPAT_NET_DEV_OPS
default N default N
---help--- ---help---
...@@ -234,20 +234,21 @@ int ieee80211_crypto_init(void) ...@@ -234,20 +234,21 @@ int ieee80211_crypto_init(void)
void ieee80211_crypto_deinit(void) void ieee80211_crypto_deinit(void)
{ {
struct list_head *ptr, *n; struct list_head *ptr, *n;
struct ieee80211_crypto_alg *alg = NULL;
if (hcrypt == NULL) if (hcrypt == NULL)
return; return;
for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; list_for_each_safe(ptr, n, &hcrypt->algs) {
ptr = n, n = ptr->next) { alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
struct ieee80211_crypto_alg *alg = if (alg) {
(struct ieee80211_crypto_alg *) ptr; list_del(ptr);
list_del(ptr); printk(KERN_DEBUG
printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " "ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
"'%s' (deinit)\n", alg->ops->name); alg->ops->name);
kfree(alg); kfree(alg);
}
} }
kfree(hcrypt); kfree(hcrypt);
} }
......
...@@ -6161,10 +6161,10 @@ static void __exit rtl8180_pci_module_exit(void) ...@@ -6161,10 +6161,10 @@ static void __exit rtl8180_pci_module_exit(void)
{ {
pci_unregister_driver (&rtl8180_pci_driver); pci_unregister_driver (&rtl8180_pci_driver);
rtl8180_proc_module_remove(); rtl8180_proc_module_remove();
ieee80211_crypto_deinit();
ieee80211_crypto_tkip_exit(); ieee80211_crypto_tkip_exit();
ieee80211_crypto_ccmp_exit(); ieee80211_crypto_ccmp_exit();
ieee80211_crypto_wep_exit(); ieee80211_crypto_wep_exit();
ieee80211_crypto_deinit();
DMESG("Exiting"); DMESG("Exiting");
} }
......
...@@ -319,16 +319,18 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -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 usb_device *udev = interface_to_usbdev(intf);
struct wbsoft_priv *priv; struct wbsoft_priv *priv;
struct ieee80211_hw *dev; struct ieee80211_hw *dev;
int err; int nr, err;
usb_get_dev(udev); usb_get_dev(udev);
// 20060630.2 Check the device if it already be opened // 20060630.2 Check the device if it already be opened
err = usb_control_msg(udev, usb_rcvctrlpipe( udev, 0 ), nr = usb_control_msg(udev, usb_rcvctrlpipe( udev, 0 ),
0x01, USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN, 0x01, USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN,
0x0, 0x400, &ltmp, 4, HZ*100 ); 0x0, 0x400, &ltmp, 4, HZ*100 );
if (err) if (nr < 0) {
err = nr;
goto error; goto error;
}
ltmp = cpu_to_le32(ltmp); ltmp = cpu_to_le32(ltmp);
if (ltmp) { // Is already initialized? if (ltmp) { // Is already initialized?
...@@ -337,8 +339,10 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -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); dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops);
if (!dev) if (!dev) {
err = -ENOMEM;
goto error; goto error;
}
priv = dev->priv; priv = dev->priv;
...@@ -369,9 +373,11 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id ...@@ -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->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->channel_change_time = 1000;
dev->max_signal = 100;
dev->queues = 1; dev->queues = 1;
dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz; dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment