From patchwork Sun Jan 11 09:20:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hong Xu X-Patchwork-Id: 5605671 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6CA70C058D for ; Sun, 11 Jan 2015 09:21:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B1622054E for ; Sun, 11 Jan 2015 09:21:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40C1F2054A for ; Sun, 11 Jan 2015 09:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040AbbAKJVN (ORCPT ); Sun, 11 Jan 2015 04:21:13 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35828 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750887AbbAKJVM (ORCPT ); Sun, 11 Jan 2015 04:21:12 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so26723774pad.9 for ; Sun, 11 Jan 2015 01:21:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dVu7JVty0dDvAAVOauF6axDcGMhOgEzqTliK3e6QtRg=; b=luppF09v5smofepJPBeA97TjnsVbLoQJJL445AqkSGCT5C7PqtoAQNffEemMMPoc0o obEQJ2ACVb4oT5E95Op2Jc94deqCDFtp83thBCPohCuc6308TMj1bEliUIAWOOevEDp8 bJyHJL1I3RUXvGsu5bc/fWXrt/nE5WhfYGavEjoO3A9n0imFZqM2X5uhRsfFO504ZK1O Bpuf8lI9TKX5537VGGOw4nSGrOh1JIFA1lAxRe0q0jSdk4Zo5LpwCOch23qOlqJKRCPQ +HHu3702+4V3Q9OpLMoOF6weuvy+1FB73IVrZ9e6iorbcWxPfNbd41rf6o7Av4vtYpcY g/cQ== X-Gm-Message-State: ALoCoQlIYEuh0PB8XRq6piZgBEOtvscXh3LjdIipzLXEQEE6AgzCiSyptlLNBQKgXrG0VaXGRXRL X-Received: by 10.66.184.206 with SMTP id ew14mr19779841pac.3.1420968071758; Sun, 11 Jan 2015 01:21:11 -0800 (PST) Received: from localhost ([2605:e000:150f:c11f:3df3:fcf7:34cd:ddf9]) by mx.google.com with ESMTPSA id ih10sm11402525pbc.1.2015.01.11.01.21.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 01:21:11 -0800 (PST) From: Hong Xu To: linux-wireless@vger.kernel.org Cc: Hong Xu Subject: [PATCH] ath9k_htc: Add a module parameter to disable blink Date: Sun, 11 Jan 2015 01:20:29 -0800 Message-Id: <1420968029-1222-1-git-send-email-hong@topbug.net> X-Mailer: git-send-email 2.2.1 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Add an option "blink" to enable or disable the LED blink. The default value is set to 1 so that existing users would not experience any unexpected changes. --- drivers/net/wireless/ath/ath9k/htc.h | 1 + drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++++ drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 9dde265..5697097 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@ -44,6 +44,7 @@ extern struct ieee80211_ops ath9k_htc_ops; extern int htc_modparam_nohwcrypt; +extern int led_blink; enum htc_phymode { HTC_MODE_11NA = 0, diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index 50f74a2..998b558 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c @@ -279,6 +279,10 @@ void ath9k_init_leds(struct ath9k_htc_priv *priv) else priv->ah->led_pin = ATH_LED_PIN_DEF; + if (!led_blink) + priv->led_cdev.default_trigger = + ieee80211_get_radio_led_name(priv->hw); + ath9k_configure_leds(priv); snprintf(priv->led_name, sizeof(priv->led_name), diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index e8fa944..c762d84 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -38,6 +38,10 @@ static int ath9k_ps_enable; module_param_named(ps_enable, ath9k_ps_enable, int, 0444); MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave"); +int led_blink = 1; +module_param_named(blink, led_blink, int, 0444); +MODULE_PARM_DESC(blink, "Enable LED blink on activity"); + #ifdef CONFIG_MAC80211_LEDS static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = { { .throughput = 0 * 1024, .blink_time = 334 },