Search Linux Wireless

[bug report] wifi: iwlwifi: support fast resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Emmanuel Grumbach,

Commit e8bb19c1d590 ("wifi: iwlwifi: support fast resume") from Jun
18, 2024 (linux-next), leads to the following Smatch static checker
warning:

	drivers/net/wireless/intel/iwlwifi/mvm/d3.c:3121 iwl_mvm_check_rt_status()
	error: uninitialized symbol 'err_id'.

drivers/net/wireless/intel/iwlwifi/mvm/d3.c
    3112 static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,
    3113                                    struct ieee80211_vif *vif)
    3114 {
    3115         u32 err_id;
    3116 
    3117         /* check for lmac1 error */
    3118         if (iwl_fwrt_read_err_table(mvm->trans,
    3119                                     mvm->trans->dbg.lmac_error_event_table[0],
    3120                                     &err_id)) {

iwl_fwrt_read_err_table() returns true on failure (meaning that we weren't able
to read the error table so maybe that the two errors cancel each other (double
negative) so there wasn't an error?)  Anyway if iwl_trans_read_mem_bytes() fails
then "err_id" is not initialized.

--> 3121                 if (err_id == RF_KILL_INDICATOR_FOR_WOWLAN && vif) {
    3122                         struct cfg80211_wowlan_wakeup wakeup = {
    3123                                 .rfkill_release = true,
    3124                         };
    3125                         ieee80211_report_wowlan_wakeup(vif, &wakeup,
    3126                                                        GFP_KERNEL);
    3127                 }
    3128                 return true;
    3129         }
    3130 
    3131         /* check if we have lmac2 set and check for error */
    3132         if (iwl_fwrt_read_err_table(mvm->trans,
    3133                                     mvm->trans->dbg.lmac_error_event_table[1],
    3134                                     NULL))
    3135                 return true;
    3136 
    3137         /* check for umac error */
    3138         if (iwl_fwrt_read_err_table(mvm->trans,
    3139                                     mvm->trans->dbg.umac_error_event_table,
    3140                                     NULL))
    3141                 return true;
    3142 
    3143         return false;
    3144 }

regards,
dan carpenter




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux