int ict_index;
        bool use_ict;
        bool is_down, opmode_down;
-       bool debug_rfkill;
+       s8 debug_rfkill;
        struct isr_statistics isr_stats;
 
        spinlock_t irq_lock;
 
        lockdep_assert_held(&trans_pcie->mutex);
 
-       if (trans_pcie->debug_rfkill)
+       if (trans_pcie->debug_rfkill == 1)
                return true;
 
        return !(iwl_read32(trans, CSR_GP_CNTRL) &
 
 {
        struct iwl_trans *trans = file->private_data;
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
-       bool old = trans_pcie->debug_rfkill;
+       bool new_value;
        int ret;
 
-       ret = kstrtobool_from_user(user_buf, count, &trans_pcie->debug_rfkill);
+       ret = kstrtobool_from_user(user_buf, count, &new_value);
        if (ret)
                return ret;
-       if (old == trans_pcie->debug_rfkill)
+       if (new_value == trans_pcie->debug_rfkill)
                return count;
        IWL_WARN(trans, "changing debug rfkill %d->%d\n",
-                old, trans_pcie->debug_rfkill);
+                trans_pcie->debug_rfkill, new_value);
+       trans_pcie->debug_rfkill = new_value;
        iwl_pcie_handle_rfkill_irq(trans);
 
        return count;
                ret = -ENOMEM;
                goto out_no_pci;
        }
-
+       trans_pcie->debug_rfkill = -1;
 
        if (!cfg->base_params->pcie_l1_allowed) {
                /*