f11742d66e9f5392a8c8eac71a46f6fcd1ac50ca
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath9k / 553-ath9k_of_gpio_mask.patch
1 --- a/drivers/net/wireless/ath/ath9k/init.c
2 +++ b/drivers/net/wireless/ath/ath9k/init.c
3 @@ -650,6 +650,12 @@ static int ath9k_of_init(struct ath_soft
4 return 0;
5 }
6
7 +static void ath9k_of_gpio_mask(struct ath_softc *sc)
8 +{
9 + of_property_read_u32(sc->dev->of_node, "qca,gpio-mask",
10 + &sc->sc_ah->caps.gpio_mask);
11 +}
12 +
13 static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
14 const struct ath_bus_ops *bus_ops)
15 {
16 @@ -753,6 +759,9 @@ static int ath9k_init_softc(u16 devid, s
17 if (ret)
18 goto err_hw;
19
20 + /* GPIO mask quirk */
21 + ath9k_of_gpio_mask(sc);
22 +
23 ret = ath9k_init_queues(sc);
24 if (ret)
25 goto err_queues;