From b14365bea586f3796c11fbd21ea48b74dd94ecd2 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 5 Jun 2021 13:46:03 +0200 Subject: [PATCH] mt76: mt7921: wake the device before dumping power table Always wake the device up before dumping the single_sku power table otherwise the device can hang. Fixes: ea29acc97c555 ("mt76: mt7921: add dumping Tx power tabl") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- mt7921/debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mt7921/debugfs.c b/mt7921/debugfs.c index b41d70be..c8cba182 100644 --- a/mt7921/debugfs.c +++ b/mt7921/debugfs.c @@ -184,7 +184,10 @@ mt7921_txpwr(struct seq_file *s, void *data) struct mt7921_txpwr txpwr; int ret; + mt7921_mutex_acquire(dev); ret = mt7921_get_txpwr_info(dev, &txpwr); + mt7921_mutex_release(dev); + if (ret) return ret;