Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/mt76.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2020-04-20 15:39:02 +0300
committerFelix Fietkau <nbd@nbd.name>2020-04-22 19:02:07 +0300
commite910787a98881be0b9c0bb2f47d741d91f7c6725 (patch)
tree7527e191a409878ce54c9dcc6418a41d8b0812e9 /util.c
parentfacf74fd506fbe42914401a447d81347efc6e65c (diff)
mt76: mt7615: fix max wtbl size for 7663
Current mt7663 offload firmware can support up to 32 wtbl entries Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 8c60c450..07cf7124 100644
--- a/util.c
+++ b/util.c
@@ -46,7 +46,7 @@ int mt76_wcid_alloc(unsigned long *mask, int size)
{
int i, idx = 0, cur;
- for (i = 0; i < size / BITS_PER_LONG; i++) {
+ for (i = 0; i < DIV_ROUND_UP(size, BITS_PER_LONG); i++) {
idx = ffs(~mask[i]);
if (!idx)
continue;