Commit cb143967 authored by Bo Jiao's avatar Bo Jiao Committed by Felix Fietkau

mt76: set wlan_idx_hi on mt7916

Since mt7916 supports up to 544 wcid entries, wlan_idx_hi needs to be set
in order to support wcid index >= 256
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarBo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 6683d988
...@@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev *dev) ...@@ -110,6 +110,11 @@ static inline bool is_mt7915(struct mt76_dev *dev)
return mt76_chip(dev) == 0x7915; return mt76_chip(dev) == 0x7915;
} }
static inline bool is_mt7916(struct mt76_dev *dev)
{
return mt76_chip(dev) == 0x7906;
}
static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef) static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
{ {
static const u8 width_to_bw[] = { static const u8 width_to_bw[] = {
......
...@@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid, ...@@ -1464,7 +1464,7 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid,
{ {
*wlan_idx_hi = 0; *wlan_idx_hi = 0;
if (is_mt7921(dev) || is_mt7915(dev)) { if (is_mt7921(dev) || is_mt7915(dev) || is_mt7916(dev)) {
*wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0; *wlan_idx_lo = wcid ? to_wcid_lo(wcid->idx) : 0;
*wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0; *wlan_idx_hi = wcid ? to_wcid_hi(wcid->idx) : 0;
} else { } else {
......
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