diff options
author | Sean Wang <sean.wang@mediatek.com> | 2021-12-22 06:56:28 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-02-03 13:57:57 +0100 |
commit | 491e3731361871133d6c899174e1125cc80d8166 (patch) | |
tree | d4bca05cf84c25e0a9383dcf073d2e50e3375759 /drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | |
parent | mt76: mt7915: use proper aid value in mt7915_mcu_sta_basic_tlv (diff) | |
download | linux-491e3731361871133d6c899174e1125cc80d8166.tar.xz linux-491e3731361871133d6c899174e1125cc80d8166.zip |
mt76: sdio: lock sdio when it is needed
Acquire the SDIO as needed as possible because either MT7663S or MT7921S
is a multiple-function device that always includes Bluetooth that would
share with the same SDIO bus. So not to avoid breaking Bluetooth pairing,
audio, and HID such kind of time critical application on that, we only
lock sdio bus when it is necessary in WiFi driver.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/sdio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c index 65d693902c22..743b63f66efa 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c @@ -58,7 +58,10 @@ static int mt7921s_parse_intr(struct mt76_dev *dev, struct mt76s_intr *intr) struct mt7921_sdio_intr *irq_data = sdio->intr_data; int i, err; + sdio_claim_host(sdio->func); err = sdio_readsb(sdio->func, irq_data, MCR_WHISR, sizeof(*irq_data)); + sdio_release_host(sdio->func); + if (err < 0) return err; |