diff mbox

wireless:ath9k Disable leds for Apple products.

Message ID 1274894056-2866-2-git-send-email-justinmattock@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Justin P. Mattock May 26, 2010, 5:14 p.m. UTC
None
diff mbox

Patch

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