提交 6ced58a5 编写于 作者: G Gertjan van Wingerde 提交者: John W. Linville

rt2x00: Fix word size of rt2500usb MAC_CSR19 register.

The register is 16 bits wide, not 32.
Signed-off-by: NGertjan van Wingerde <gwingerde@gmail.com>
Cc: <stable@vger.kernel.org>
Acked-by: NIvo Van Doorn <ivdoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 177ef836
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册