wifi: mt76: make const arrays in functions static
Subsystems (2)
Felix Fietkau
maintainerPATCH 1/1 wifi: mt76: make const arrays in functions static
Reduces size by avoiding duplicates
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
@@ -1193,7 +1193,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,int tx_ant =hweight8 (phy->mt76->chainmask) -1 ;struct sta_rec_bf *bf;struct tlv *tlv; -const u8 matrix[4 ][4 ] = { +static const u8 matrix[4 ][4 ] = { {0 ,0 ,0 ,0 }, {1 ,1 ,0 ,0 },/* 2x1, 2x2, 2x3, 2x4 */ {2 ,4 ,4 ,0 },/* 3x1, 3x2, 3x3, 3x4 */
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +2 -2
@@ -1100,12 +1100,12 @@ int mt7921_mcu_config_sniffer(struct mt792x_vif *vif, {struct cfg80211_chan_def *chandef = &ctx->def;int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2; -const u8 ch_band[] = { +static const u8 ch_band[] = { [NL80211_BAND_2GHZ ] =1 , [NL80211_BAND_5GHZ ] =2 , [NL80211_BAND_6GHZ ] =3 , }; -const u8 ch_width[] = { +static const u8 ch_width[] = { [NL80211_CHAN_WIDTH_20_NOHT ] =0 , [NL80211_CHAN_WIDTH_20 ] =0 , [NL80211_CHAN_WIDTH_40 ] =0 ,
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +2 -2
@@ -1768,12 +1768,12 @@ int mt7925_mcu_config_sniffer(struct mt792x_vif *vif,struct cfg80211_chan_def *chandef = ctx ? &ctx->def : &mphy->chandef;int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2; -const u8 ch_band[] = { +static const u8 ch_band[] = { [NL80211_BAND_2GHZ ] =1 , [NL80211_BAND_5GHZ ] =2 , [NL80211_BAND_6GHZ ] =3 , }; -const u8 ch_width[] = { +static const u8 ch_width[] = { [NL80211_CHAN_WIDTH_20_NOHT ] =0 , [NL80211_CHAN_WIDTH_20 ] =0 , [NL80211_CHAN_WIDTH_40 ] =0 ,
drivers/net/wireless/mediatek/mt76/mt7996/main.c +1 -1
@@ -450,7 +450,7 @@ mt7996_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, const struct ieee80211_tx_queue_params *params) {struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv; -const u8 mq_to_aci[] = { +static const u8 mq_to_aci[] = { [IEEE80211_AC_VO ] =3 , [IEEE80211_AC_VI ] =2 , [IEEE80211_AC_BE ] =0 ,
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +1 -1
@@ -1656,7 +1656,7 @@ mt7996_mcu_sta_bfer_tlv(struct mt7996_dev *dev, struct sk_buff *skb,int tx_ant =hweight8 (phy->mt76->chainmask) -1 ;struct sta_rec_bf *bf;struct tlv *tlv; -const u8 matrix[4 ][4 ] = { +static const u8 matrix[4 ][4 ] = { {0 ,0 ,0 ,0 }, {1 ,1 ,0 ,0 },/* 2x1, 2x2, 2x3, 2x4 */ {2 ,4 ,4 ,0 },/* 3x1, 3x2, 3x3, 3x4 */
Signature · 1 line
2.44.0