From: Emmanuel Grumbach Date: Wed, 12 Mar 2014 07:36:41 +0000 (+0200) Subject: iwlwifi: mvm: don't fail completely if led mode is not supported X-Git-Tag: v3.15-rc1~113^2~93^2^2~12^2~13 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1f00c721391aaf9ba6ae52dd4cb54d668f1c5408;p=~emulex%2Finfiniband.git 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 Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/led.c b/drivers/net/wireless/iwlwifi/mvm/led.c index 6b4ea6bf8ff..e3b3cf4dbd7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/led.c +++ b/drivers/net/wireless/iwlwifi/mvm/led.c @@ -94,6 +94,8 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm) int ret; switch (mode) { + case IWL_LED_BLINK: + IWL_ERR(mvm, "Blink led mode not supported, used default\n"); case IWL_LED_DEFAULT: case IWL_LED_RF_STATE: mode = IWL_LED_RF_STATE;