From patchwork Wed Jun 23 06:38:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 107552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5N6cgbO024864 for ; Wed, 23 Jun 2010 06:38:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751328Ab0FWGig (ORCPT ); Wed, 23 Jun 2010 02:38:36 -0400 Received: from mail.atheros.com ([12.36.123.2]:62929 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184Ab0FWGif (ORCPT ); Wed, 23 Jun 2010 02:38:35 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Tue, 22 Jun 2010 23:38:35 -0700 Received: from smtp.atheros.com (10.12.4.60) by SC1EXHC-01.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Tue, 22 Jun 2010 23:38:33 -0700 Received: by smtp.atheros.com (sSMTP sendmail emulation); Wed, 23 Jun 2010 12:08:29 +0530 From: Vivek Natarajan To: CC: Subject: [PATCH] ath9k: Fix the LED behaviour in idle unassociated state. Date: Wed, 23 Jun 2010 12:08:29 +0530 Message-ID: <1277275109-4662-1-git-send-email-vnatarajan@atheros.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 23 Jun 2010 06:38:43 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5af2596..c908657 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -829,9 +829,14 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) ath9k_ps_wakeup(sc); ieee80211_stop_queues(hw); - /* Disable LED */ - ath9k_hw_set_gpio(ah, ah->led_pin, 1); - ath9k_hw_cfg_gpio_input(ah, ah->led_pin); + /* + * Keep the LED on when the radio is disabled + * during idle unassociated state. + */ + if (!sc->ps_idle) { + ath9k_hw_set_gpio(ah, ah->led_pin, 1); + ath9k_hw_cfg_gpio_input(ah, ah->led_pin); + } /* Disable interrupts */ ath9k_hw_set_interrupts(ah, 0);