mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7915: decrease timeout for commonly issued MCU commands
This allows faster recovery from firmware issues Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -194,6 +194,25 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd)
|
||||||
|
{
|
||||||
|
if ((cmd & __MCU_CMD_FIELD_ID) != MCU_CMD_EXT_CID)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (FIELD_GET(__MCU_CMD_FIELD_EXT_ID, cmd)) {
|
||||||
|
case MCU_EXT_CMD_THERMAL_CTRL:
|
||||||
|
case MCU_EXT_CMD_GET_MIB_INFO:
|
||||||
|
case MCU_EXT_CMD_PHY_STAT_INFO:
|
||||||
|
case MCU_EXT_CMD_STA_REC_UPDATE:
|
||||||
|
case MCU_EXT_CMD_BSS_INFO_UPDATE:
|
||||||
|
mdev->mcu.timeout = 2 * HZ;
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
|
mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
|
||||||
int cmd, int *wait_seq)
|
int cmd, int *wait_seq)
|
||||||
@@ -208,6 +227,8 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
|
|||||||
else
|
else
|
||||||
qid = MT_MCUQ_WM;
|
qid = MT_MCUQ_WM;
|
||||||
|
|
||||||
|
mt7915_mcu_set_timeout(mdev, cmd);
|
||||||
|
|
||||||
return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
|
return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user