From 2bea5c68313577b214b872b0edc5968db0cf3b68 Mon Sep 17 00:00:00 2001 From: Mike Westerhof Date: Tue, 14 Apr 2009 02:10:02 -0500 Subject: Fix kernel oops when starting wpa_supplicant. This closes bug #2267. Signed-off-by: Mike Westerhof --- drivers/ar6000/ar6000/wireless_ext.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/ar6000') diff --git a/drivers/ar6000/ar6000/wireless_ext.c b/drivers/ar6000/ar6000/wireless_ext.c index d9a592038e6..af78ae05fcb 100644 --- a/drivers/ar6000/ar6000/wireless_ext.c +++ b/drivers/ar6000/ar6000/wireless_ext.c @@ -976,6 +976,16 @@ static int ar6000_ioctl_giwpower(struct net_device *dev, { AR_SOFTC_T *ar = (AR_SOFTC_T *)netdev_priv(dev); + /* + * FIXME: + * https://docs.openmoko.org/trac/ticket/2267 + * When starting wpa_supplicant the kernel oopses. + * The following condition avoids the oops. + * Remove this comment to bless this solution. + */ + if (ar->arWlanState == WLAN_DISABLED || ar->arWmiReady == FALSE) + return -EIO; + return wmi_get_power_mode_cmd(ar->arWmi); } -- cgit v1.2.3