提交 7e4de0c8 编写于 作者: B Bo Jiao 提交者: Felix Fietkau

mt76: mt7915: fix calling mt76_wcid_alloc with incorrect parameter

It will cause maximum connectable STA to be one less
when calling mt76_wcid_alloc with parameter MT7915_WTBL_STA - 1.
Signed-off-by: NBo Jiao <Bo.Jiao@mediatek.com>
Signed-off-by: NSujuan Chen <sujuan.chen@mediatek.com>
Reviewed-by: NRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 3924715f
......@@ -480,7 +480,7 @@ static int mt7915_init_hardware(struct mt7915_dev *dev)
}
/* Beacon and mgmt frames should occupy wcid 0 */
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA - 1);
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
if (idx)
return -ENOSPC;
......
......@@ -613,7 +613,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
int ret, idx;
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA - 1);
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
if (idx < 0)
return -ENOSPC;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册