mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: fix per-driver wcid range checks after wcid array size bump
All drivers before MT7915 have a limit of 128 WCID entries. Stop relying
on ARRAY_SIZE(dev->mt76.wcid), since it no longer reflects that limit.
Fixes: 49e649c3e0a6 ("mt76: adjust wcid size to support new 802.11ax generation")
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "mt76x02_dfs.h"
|
||||
#include "mt76x02_dma.h"
|
||||
|
||||
#define MT76x02_N_WCIDS 128
|
||||
#define MT_CALIBRATE_INTERVAL HZ
|
||||
#define MT_MAC_WORK_INTERVAL (HZ / 10)
|
||||
|
||||
@@ -246,7 +247,7 @@ mt76x02_rx_get_sta(struct mt76_dev *dev, u8 idx)
|
||||
{
|
||||
struct mt76_wcid *wcid;
|
||||
|
||||
if (idx >= ARRAY_SIZE(dev->wcid))
|
||||
if (idx >= MT76x02_N_WCIDS)
|
||||
return NULL;
|
||||
|
||||
wcid = rcu_dereference(dev->wcid[idx]);
|
||||
|
||||
Reference in New Issue
Block a user