mac80211: remove MCU requests for SoC platforms in the rt2x00 driver
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 602-rt2x00-remove-mcu-requests-for-soc.patch
1 The ralink SoC platforms do not have an MCU.
2
3 Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
4 ---
5
6 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
7 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
8 @@ -221,9 +221,9 @@ void rt2800_mcu_request(struct rt2x00_de
9 u32 reg;
10
11 /*
12 - * SOC devices don't support MCU requests.
13 + * some devices don't support MCU requests.
14 */
15 - if (rt2x00_is_soc(rt2x00dev))
16 + if (!test_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags))
17 return;
18
19 mutex_lock(&rt2x00dev->csr_mutex);
20 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
21 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
22 @@ -60,6 +60,12 @@ static void rt2800pci_mcu_status(struct
23 unsigned int i;
24 u32 reg;
25
26 + /*
27 + * some devices don't support MCU requests.
28 + */
29 + if (!test_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags))
30 + return;
31 +
32 for (i = 0; i < 200; i++) {
33 rt2800_register_read(rt2x00dev, H2M_MAILBOX_CID, &reg);
34
35 @@ -1098,10 +1104,12 @@ static int rt2800pci_probe_hw(struct rt2
36 __set_bit(DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL, &rt2x00dev->flags);
37
38 /*
39 - * This device requires firmware.
40 + * This device requires firmware and MCU access.
41 */
42 - if (!rt2x00_is_soc(rt2x00dev))
43 + if (!rt2x00_is_soc(rt2x00dev)){
44 __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
45 + __set_bit(DRIVER_REQUIRE_MCU, &rt2x00dev->flags);
46 + }
47 __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
48 __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
49 if (!modparam_nohwcrypt)
50 --- a/drivers/net/wireless/rt2x00/rt2x00.h
51 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
52 @@ -631,6 +631,7 @@ enum rt2x00_flags {
53 * Driver requirements
54 */
55 DRIVER_REQUIRE_FIRMWARE,
56 + DRIVER_REQUIRE_MCU,
57 DRIVER_REQUIRE_BEACON_GUARD,
58 DRIVER_REQUIRE_ATIM_QUEUE,
59 DRIVER_REQUIRE_DMA,