mac80211: ath9k: add GPIO mask dts property
[oweals/openwrt.git] / package / kernel / mac80211 / patches / ath / 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 @@ -654,6 +654,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 @@ -758,6 +764,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;