@@ -84,18 +84,18 @@ static const struct ieee80211_tpt_blink mt76_tpt_blink[] = {
};
struct ieee80211_rate mt76_rates[] = {
- CCK_RATE(0, 10),
- CCK_RATE(1, 20),
- CCK_RATE(2, 55),
- CCK_RATE(3, 110),
- OFDM_RATE(11, 60),
- OFDM_RATE(15, 90),
- OFDM_RATE(10, 120),
- OFDM_RATE(14, 180),
- OFDM_RATE(9, 240),
- OFDM_RATE(13, 360),
- OFDM_RATE(8, 480),
- OFDM_RATE(12, 540),
+ CCK_RATE(0, 10, 6),
+ CCK_RATE(1, 20, 6),
+ CCK_RATE(2, 55, 6),
+ CCK_RATE(3, 110, 6),
+ OFDM_RATE(11, 60, 6),
+ OFDM_RATE(15, 90, 6),
+ OFDM_RATE(10, 120, 6),
+ OFDM_RATE(14, 180, 6),
+ OFDM_RATE(9, 240, 6),
+ OFDM_RATE(13, 360, 6),
+ OFDM_RATE(8, 480, 6),
+ OFDM_RATE(12, 540, 6),
};
EXPORT_SYMBOL_GPL(mt76_rates);
@@ -755,17 +755,17 @@ enum mt76_phy_type {
MT_PHY_TYPE_HE_MU,
};
-#define CCK_RATE(_idx, _rate) { \
+#define CCK_RATE(_idx, _rate, _offset) { \
.bitrate = _rate, \
.flags = IEEE80211_RATE_SHORT_PREAMBLE, \
- .hw_value = (MT_PHY_TYPE_CCK << 8) | (_idx), \
- .hw_value_short = (MT_PHY_TYPE_CCK << 8) | (4 + _idx), \
+ .hw_value = (MT_PHY_TYPE_CCK << (_offset)) | (_idx), \
+ .hw_value_short = (MT_PHY_TYPE_CCK << (_offset)) | (4 + _idx), \
}
-#define OFDM_RATE(_idx, _rate) { \
+#define OFDM_RATE(_idx, _rate, _offset) { \
.bitrate = _rate, \
- .hw_value = (MT_PHY_TYPE_OFDM << 8) | (_idx), \
- .hw_value_short = (MT_PHY_TYPE_OFDM << 8) | (_idx), \
+ .hw_value = (MT_PHY_TYPE_OFDM << (_offset)) | (_idx), \
+ .hw_value_short = (MT_PHY_TYPE_OFDM << (_offset)) | (_idx), \
}
extern struct ieee80211_rate mt76_rates[12];
@@ -304,6 +304,21 @@ mt7603_init_hardware(struct mt7603_dev *dev)
return 0;
}
+static struct ieee80211_rate mt7603_rates[] = {
+ CCK_RATE(0, 10, 8),
+ CCK_RATE(1, 20, 8),
+ CCK_RATE(2, 55, 8),
+ CCK_RATE(3, 110, 8),
+ OFDM_RATE(11, 60, 8),
+ OFDM_RATE(15, 90, 8),
+ OFDM_RATE(10, 120, 8),
+ OFDM_RATE(14, 180, 8),
+ OFDM_RATE(9, 240, 8),
+ OFDM_RATE(13, 360, 8),
+ OFDM_RATE(8, 480, 8),
+ OFDM_RATE(12, 540, 8),
+};
+
static const struct ieee80211_iface_limit if_limits[] = {
{
.max = 1,
@@ -541,8 +556,8 @@ int mt7603_register_device(struct mt7603_dev *dev)
wiphy->reg_notifier = mt7603_regd_notifier;
- ret = mt76_register_device(&dev->mt76, true, mt76_rates,
- ARRAY_SIZE(mt76_rates));
+ ret = mt76_register_device(&dev->mt76, true, mt7603_rates,
+ ARRAY_SIZE(mt7603_rates));
if (ret)
return ret;
@@ -19,14 +19,14 @@ struct ieee80211_rate mt76x02_rates[] = {
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),
- OFDM_RATE(3, 180),
- OFDM_RATE(4, 240),
- OFDM_RATE(5, 360),
- OFDM_RATE(6, 480),
- OFDM_RATE(7, 540),
+ OFDM_RATE(0, 60, 8),
+ OFDM_RATE(1, 90, 8),
+ OFDM_RATE(2, 120, 8),
+ OFDM_RATE(3, 180, 8),
+ OFDM_RATE(4, 240, 8),
+ OFDM_RATE(5, 360, 8),
+ OFDM_RATE(6, 480, 8),
+ OFDM_RATE(7, 540, 8),
};
EXPORT_SYMBOL_GPL(mt76x02_rates);