d68ad504476adfdd0ac0d30ec54347ae1463f681
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / rt2x00 / 508-rt2x00-rt2800soc-fix-rt2800soc_disable_radio-for-RT3.patch
1 From 6c2d32478159fffff0b85abb6817a21bb2338231 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sun, 24 Mar 2013 19:26:27 +0100
4 Subject: [PATCH] rt2x00: rt2800soc: fix rt2800soc_disable_radio for RT3883
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 ---
8 drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 9 ++++++++-
9 1 file changed, 8 insertions(+), 1 deletion(-)
10
11 --- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
12 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
13 @@ -51,9 +51,16 @@ static bool rt2800soc_hwcrypt_disabled(s
14
15 static void rt2800soc_disable_radio(struct rt2x00_dev *rt2x00dev)
16 {
17 + u32 reg;
18 +
19 rt2800_disable_radio(rt2x00dev);
20 rt2x00mmio_register_write(rt2x00dev, PWR_PIN_CFG, 0);
21 - rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, 0);
22 +
23 + reg = 0;
24 + if (rt2x00_rt(rt2x00dev, RT3883))
25 + rt2x00_set_field32(&reg, TX_PIN_CFG_RFTR_EN, 1);
26 +
27 + rt2x00mmio_register_write(rt2x00dev, TX_PIN_CFG, reg);
28 }
29
30 static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev,