diff --git a/mt7603.h b/mt7603.h index 0571c0d7..45e85005 100644 --- a/mt7603.h +++ b/mt7603.h @@ -20,6 +20,7 @@ #define MT7603_MAX_INTERFACES 4 #define MT7603_WTBL_SIZE 128 #define MT7603_WTBL_RESERVED (MT7603_WTBL_SIZE - 1) +#define MT7603_WTBL_STA (MT7603_WTBL_RESERVED - MT7603_MAX_INTERFACES) #define MT7603_RATE_RETRY 2 diff --git a/mt7603_main.c b/mt7603_main.c index 1396b37b..b69c3c13 100644 --- a/mt7603_main.c +++ b/mt7603_main.c @@ -221,7 +221,7 @@ mt7603_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&dev->mutex); - idx = mt76_wcid_alloc(dev->wcid_mask, ARRAY_SIZE(dev->wcid) - 1); + idx = mt76_wcid_alloc(dev->wcid_mask, MT7603_WTBL_STA - 1); if (idx < 0) { ret = -ENOSPC; goto out;