File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
drivers/net/wireless/intel/iwlwifi/pcie Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ struct iwl_trans_pcie {
536536 int ict_index ;
537537 bool use_ict ;
538538 bool is_down , opmode_down ;
539- bool debug_rfkill ;
539+ s8 debug_rfkill ;
540540 struct isr_statistics isr_stats ;
541541
542542 spinlock_t irq_lock ;
@@ -982,7 +982,7 @@ static inline bool iwl_is_rfkill_set(struct iwl_trans *trans)
982982
983983 lockdep_assert_held (& trans_pcie -> mutex );
984984
985- if (trans_pcie -> debug_rfkill )
985+ if (trans_pcie -> debug_rfkill == 1 )
986986 return true;
987987
988988 return !(iwl_read32 (trans , CSR_GP_CNTRL ) &
Original file line number Diff line number Diff line change @@ -2688,16 +2688,17 @@ static ssize_t iwl_dbgfs_rfkill_write(struct file *file,
26882688{
26892689 struct iwl_trans * trans = file -> private_data ;
26902690 struct iwl_trans_pcie * trans_pcie = IWL_TRANS_GET_PCIE_TRANS (trans );
2691- bool old = trans_pcie -> debug_rfkill ;
2691+ bool new_value ;
26922692 int ret ;
26932693
2694- ret = kstrtobool_from_user (user_buf , count , & trans_pcie -> debug_rfkill );
2694+ ret = kstrtobool_from_user (user_buf , count , & new_value );
26952695 if (ret )
26962696 return ret ;
2697- if (old == trans_pcie -> debug_rfkill )
2697+ if (new_value == trans_pcie -> debug_rfkill )
26982698 return count ;
26992699 IWL_WARN (trans , "changing debug rfkill %d->%d\n" ,
2700- old , trans_pcie -> debug_rfkill );
2700+ trans_pcie -> debug_rfkill , new_value );
2701+ trans_pcie -> debug_rfkill = new_value ;
27012702 iwl_pcie_handle_rfkill_irq (trans );
27022703
27032704 return count ;
@@ -3421,7 +3422,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
34213422 ret = - ENOMEM ;
34223423 goto out_no_pci ;
34233424 }
3424-
3425+ trans_pcie -> debug_rfkill = -1 ;
34253426
34263427 if (!cfg -> base_params -> pcie_l1_allowed ) {
34273428 /*
You can’t perform that action at this time.
0 commit comments