Commit 5abe8baf authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7615: clean up FWDL TXQ during/after firmware upload

Since we don't clean that tx queue from the tx tasklet, we need to do it
after the firmware upload is done. This patch also adds a cleanup step during
the upload, to help reclaim memory faster.

Fixes unprocessed queued frames eating up memory  long after the firmware
upload has already completed
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 70911d96
...@@ -248,6 +248,7 @@ static int mt7615_mcu_send_firmware(struct mt7615_dev *dev, const void *data, ...@@ -248,6 +248,7 @@ static int mt7615_mcu_send_firmware(struct mt7615_dev *dev, const void *data,
data += cur_len; data += cur_len;
len -= cur_len; len -= cur_len;
mt76_queue_tx_cleanup(dev, MT_TXQ_FWDL, false);
} }
return ret; return ret;
...@@ -525,6 +526,8 @@ static int mt7615_load_firmware(struct mt7615_dev *dev) ...@@ -525,6 +526,8 @@ static int mt7615_load_firmware(struct mt7615_dev *dev)
return -EIO; return -EIO;
} }
mt76_queue_tx_cleanup(dev, MT_TXQ_FWDL, false);
dev_dbg(dev->mt76.dev, "Firmware init done\n"); dev_dbg(dev->mt76.dev, "Firmware init done\n");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment