wifi: mt76: mt7925: ensure all MCU commands wait for response
[ Upstream commit aa97ff5782cf01cf2163593e1f57bbde63a06047 ]
Modify MCU command sending functions to wait for a response,
ensuring consistent behavior across all commands and improves
reliability by confirming that each command is processed
successfully.
Fixes: c948b5da6b ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Michael Lo <michael.lo@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20250414013954.1151774-3-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
52ffee9fea
commit
ba9bf458fa
@@ -769,7 +769,7 @@ int mt7925_mcu_fw_log_2_host(struct mt792x_dev *dev, u8 ctrl)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_UNI_CMD(WSYS_CONFIG),
|
ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_UNI_CMD(WSYS_CONFIG),
|
||||||
&req, sizeof(req), false, NULL);
|
&req, sizeof(req), true, NULL);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1411,7 +1411,7 @@ int mt7925_mcu_set_eeprom(struct mt792x_dev *dev)
|
|||||||
};
|
};
|
||||||
|
|
||||||
return mt76_mcu_send_and_get_msg(&dev->mt76, MCU_UNI_CMD(EFUSE_CTRL),
|
return mt76_mcu_send_and_get_msg(&dev->mt76, MCU_UNI_CMD(EFUSE_CTRL),
|
||||||
&req, sizeof(req), false, NULL);
|
&req, sizeof(req), true, NULL);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt7925_mcu_set_eeprom);
|
EXPORT_SYMBOL_GPL(mt7925_mcu_set_eeprom);
|
||||||
|
|
||||||
@@ -2741,7 +2741,7 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable)
|
|||||||
conf->band = 0; /* unused */
|
conf->band = 0; /* unused */
|
||||||
|
|
||||||
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SET_DBDC_PARMS),
|
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SET_DBDC_PARMS),
|
||||||
false);
|
true);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -2859,7 +2859,7 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
err = mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
||||||
false);
|
true);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
clear_bit(MT76_HW_SCANNING, &phy->state);
|
clear_bit(MT76_HW_SCANNING, &phy->state);
|
||||||
|
|
||||||
@@ -2965,7 +2965,7 @@ int mt7925_mcu_sched_scan_req(struct mt76_phy *phy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
return mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
||||||
false);
|
true);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt7925_mcu_sched_scan_req);
|
EXPORT_SYMBOL_GPL(mt7925_mcu_sched_scan_req);
|
||||||
|
|
||||||
@@ -3001,7 +3001,7 @@ mt7925_mcu_sched_scan_enable(struct mt76_phy *phy,
|
|||||||
clear_bit(MT76_HW_SCHED_SCANNING, &phy->state);
|
clear_bit(MT76_HW_SCHED_SCANNING, &phy->state);
|
||||||
|
|
||||||
return mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
return mt76_mcu_skb_send_msg(mdev, skb, MCU_UNI_CMD(SCAN_REQ),
|
||||||
false);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
||||||
@@ -3040,7 +3040,7 @@ int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return mt76_mcu_send_msg(phy->dev, MCU_UNI_CMD(SCAN_REQ),
|
return mt76_mcu_send_msg(phy->dev, MCU_UNI_CMD(SCAN_REQ),
|
||||||
&req, sizeof(req), false);
|
&req, sizeof(req), true);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt7925_mcu_cancel_hw_scan);
|
EXPORT_SYMBOL_GPL(mt7925_mcu_cancel_hw_scan);
|
||||||
|
|
||||||
@@ -3145,7 +3145,7 @@ int mt7925_mcu_set_channel_domain(struct mt76_phy *phy)
|
|||||||
memcpy(__skb_push(skb, sizeof(req)), &req, sizeof(req));
|
memcpy(__skb_push(skb, sizeof(req)), &req, sizeof(req));
|
||||||
|
|
||||||
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(SET_DOMAIN_INFO),
|
return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(SET_DOMAIN_INFO),
|
||||||
false);
|
true);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt7925_mcu_set_channel_domain);
|
EXPORT_SYMBOL_GPL(mt7925_mcu_set_channel_domain);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user