2021-03-26 20:56:17

by Felix Fietkau

[permalink] [raw]
Subject: [PATCH 2/3] mt76: mt7915: 0-terminate firmware log messages

Avoid including garbage from previous rx data in the printk messages

Signed-off-by: Felix Fietkau <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 9d0911ac1d90..138f55d9fc02 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -521,6 +521,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
break;
}

+ skb->data[skb->len] = 0;
wiphy_info(mt76_hw(dev)->wiphy, "%s: %s", type, data);
}

--
2.30.1