瀏覽代碼

iwlwifi: mvm: don't fail completely if led mode is not supported

Blink led mode is not supported by iwlmvm. This doesn't mean
that we should prevent any operation if it is selected by
the user.
Instead of failing without any notice to the user, fallback
to the default mode (RF mode) if the blink mode
is selected and print an error to inform the user.

Reported-by: Steven Haigh <netwiz@crc.id.au>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach 11 年之前
父節點
當前提交
1f00c72139
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/wireless/iwlwifi/mvm/led.c

+ 2 - 0
drivers/net/wireless/iwlwifi/mvm/led.c

@@ -94,6 +94,8 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
 	int ret;
 	int ret;
 
 
 	switch (mode) {
 	switch (mode) {
+	case IWL_LED_BLINK:
+		IWL_ERR(mvm, "Blink led mode not supported, used default\n");
 	case IWL_LED_DEFAULT:
 	case IWL_LED_DEFAULT:
 	case IWL_LED_RF_STATE:
 	case IWL_LED_RF_STATE:
 		mode = IWL_LED_RF_STATE;
 		mode = IWL_LED_RF_STATE;