mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user