diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-04-29 19:32:56 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-06-19 10:22:37 +0300 |
commit | 54b8fdebe4f45aafb61a0c73872a50d53791b091 (patch) | |
tree | 1a4685b85185e02a3e6b33db6bad6c8a3fb09101 /drivers/net/wireless/mediatek/mt76/mt76x02_util.c | |
parent | 3de4cb1756565a22321039eb9ae0193519bed967 (diff) | |
download | linux-54b8fdebe4f45aafb61a0c73872a50d53791b091.tar.xz |
mt76: move mt76_rates in mt76 module
Move mt76_rates array in mt76 module and remove duplicated code since it
is shared by all drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_util.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index 02db5d66735d..ccdbab341271 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c @@ -7,24 +7,18 @@ #include <linux/module.h> #include "mt76x02.h" -#define CCK_RATE(_idx, _rate) { \ +#define MT76x02_CCK_RATE(_idx, _rate) { \ .bitrate = _rate, \ .flags = IEEE80211_RATE_SHORT_PREAMBLE, \ .hw_value = (MT_PHY_TYPE_CCK << 8) | (_idx), \ .hw_value_short = (MT_PHY_TYPE_CCK << 8) | (8 + (_idx)), \ } -#define OFDM_RATE(_idx, _rate) { \ - .bitrate = _rate, \ - .hw_value = (MT_PHY_TYPE_OFDM << 8) | (_idx), \ - .hw_value_short = (MT_PHY_TYPE_OFDM << 8) | (_idx), \ -} - struct ieee80211_rate mt76x02_rates[] = { - CCK_RATE(0, 10), - CCK_RATE(1, 20), - CCK_RATE(2, 55), - CCK_RATE(3, 110), + MT76x02_CCK_RATE(0, 10), + MT76x02_CCK_RATE(1, 20), + MT76x02_CCK_RATE(2, 55), + MT76x02_CCK_RATE(3, 110), OFDM_RATE(0, 60), OFDM_RATE(1, 90), OFDM_RATE(2, 120), |