mt76x2: limit client WCID entries to 0-127

The rx WCID lookup table and the per-WCID rate table only have 128
entries. All further WCID entries are tx-only.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2017-11-15 17:59:48 +01:00
parent cc02e495cd
commit e4e773440a
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ struct mt76x2_dev {
struct mutex mutex;
const u16 *beacon_offsets;
unsigned long wcid_mask[256 / BITS_PER_LONG];
unsigned long wcid_mask[128 / BITS_PER_LONG];
int txpower_conf;
int txpower_cur;
@@ -104,7 +104,7 @@ struct mt76x2_dev {
u32 aggr_stats[32];
struct mt76_wcid global_wcid;
struct mt76_wcid __rcu *wcid[254 - 8];
struct mt76_wcid __rcu *wcid[128];
spinlock_t irq_lock;
u32 irqmask;
+3
View File
@@ -536,6 +536,9 @@ void mt76x2_mac_wcid_setup(struct mt76x2_dev *dev, u8 idx, u8 vif_idx, u8 *mac)
mt76_wr(dev, MT_WCID_ATTR(idx), attr);
if (idx >= 128)
return;
if (mac)
memcpy(addr.macaddr, mac, ETH_ALEN);