aboutsummaryrefslogtreecommitdiff
path: root/drivers/ar6000
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2009-04-14 02:10:02 -0500
committerNelson Castillo <arhuaco@freaks-unidos.net>2009-04-14 02:10:02 -0500
commit2bea5c68313577b214b872b0edc5968db0cf3b68 (patch)
tree21439bfa0b45375673712cad9f4561c8c4d904df /drivers/ar6000
parentd9a7be9aab65cd86981d60806041ac11fe514277 (diff)
Fix kernel oops when starting wpa_supplicant.
This closes bug #2267. Signed-off-by: Mike Westerhof <mwester@dls.net>
Diffstat (limited to 'drivers/ar6000')
-rw-r--r--drivers/ar6000/ar6000/wireless_ext.c10
1 files changed, 10 insertions, 0 deletions
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);
}