From patchwork Tue Mar 18 14:45:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 3854001 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83B98BF540 for ; Wed, 19 Mar 2014 17:47:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE2DE200DF for ; Wed, 19 Mar 2014 17:47:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A36DF20171 for ; Wed, 19 Mar 2014 17:47:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205AbaCROq3 (ORCPT ); Tue, 18 Mar 2014 10:46:29 -0400 Received: from mail-ee0-f48.google.com ([74.125.83.48]:49407 "EHLO mail-ee0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756126AbaCROqZ (ORCPT ); Tue, 18 Mar 2014 10:46:25 -0400 Received: by mail-ee0-f48.google.com with SMTP id b57so4776914eek.35 for ; Tue, 18 Mar 2014 07:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IJBE+wMhCwmOXGh3k65Lp7xb4Os85uSaVaes8oEi8hs=; b=XAUijH8ulp89Pg6jNReuSD5vnPgNnw3gt8EmHg315DDdLYa5VFaZo0Q50G7l5X7BDc GcJrN1PV3IU+nzmSzdwRApkcaUzqjEjfVgbwxXnIHLp+t9yDd3oHyLi5F1GuJnlZ90ix E8rsiClns2BMxnXnrBa76lgMfoqlb9ijX3cglYQrSStdZiRAQSm/aInONureIPrLZioC 6MH6u2dGbl9Hq1u5UCa+gLS0Yl2M1XeOo8zOLIm4KjiCius9+/UAlbFRYjcegK2eTJ6T LA+dJ6+iaiG4hLwEZc7BgLHvSHkcRjd9uVGwTJFLW4LobIwXyY5EsrqOwaGQ5MTZIus6 o1Jg== X-Received: by 10.14.218.193 with SMTP id k41mr30334390eep.16.1395153984276; Tue, 18 Mar 2014 07:46:24 -0700 (PDT) Received: from localhost.localdomain (109-186-95-36.bb.netvision.net.il. [109.186.95.36]) by mx.google.com with ESMTPSA id p8sm35492776eef.26.2014.03.18.07.46.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Mar 2014 07:46:23 -0700 (PDT) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Emmanuel Grumbach Subject: [PATCH 22/35] iwlwifi: mvm: don't fail completely if led mode is not supported Date: Tue, 18 Mar 2014 16:45:26 +0200 Message-Id: <1395153939-23897-22-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <53285AF8.7050305@gmail.com> References: <53285AF8.7050305@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Emmanuel Grumbach 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 --- drivers/net/wireless/iwlwifi/mvm/led.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/led.c b/drivers/net/wireless/iwlwifi/mvm/led.c index 6b4ea6b..e3b3cf4 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;