linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, mcgrof@gmail.com,
	"Justin P. Mattock" <justinmattock@gmail.com>
Subject: [PATCH]wireless:ath9k Disable leds for Apple products.
Date: Wed, 26 May 2010 10:14:16 -0700	[thread overview]
Message-ID: <1274894056-2866-2-git-send-email-justinmattock@gmail.com> (raw)
In-Reply-To: <1274894056-2866-1-git-send-email-justinmattock@gmail.com>

Disable the leds on ath9k for Apple products, since
there is no leds on any of there machines(or non that I can find!!).

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/net/wireless/ath/ath9k/gpio.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 0ee75e7..c21e74f 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -15,6 +15,7 @@
  */
 
 #include "ath9k.h"
+#include <linux/dmi.h>
 
 /********************************/
 /*	 LED functions		*/
@@ -127,11 +128,30 @@ void ath_deinit_leds(struct ath_softc *sc)
 	ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);
 }
 
+static struct dmi_system_id __initdata dmi_system_table[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
+		},
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
+		},
+	},
+	{}
+};
+
 void ath_init_leds(struct ath_softc *sc)
 {
 	char *trigger;
 	int ret;
 
+	/* Apple has no leds lights for their wireless.  */
+	if (dmi_check_system(dmi_system_table) > 0)
+		return -ENODEV;
+	else
+
 	if (AR_SREV_9287(sc->sc_ah))
 		sc->sc_ah->led_pin = ATH_LED_PIN_9287;
 	else
-- 
1.6.5.GIT


  reply	other threads:[~2010-05-26 17:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 17:14 [PATCH]wireless:ath9k Fix ath_print in xmit.c Justin P. Mattock
2010-05-26 17:14 ` Justin P. Mattock [this message]
2010-05-26 17:18   ` [PATCH]wireless:ath9k Disable leds for Apple products John W. Linville
2010-05-26 17:38     ` Justin P. Mattock
2010-05-26 21:05       ` Luis R. Rodriguez
2010-05-26 21:34         ` Justin P. Mattock
2010-05-26 21:42           ` Luis R. Rodriguez
2010-05-26 22:28             ` Justin P. Mattock
2010-05-26 17:19   ` Luis R. Rodriguez
2010-05-26 17:16 ` [PATCH]wireless:ath9k Fix ath_print in xmit.c Luis R. Rodriguez
2010-05-26 17:28 ` Arnd Hannemann
2010-05-26 17:49   ` Justin P. Mattock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274894056-2866-2-git-send-email-justinmattock@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).