mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
wifi: mt76: make const arrays in functions static
Reduces size by avoiding duplicates Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
64bfcdbe02
commit
39db5a541d
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user