Skip to contentSkip to conversation

mt76: connac: make read-only array ba_range static const

PATCH New Colin Ian King 1 participant 1 message Mar 7, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mt76: connac: make read-only array ba_range static const

Don't populate the read-only array ba_range on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +1 -1
index 0a646ae51c8d..fb44fc6c78f3 100644
@@ -1044,7 +1044,7 @@ void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
 	}
 
 	if (enable && tx) {
-		u8 ba_range[] = { 4, 8, 12, 24, 36, 48, 54, 64 };
+		static const u8 ba_range[] = { 4, 8, 12, 24, 36, 48, 54, 64 };
 		int i;
 
 		for (i = 7; i > 0; i--) {
Signature · 1 line
2.35.1