Skip to content

Commit

Permalink
mt76: mt7921: get rid of mcu_reset function pointer
Browse files Browse the repository at this point in the history
commit d43b325 upstream.

since mcu_reset it used only by mt7921, move the reset callback to
mt7921_mcu_parse_response routine and get rid of the function pointer.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/linux-wireless/364293ec8609dd254067d8173c1599526ffd662c.1619000828.git.lorenzo@kernel.org/
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Cc: <stable@vger.kernel.org> # 5.12: f92f81d mt76: mt7921: check mcu returned values in mt7921_start
Cc: <stable@vger.kernel.org> # 5.12: d32464e mt76: mt7921: introduce mt7921_run_firmware utility routine.
Cc: <stable@vger.kernel.org> # 5.12: 1f7396a mt76: mt7921: introduce __mt7921_start utility routine
Cc: <stable@vger.kernel.org> # 5.12: 3990465 mt76: dma: introduce mt76_dma_queue_reset routine
Cc: <stable@vger.kernel.org> # 5.12: c001df9 mt76: dma: export mt76_dma_rx_cleanup routine
Cc: <stable@vger.kernel.org> # 5.12: 0c1ce98 mt76: mt7921: add wifi reset support
Cc: <stable@vger.kernel.org> # 5.12: e513ae4 mt76: mt7921: abort uncompleted scan by wifi reset
Cc: <stable@vger.kernel.org> # 5.12
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lorenzo Bianconi authored and Greg Kroah-Hartman committed Jul 11, 2021
1 parent 356a5c7 commit 828111d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd,
if (!skb) {
dev_err(mdev->dev, "Message %d (seq %d) timeout\n",
cmd, seq);
mt7921_reset(mdev);

return -ETIMEDOUT;
}

Expand Down Expand Up @@ -952,7 +954,6 @@ int mt7921_mcu_init(struct mt7921_dev *dev)
.mcu_skb_send_msg = mt7921_mcu_send_message,
.mcu_parse_response = mt7921_mcu_parse_response,
.mcu_restart = mt7921_mcu_restart,
.mcu_reset = mt7921_reset,
};

dev->mt76.mcu_ops = &mt7921_mcu_ops;
Expand Down

0 comments on commit 828111d

Please sign in to comment.