]> www.infradead.org Git - users/willy/xarray.git/commitdiff
mt76: mt7615: sdio code must access rate/key regs in preocess context
authorLorenzo Bianconi <lorenzo@kernel.org>
Wed, 15 Jul 2020 12:46:28 +0000 (14:46 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 21 Jul 2020 17:01:18 +0000 (19:01 +0200)
As usb, sdio relies on mt76 workqueue to configure tx rate or upload
keys to the hw. This is a preliminary patch to add SDIO support to
mt76 driver

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/main.c

index afac8d81d31729cc60e8b000b886adfb7fc68298..3dd8dd28690edc53f987f6a21c3d5107637d6e60 100644 (file)
@@ -967,7 +967,7 @@ void mt7615_mac_set_rates(struct mt7615_phy *phy, struct mt7615_sta *sta,
        struct mt7615_rate_desc rd;
        u32 w5, w27, addr;
 
-       if (mt76_is_usb(&dev->mt76)) {
+       if (!mt76_is_mmio(&dev->mt76)) {
                mt7615_mac_queue_rate_update(phy, sta, probe_rate, rates);
                return;
        }
index 79453c890f207087ac32242bb42b9740e2bb8eb3..2d0b1f49fdbcf8ff1415fa720d9e14dca1c1b9c6 100644 (file)
@@ -417,10 +417,10 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        mt76_wcid_key_setup(&dev->mt76, wcid,
                            cmd == SET_KEY ? key : NULL);
 
-       if (mt76_is_usb(&dev->mt76))
-               err = mt7615_queue_key_update(dev, cmd, msta, key);
-       else
+       if (mt76_is_mmio(&dev->mt76))
                err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
+       else
+               err = mt7615_queue_key_update(dev, cmd, msta, key);
 
        mt7615_mutex_release(dev);