Commit c36457a8 authored by Deren Wu's avatar Deren Wu Committed by Felix Fietkau

wifi: mt76: mt7921: fix invalid remain_on_channel duration

round_jiffies_up() may change the duration reported from chip. We should
take the real timeout for current channel privilege.

Fixes: 034ae28b ("wifi: mt76: mt7921: introduce remain_on_channel support")
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent ac922bd6
......@@ -174,7 +174,7 @@ mt7921_mcu_uni_roc_event(struct mt7921_dev *dev, struct sk_buff *skb)
wake_up(&dev->phy.roc_wait);
duration = le32_to_cpu(grant->max_interval);
mod_timer(&dev->phy.roc_timer,
round_jiffies_up(jiffies + msecs_to_jiffies(duration)));
jiffies + msecs_to_jiffies(duration));
}
static void
......
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