linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Albert <jal2@gmx.de>
To: Malte Gell <malte.gell@gmx.de>
Cc: Christian Lamparter <chunkeey@googlemail.com>,
	linux-wireless@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@gmail.com>,
	linville@tuxdriver.com, Hin-Tak Leung <hintak.leung@gmail.com>
Subject: Re: [PATCH] ar9170usb: LEDs are confused
Date: Sat, 03 Oct 2009 01:03:28 +0200	[thread overview]
Message-ID: <4AC686C0.1050506@gmx.de> (raw)
In-Reply-To: <4AC67DEB.80900@gmx.de>

Hi,

could anyone with a WN111v2 (or any other device with one LED only)
apply the patch below and look into syslog for the value of "hwtype"?

I get 22212221 for an AVM stick (057c:8401) and 22211111 for a Netgear WNDA3100 (0846:9010).

Thanks,
Joerg.

-- 
diff --git a/drivers/net/wireless/ath/ar9170/hw.h b/drivers/net/wireless/ath/ar9170/hw.h
index 6cbfb2f..74b619c 100644
--- a/drivers/net/wireless/ath/ar9170/hw.h
+++ b/drivers/net/wireless/ath/ar9170/hw.h
@@ -77,6 +77,7 @@ enum ar9170_cmd {
 #define AR9170_EP_IRQ				3
 #define AR9170_EP_CMD				4
 
+#define AR9170_EEPROM_HWTYPE                    0x1374
 #define AR9170_EEPROM_START			0x1600
 
 #define AR9170_GPIO_REG_BASE			0x1d0100
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index c1f8c69..bffd6c4 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -2598,6 +2598,7 @@ static int ar9170_read_eeprom(struct ar9170 *ar)
 	__le32 offsets[RW];
 	unsigned int rx_streams, tx_streams, tx_params = 0;
 	int i, j, err, bands = 0;
+	u32 hwtype;
 
 	BUILD_BUG_ON(sizeof(ar->eeprom) & 3);
 
@@ -2665,6 +2666,14 @@ static int ar9170_read_eeprom(struct ar9170 *ar)
 	/* second part of wiphy init */
 	SET_IEEE80211_PERM_ADDR(ar->hw, addr);
 
+	/* read hw type (aka the led modes) */
+	err = ar9170_read_reg(ar, AR9170_EEPROM_HWTYPE, &hwtype);
+	if (err)
+		return err;
+	/* jal: for debugging only */
+	printk(KERN_INFO "%s: hwtype %08x\n",
+	       wiphy_name(ar->hw->wiphy), hwtype);
+
 	return bands ? 0 : -EINVAL;
 }
 

  reply	other threads:[~2009-10-02 23:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 14:54 [PATCH] ar9170usb: LEDs are confused Christian Lamparter
2009-10-01 18:06 ` Hin-Tak Leung
2009-10-01 20:34   ` Christian Lamparter
2009-10-01 21:24     ` Hin-Tak Leung
2009-10-01 23:18       ` Christian Lamparter
2009-10-02 10:06         ` Malte Gell
2009-10-02  6:52 ` Malte Gell
2009-10-02 10:46   ` Christian Lamparter
2009-10-02 11:45     ` Malte Gell
2009-10-02 19:08       ` Christian Lamparter
2009-10-03  2:53         ` Malte Gell
2009-10-03 11:29           ` Christian Lamparter
2009-10-03 17:28             ` Malte Gell
2009-10-02 22:25       ` Joerg Albert
2009-10-02 23:03         ` Joerg Albert [this message]
2009-10-03  0:05         ` Christian Lamparter

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=4AC686C0.1050506@gmx.de \
    --to=jal2@gmx.de \
    --cc=chunkeey@googlemail.com \
    --cc=hintak.leung@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=malte.gell@gmx.de \
    --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).