aboutsummaryrefslogtreecommitdiff
path: root/drivers/ar6000
diff options
context:
space:
mode:
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);
}