mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7603: run __mt76_mcu_send_msg in mt7603_mcu_send_firmware
Run __mt76_mcu_send_msg instead of __mt7603_mcu_msg_send and remove duplicated code. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
980b91e040
commit
a97db3f3ce
+5
-10
@@ -122,19 +122,14 @@ mt7603_mcu_init_download(struct mt7603_dev *dev, u32 addr, u32 len)
|
||||
static int
|
||||
mt7603_mcu_send_firmware(struct mt7603_dev *dev, const void *data, int len)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
int ret = 0;
|
||||
int cur_len, ret = 0;
|
||||
|
||||
while (len > 0) {
|
||||
int cur_len = min_t(int, 4096 - sizeof(struct mt7603_mcu_txd),
|
||||
len);
|
||||
cur_len = min_t(int, 4096 - sizeof(struct mt7603_mcu_txd),
|
||||
len);
|
||||
|
||||
skb = mt7603_mcu_msg_alloc(data, cur_len);
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = __mt7603_mcu_msg_send(dev, skb, -MCU_CMD_FW_SCATTER,
|
||||
NULL);
|
||||
ret = __mt76_mcu_send_msg(&dev->mt76, -MCU_CMD_FW_SCATTER,
|
||||
data, cur_len, false);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user