[kvalo-ath:pending 34/37] drivers/net/wireless/ath/ath12k/wow.c:982:11: warning: enumeration value 'ATH12K_HW_STATE_TM' not handled in switch

kernel test robot lkp at intel.com
Wed Jun 26 22:18:46 PDT 2024


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head:   ff7f6be343c446ec89addc6abb99e83a6b98abfe
commit: 5e4b86c9b76950ec6bf056e17e80d6611df66182 [34/37] wifi: ath12k: add factory test mode support
config: i386-buildonly-randconfig-003-20240627 (https://download.01.org/0day-ci/archive/20240627/202406271317.IYXB6YVE-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406271317.IYXB6YVE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406271317.IYXB6YVE-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath12k/wow.c:982:11: warning: enumeration value 'ATH12K_HW_STATE_TM' not handled in switch [-Wswitch]
     982 |                 switch (ah->state) {
         |                         ^~~~~~~~~
   1 warning generated.


vim +/ATH12K_HW_STATE_TM +982 drivers/net/wireless/ath/ath12k/wow.c

4a3c212eee0e36 Baochen Qiang 2024-06-19   929  
4a3c212eee0e36 Baochen Qiang 2024-06-19   930  int ath12k_wow_op_resume(struct ieee80211_hw *hw)
4a3c212eee0e36 Baochen Qiang 2024-06-19   931  {
4a3c212eee0e36 Baochen Qiang 2024-06-19   932  	struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
4a3c212eee0e36 Baochen Qiang 2024-06-19   933  	struct ath12k *ar = ath12k_ah_to_ar(ah, 0);
4a3c212eee0e36 Baochen Qiang 2024-06-19   934  	int ret;
4a3c212eee0e36 Baochen Qiang 2024-06-19   935  
4a3c212eee0e36 Baochen Qiang 2024-06-19   936  	mutex_lock(&ar->conf_mutex);
4a3c212eee0e36 Baochen Qiang 2024-06-19   937  
4a3c212eee0e36 Baochen Qiang 2024-06-19   938  	ret = ath12k_hif_resume(ar->ab);
4a3c212eee0e36 Baochen Qiang 2024-06-19   939  	if (ret) {
4a3c212eee0e36 Baochen Qiang 2024-06-19   940  		ath12k_warn(ar->ab, "failed to resume hif: %d\n", ret);
4a3c212eee0e36 Baochen Qiang 2024-06-19   941  		goto exit;
4a3c212eee0e36 Baochen Qiang 2024-06-19   942  	}
4a3c212eee0e36 Baochen Qiang 2024-06-19   943  
4a3c212eee0e36 Baochen Qiang 2024-06-19   944  	ath12k_hif_ce_irq_enable(ar->ab);
4a3c212eee0e36 Baochen Qiang 2024-06-19   945  	ath12k_hif_irq_enable(ar->ab);
4a3c212eee0e36 Baochen Qiang 2024-06-19   946  
4a3c212eee0e36 Baochen Qiang 2024-06-19   947  	ret = ath12k_wow_wakeup(ar);
16f474d6d49db5 Baochen Qiang 2024-06-04   948  	if (ret) {
4a3c212eee0e36 Baochen Qiang 2024-06-19   949  		ath12k_warn(ar->ab, "failed to wakeup from wow: %d\n", ret);
16f474d6d49db5 Baochen Qiang 2024-06-04   950  		goto exit;
16f474d6d49db5 Baochen Qiang 2024-06-04   951  	}
16f474d6d49db5 Baochen Qiang 2024-06-04   952  
16f474d6d49db5 Baochen Qiang 2024-06-04   953  	ret = ath12k_wow_nlo_cleanup(ar);
16f474d6d49db5 Baochen Qiang 2024-06-04   954  	if (ret) {
16f474d6d49db5 Baochen Qiang 2024-06-04   955  		ath12k_warn(ar->ab, "failed to cleanup nlo: %d\n", ret);
16f474d6d49db5 Baochen Qiang 2024-06-04   956  		goto exit;
16f474d6d49db5 Baochen Qiang 2024-06-04   957  	}
4a3c212eee0e36 Baochen Qiang 2024-06-19   958  
66a9448b1b8977 Baochen Qiang 2024-06-19   959  	ret = ath12k_wow_clear_hw_filter(ar);
66a9448b1b8977 Baochen Qiang 2024-06-19   960  	if (ret) {
66a9448b1b8977 Baochen Qiang 2024-06-19   961  		ath12k_warn(ar->ab, "failed to clear hw filter: %d\n", ret);
66a9448b1b8977 Baochen Qiang 2024-06-19   962  		goto exit;
66a9448b1b8977 Baochen Qiang 2024-06-19   963  	}
66a9448b1b8977 Baochen Qiang 2024-06-19   964  
1666108c74c438 Baochen Qiang 2024-06-19   965  	ret = ath12k_wow_protocol_offload(ar, false);
1666108c74c438 Baochen Qiang 2024-06-19   966  	if (ret) {
1666108c74c438 Baochen Qiang 2024-06-19   967  		ath12k_warn(ar->ab, "failed to clear wow protocol offload events: %d\n",
1666108c74c438 Baochen Qiang 2024-06-19   968  			    ret);
1666108c74c438 Baochen Qiang 2024-06-19   969  		goto exit;
1666108c74c438 Baochen Qiang 2024-06-19   970  	}
1666108c74c438 Baochen Qiang 2024-06-19   971  
7af01e56952954 Baochen Qiang 2024-06-19   972  	ret = ath12k_wow_set_keepalive(ar,
7af01e56952954 Baochen Qiang 2024-06-19   973  				       WMI_STA_KEEPALIVE_METHOD_NULL_FRAME,
7af01e56952954 Baochen Qiang 2024-06-19   974  				       WMI_STA_KEEPALIVE_INTERVAL_DISABLE);
7af01e56952954 Baochen Qiang 2024-06-19   975  	if (ret) {
7af01e56952954 Baochen Qiang 2024-06-19   976  		ath12k_warn(ar->ab, "failed to disable wow keepalive: %d\n", ret);
7af01e56952954 Baochen Qiang 2024-06-19   977  		goto exit;
7af01e56952954 Baochen Qiang 2024-06-19   978  	}
7af01e56952954 Baochen Qiang 2024-06-19   979  
4a3c212eee0e36 Baochen Qiang 2024-06-19   980  exit:
4a3c212eee0e36 Baochen Qiang 2024-06-19   981  	if (ret) {
4a3c212eee0e36 Baochen Qiang 2024-06-19  @982  		switch (ah->state) {
4a3c212eee0e36 Baochen Qiang 2024-06-19   983  		case ATH12K_HW_STATE_ON:
4a3c212eee0e36 Baochen Qiang 2024-06-19   984  			ah->state = ATH12K_HW_STATE_RESTARTING;
4a3c212eee0e36 Baochen Qiang 2024-06-19   985  			ret = 1;
4a3c212eee0e36 Baochen Qiang 2024-06-19   986  			break;
4a3c212eee0e36 Baochen Qiang 2024-06-19   987  		case ATH12K_HW_STATE_OFF:
4a3c212eee0e36 Baochen Qiang 2024-06-19   988  		case ATH12K_HW_STATE_RESTARTING:
4a3c212eee0e36 Baochen Qiang 2024-06-19   989  		case ATH12K_HW_STATE_RESTARTED:
4a3c212eee0e36 Baochen Qiang 2024-06-19   990  		case ATH12K_HW_STATE_WEDGED:
4a3c212eee0e36 Baochen Qiang 2024-06-19   991  			ath12k_warn(ar->ab, "encountered unexpected device state %d on resume, cannot recover\n",
4a3c212eee0e36 Baochen Qiang 2024-06-19   992  				    ah->state);
4a3c212eee0e36 Baochen Qiang 2024-06-19   993  			ret = -EIO;
4a3c212eee0e36 Baochen Qiang 2024-06-19   994  			break;
4a3c212eee0e36 Baochen Qiang 2024-06-19   995  		}
4a3c212eee0e36 Baochen Qiang 2024-06-19   996  	}
4a3c212eee0e36 Baochen Qiang 2024-06-19   997  
4a3c212eee0e36 Baochen Qiang 2024-06-19   998  	mutex_unlock(&ar->conf_mutex);
4a3c212eee0e36 Baochen Qiang 2024-06-19   999  	return ret;
4a3c212eee0e36 Baochen Qiang 2024-06-19  1000  }
4a3c212eee0e36 Baochen Qiang 2024-06-19  1001  

:::::: The code at line 982 was first introduced by commit
:::::: 4a3c212eee0e36c1cd55bfbfb94041a0d3ad265b wifi: ath12k: add basic WoW functionalities

:::::: TO: Baochen Qiang <quic_bqiang at quicinc.com>
:::::: CC: Kalle Valo <quic_kvalo at quicinc.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the ath10k mailing list