Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[pandora-kernel.git] / drivers / net / wireless / b43legacy / rfkill.c
index d178dfb..b32bf6a 100644 (file)
@@ -90,7 +90,7 @@ static int b43legacy_rfkill_soft_toggle(void *data, enum rfkill_state state)
                goto out_unlock;
        err = 0;
        switch (state) {
-       case RFKILL_STATE_ON:
+       case RFKILL_STATE_UNBLOCKED:
                if (!dev->radio_hw_enable) {
                        /* No luck. We can't toggle the hardware RF-kill
                         * button from software. */
@@ -100,10 +100,14 @@ static int b43legacy_rfkill_soft_toggle(void *data, enum rfkill_state state)
                if (!dev->phy.radio_on)
                        b43legacy_radio_turn_on(dev);
                break;
-       case RFKILL_STATE_OFF:
+       case RFKILL_STATE_SOFT_BLOCKED:
                if (dev->phy.radio_on)
                        b43legacy_radio_turn_off(dev, 0);
                break;
+       default:
+               b43legacywarn(wl, "Received unexpected rfkill state %d.\n",
+                             state);
+               break;
        }
 
 out_unlock:
@@ -135,7 +139,7 @@ void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
        snprintf(rfk->name, sizeof(rfk->name),
                 "b43legacy-%s", wiphy_name(wl->hw->wiphy));
        rfk->rfkill->name = rfk->name;
-       rfk->rfkill->state = RFKILL_STATE_ON;
+       rfk->rfkill->state = RFKILL_STATE_UNBLOCKED;
        rfk->rfkill->data = dev;
        rfk->rfkill->toggle_radio = b43legacy_rfkill_soft_toggle;
        rfk->rfkill->user_claim_unsupported = 1;