* [PATCH 1/5] Staging: rtl8187se: fix Kconfig dependencies
2009-02-27 22:45 [GIT PATCH] STAGING patches for 2.6-git Greg KH
@ 2009-02-27 22:49 ` Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 2/5] Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211 Greg Kroah-Hartman
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-02-27 22:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy Dunlap, Greg Kroah-Hartman
From: Randy Dunlap <randy.dunlap@oracle.com>
rtl8187se uses wireless extensions so it needs to depend on
WIRELESS_EXT (or select it).
rtl8187se uses fields in struct net_device that are only present
if CONFIG_COMPAT_NET_DEV_OPS=y, so it needs to depend on
that symbol also.
drivers/staging/rtl8187se/r8180_core.c:5973: error: 'struct net_device' has no member named 'wireless_handlers'
drivers/staging/rtl8187se/r8180_core.c:5982: error: 'struct net_device' has no member named 'wireless_handlers'
drivers/staging/rtl8187se/r8180_core.c:201: error: 'struct net_device' has no member named 'stop'
drivers/staging/rtl8187se/r8180_core.c:4584: error: 'struct net_device' has no member named 'get_stats'
drivers/staging/rtl8187se/r8180_core.c:5969: error: 'struct net_device' has no member named 'open'
drivers/staging/rtl8187se/r8180_core.c:5970: error: 'struct net_device' has no member named 'stop'
drivers/staging/rtl8187se/r8180_core.c:5972: error: 'struct net_device' has no member named 'tx_timeout'
drivers/staging/rtl8187se/r8180_core.c:5974: error: 'struct net_device' has no member named 'do_ioctl'
drivers/staging/rtl8187se/r8180_core.c:5975: error: 'struct net_device' has no member named 'set_multicast_list'
drivers/staging/rtl8187se/r8180_core.c:5976: error: 'struct net_device' has no member named 'set_mac_address'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/rtl8187se/Kconfig b/drivers/staging/rtl8187se/Kconfig
index 79c225a..f636296 100644
--- a/drivers/staging/rtl8187se/Kconfig
+++ b/drivers/staging/rtl8187se/Kconfig
@@ -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---
--
1.6.0.2
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 2/5] Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211.
2009-02-27 22:45 [GIT PATCH] STAGING patches for 2.6-git Greg KH
2009-02-27 22:49 ` [PATCH 1/5] Staging: rtl8187se: fix Kconfig dependencies Greg Kroah-Hartman
@ 2009-02-27 22:49 ` Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 3/5] Staging: panel: fix oops on panel_cleanup_module Greg Kroah-Hartman
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-02-27 22:49 UTC (permalink / raw)
To: linux-kernel; +Cc: leandro Costantino, Greg Kroah-Hartman
From: leandro Costantino <lcostantino@gmail.com>
when modprobe and removing rtl8187se ( just for testing, i do not have
that card , and oops and a memory poison error happens on the builtin
ieee80211 of that driver. I dont know if they will port it to the
current ieeee80221 instead of the builtin ones, but just in case i
attach a proposed fix for that problem.
- Change for loop on ieee80211_crypto_deinit for list_for_each_safe to
remove items. Is there an spinlock needed here?
- Call ieee80211_crypto_deinit after exiting all registerd crypto protocols.
Signed-off-by: Costantino Leandro <lcostantino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../staging/rtl8187se/ieee80211/ieee80211_crypt.c | 19 ++++++++++---------
drivers/staging/rtl8187se/r8180_core.c | 2 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
index af64cfb..7370296 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
@@ -234,20 +234,21 @@ out:
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);
}
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 9453495..66de5cc 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -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");
}
--
1.6.0.2
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 3/5] Staging: panel: fix oops on panel_cleanup_module
2009-02-27 22:45 [GIT PATCH] STAGING patches for 2.6-git Greg KH
2009-02-27 22:49 ` [PATCH 1/5] Staging: rtl8187se: fix Kconfig dependencies Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 2/5] Staging: rtl8187se: Fix oops and memory poison caused by builtin ieee80211 Greg Kroah-Hartman
@ 2009-02-27 22:49 ` Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 4/5] Staging: w35und: fix registration with wlan stack Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 5/5] Staging: w35und: fix usb_control_msg() error handling in wb35_probe() Greg Kroah-Hartman
4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-02-27 22:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Costantino Leandro, Greg Kroah-Hartman
From: Costantino Leandro <lcostantino@gmail.com>
Check for null pardevice (not registered, ej: panel never attached,
inexistent parport, etc. ) before calling parport_release,
parport_unregister_device, and related funcs on module release.
Signed-off-by: Costantino Leandro <lcostantino@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/panel/panel.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index ab69c1b..c2747bc 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -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);
}
--
1.6.0.2
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 4/5] Staging: w35und: fix registration with wlan stack
2009-02-27 22:45 [GIT PATCH] STAGING patches for 2.6-git Greg KH
` (2 preceding siblings ...)
2009-02-27 22:49 ` [PATCH 3/5] Staging: panel: fix oops on panel_cleanup_module Greg Kroah-Hartman
@ 2009-02-27 22:49 ` Greg Kroah-Hartman
2009-02-27 22:49 ` [PATCH 5/5] Staging: w35und: fix usb_control_msg() error handling in wb35_probe() Greg Kroah-Hartman
4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-02-27 22:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Pavel Machek, Greg Kroah-Hartman
From: Pavel Machek <pavel@suse.cz>
Initialize few more fields in wireless device structure so that
wireless core actually accepts our registration.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/wbusb.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index b003f9a..49f1bf0 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -369,9 +369,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;
--
1.6.0.2
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 5/5] Staging: w35und: fix usb_control_msg() error handling in wb35_probe()
2009-02-27 22:45 [GIT PATCH] STAGING patches for 2.6-git Greg KH
` (3 preceding siblings ...)
2009-02-27 22:49 ` [PATCH 4/5] Staging: w35und: fix registration with wlan stack Greg Kroah-Hartman
@ 2009-02-27 22:49 ` Greg Kroah-Hartman
4 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2009-02-27 22:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Pekka Enberg, Greg Kroah-Hartman
From: Pekka Enberg <penberg@cs.helsinki.fi>
If successful, the usb_control_msg() function returns the number of
bytes transferred. Fix up wb35_probe() to only bail out if the function returns
a negative number. Also, fix up ieee80211_alloc_hw() error code to ENOMEM;
otherwise GCC complains that err might be undefined (and is right about that).
Acked-by: Pavel Machek <pavel@suse.cz>
Reported-and-tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/wbusb.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 49f1bf0..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;
--
1.6.0.2
^ permalink raw reply [flat|nested] 6+ messages in thread