All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@gmail.com>
To: <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>
Cc: <users@rt2x00.serialmonkey.com>,
	Ivo van Doorn <IvDoorn@gmail.com>,
	Helmut Schaa <helmut.schaa@googlemail.com>,
	Gertjan van Wingerde <gwingerde@gmail.com>,
	<stable@vger.kernel.org>
Subject: [PATCH v2 2/6] rt2x00: Fix word size of rt2500usb MAC_CSR19 register.
Date: Fri, 31 Aug 2012 19:22:10 +0200	[thread overview]
Message-ID: <1346433734-3337-3-git-send-email-gwingerde@gmail.com> (raw)
In-Reply-To: <1346433734-3337-2-git-send-email-gwingerde@gmail.com>

The register is 16 bits wide, not 32.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: <stable@vger.kernel.org>

diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 3aae36b..b3a1d73 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -283,7 +283,7 @@ static int rt2500usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
 	u16 reg;
 
 	rt2500usb_register_read(rt2x00dev, MAC_CSR19, &reg);
-	return rt2x00_get_field32(reg, MAC_CSR19_BIT7);
+	return rt2x00_get_field16(reg, MAC_CSR19_BIT7);
 }
 
 #ifdef CONFIG_RT2X00_LIB_LEDS
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.h b/drivers/net/wireless/rt2x00/rt2500usb.h
index b493306..192531d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.h
+++ b/drivers/net/wireless/rt2x00/rt2500usb.h
@@ -189,14 +189,14 @@
  * MAC_CSR19: GPIO control register.
  */
 #define MAC_CSR19			0x0426
-#define MAC_CSR19_BIT0			FIELD32(0x0001)
-#define MAC_CSR19_BIT1			FIELD32(0x0002)
-#define MAC_CSR19_BIT2			FIELD32(0x0004)
-#define MAC_CSR19_BIT3			FIELD32(0x0008)
-#define MAC_CSR19_BIT4			FIELD32(0x0010)
-#define MAC_CSR19_BIT5			FIELD32(0x0020)
-#define MAC_CSR19_BIT6			FIELD32(0x0040)
-#define MAC_CSR19_BIT7			FIELD32(0x0080)
+#define MAC_CSR19_BIT0			FIELD16(0x0001)
+#define MAC_CSR19_BIT1			FIELD16(0x0002)
+#define MAC_CSR19_BIT2			FIELD16(0x0004)
+#define MAC_CSR19_BIT3			FIELD16(0x0008)
+#define MAC_CSR19_BIT4			FIELD16(0x0010)
+#define MAC_CSR19_BIT5			FIELD16(0x0020)
+#define MAC_CSR19_BIT6			FIELD16(0x0040)
+#define MAC_CSR19_BIT7			FIELD16(0x0080)
 
 /*
  * MAC_CSR20: LED control register.
-- 
1.7.11.1


  reply	other threads:[~2012-08-31 17:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 17:22 [PATCH v2 0/6] GPIO related fixes and clean ups Gertjan van Wingerde
2012-08-31 17:22 ` [PATCH v2 1/6] rt2x00: Identify ASUS USB-N53 device Gertjan van Wingerde
2012-08-31 17:22   ` Gertjan van Wingerde [this message]
2012-08-31 17:22     ` [PATCH v2 3/6] rt2x00: Fix rfkill polling prior to interface start Gertjan van Wingerde
2012-08-31 17:22       ` [PATCH v2 4/6] rt2x00: Align GPIO register definitions with the datasheets Gertjan van Wingerde
2012-08-31 17:22         ` [PATCH v2 5/6] rt2x00: Unify GPIO register field namings Gertjan van Wingerde
2012-08-31 17:22           ` [PATCH v2 6/6] rt2x00: rt2800 - Make probe_hw function common between PCI and USB Gertjan van Wingerde
2012-09-02 20:44             ` Ivo Van Doorn
2012-09-03  1:23               ` Gertjan van Wingerde
2012-09-02 20:40           ` [PATCH v2 5/6] rt2x00: Unify GPIO register field namings Ivo Van Doorn
2012-09-02 20:39         ` [PATCH v2 4/6] rt2x00: Align GPIO register definitions with the datasheets Ivo Van Doorn
2012-09-02 20:39       ` [PATCH v2 3/6] rt2x00: Fix rfkill polling prior to interface start Ivo Van Doorn
2012-09-02 20:37     ` [PATCH v2 2/6] rt2x00: Fix word size of rt2500usb MAC_CSR19 register Ivo Van Doorn
2012-09-02 20:37   ` [PATCH v2 1/6] rt2x00: Identify ASUS USB-N53 device Ivo Van Doorn

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=1346433734-3337-3-git-send-email-gwingerde@gmail.com \
    --to=gwingerde@gmail.com \
    --cc=IvDoorn@gmail.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@vger.kernel.org \
    --cc=users@rt2x00.serialmonkey.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.