]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/b43/rfkill.c
b43: Issue warning when RFKILL_INPUT is not enabled
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / b43 / rfkill.c
index fec5645944a4da39a93b76a784d7da731163e047..96902da7d6618ddd573338bba606b2f4c83c7ae0 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "rfkill.h"
 #include "b43.h"
+#include "phy_common.h"
 
 #include <linux/kmod.h>
 
@@ -114,11 +115,11 @@ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state)
                        goto out_unlock;
                }
                if (!dev->phy.radio_on)
-                       b43_radio_turn_on(dev);
+                       b43_software_rfkill(dev, state);
                break;
        case RFKILL_STATE_SOFT_BLOCKED:
                if (dev->phy.radio_on)
-                       b43_radio_turn_off(dev, 0);
+                       b43_software_rfkill(dev, state);
                break;
        default:
                b43warn(wl, "Received unexpected rfkill state %d.\n", state);
@@ -187,6 +188,11 @@ void b43_rfkill_init(struct b43_wldev *dev)
                        "The built-in radio LED will not work.\n");
 #endif /* CONFIG_RFKILL_INPUT */
 
+#if !defined(CONFIG_RFKILL_INPUT) && !defined(CONFIG_RFKILL_INPUT_MODULE)
+       b43warn(wl, "The rfkill-input subsystem is not available. "
+               "The built-in radio LED will not work.\n");
+#endif
+
        err = input_register_polled_device(rfk->poll_dev);
        if (err)
                goto err_unreg_rfk;