Commit 65ba7fa4 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt76x0: enable MCS 8 and MCS9

Enable MCS8 and MCS9 for mt76x0{u,e} devices
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent ffc54ee2
...@@ -12,24 +12,6 @@ ...@@ -12,24 +12,6 @@
#include "initvals.h" #include "initvals.h"
#include "../mt76x02_phy.h" #include "../mt76x02_phy.h"
static void mt76x0_vht_cap_mask(struct ieee80211_supported_band *sband)
{
struct ieee80211_sta_vht_cap *vht_cap = &sband->vht_cap;
u16 mcs_map = 0;
int i;
vht_cap->cap &= ~IEEE80211_VHT_CAP_RXLDPC;
for (i = 0; i < 8; i++) {
if (!i)
mcs_map |= (IEEE80211_VHT_MCS_SUPPORT_0_7 << (i * 2));
else
mcs_map |=
(IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2));
}
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
}
static void static void
mt76x0_set_wlan_state(struct mt76x02_dev *dev, u32 val, bool enable) mt76x0_set_wlan_state(struct mt76x02_dev *dev, u32 val, bool enable)
{ {
...@@ -263,9 +245,11 @@ int mt76x0_register_device(struct mt76x02_dev *dev) ...@@ -263,9 +245,11 @@ int mt76x0_register_device(struct mt76x02_dev *dev)
return ret; return ret;
if (dev->mt76.cap.has_5ghz) { if (dev->mt76.cap.has_5ghz) {
/* overwrite unsupported features */ struct ieee80211_supported_band *sband;
mt76x0_vht_cap_mask(&dev->mphy.sband_5g.sband);
mt76x0_init_txpower(dev, &dev->mphy.sband_5g.sband); sband = &dev->mphy.sband_5g.sband;
sband->vht_cap.cap &= ~IEEE80211_VHT_CAP_RXLDPC;
mt76x0_init_txpower(dev, sband);
} }
if (dev->mt76.cap.has_2ghz) if (dev->mt76.cap.has_2ghz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment