mt76: mt7921: make read-only array ppet16_ppet8_ru3_ru0 static const
authorColin Ian King <colin.i.king@gmail.com>
Thu, 14 Apr 2022 09:54:38 +0000 (10:54 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 13 May 2022 07:39:34 +0000 (09:39 +0200)
Don't populate the read-only array ppet16_ppet8_ru3_ru0 on the stack but
instead make it static const. Also makes the object code a little smaller.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/main.c

index 186d883..e3db08e 100644 (file)
@@ -12,7 +12,7 @@ static void
 mt7921_gen_ppe_thresh(u8 *he_ppet, int nss)
 {
        u8 i, ppet_bits, ppet_size, ru_bit_mask = 0x7; /* HE80 */
-       u8 ppet16_ppet8_ru3_ru0[] = {0x1c, 0xc7, 0x71};
+       static const u8 ppet16_ppet8_ru3_ru0[] = {0x1c, 0xc7, 0x71};
 
        he_ppet[0] = FIELD_PREP(IEEE80211_PPE_THRES_NSS_MASK, nss - 1) |
                     FIELD_PREP(IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK,