Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4050772ybx; Mon, 4 Nov 2019 07:05:39 -0800 (PST) X-Google-Smtp-Source: APXvYqy+nux/sxhGk3MHW1oua68AbIchsdOIhVJgw+fBCLoLMmnCVurn5lFOA4UBu7vPHthLhGdH X-Received: by 2002:a05:6402:110c:: with SMTP id u12mr30052796edv.127.1572879939197; Mon, 04 Nov 2019 07:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572879939; cv=none; d=google.com; s=arc-20160816; b=ryBr564RoxlUxTIwJt4+JcSQm3byxOXY77ARzAIfB48OSO6s32mZfI+iljOf7U47dc CGW2z11aHr3FFjBJjPW2wp75oBk+L9Os0k82bx7XQeqHixTRbBwFsy74SqokR+A3zuaG aDqULfMRJlqIYiOjUwr0nbu6ubC6SUAShdyoWlvckR8lZN6eEZoqUBnwGI1QUyccxJYg DwiEXPHBK1VsD4Cl9o1M1R05kiKrbv5rsn65PffIx8tumctJfULDTIj417eaGHTP9UQk LhS/R11SqKLSsSJN5YCWqi4mXn6NGgoiswDmjLsU7V57PrrUkd6QNYDLTFUaK3jof0Jn 2nYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=t0IJKeNkZVyezW0wEz2MueXZusJwhH2Kwx0rHBm6taU=; b=VEzpqT5pdRgipo+929+Uip0zuW+QwYp+x+GfOdKyqLkOrWgHRIVMvT6KAnGnejnHCn JA8Vd8o+Qf3aCyHsNc8HyZJTqCgNA2NsTip9ZpvfN8lWImVyQvmjVU74k6R1DedLjQWr 9Wrw4HMz6++SQHOUatDRpsl9uaEV6s+F8cOwJFTP+LJimBt0NliHxDR4m5/p4LdfnfZ1 fUo5aMwF1o1FWdO3ovXjbJ7JPgJPe+zzRQXn6yaOlEkjtX4u2cGqnsoVMmJJty0XzU3Z nsI4BCwopn9KUjLf2jBMpZFyoYnoTmS+l+c1QFDVEKokdXiIYbqxlFcSEUa8Pcxeb7KH fMpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp18si6496390ejb.100.2019.11.04.07.04.59; Mon, 04 Nov 2019 07:05:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729047AbfKDPDt (ORCPT + 99 others); Mon, 4 Nov 2019 10:03:49 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:36268 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727788AbfKDPDs (ORCPT ); Mon, 4 Nov 2019 10:03:48 -0500 Received: from thunderstorm.prakinf.tu-ilmenau.de (thunderstorm.prakinf.tu-ilmenau.de [141.24.212.108]) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id 419A4580068; Mon, 4 Nov 2019 16:03:47 +0100 (CET) From: Markus Theil To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, sgruszka@redhat.com, linux-wireless@vger.kernel.org, Markus Theil Subject: [PATCH] mt76: mt76x02: fix num slots in beacon config init Date: Mon, 4 Nov 2019 16:03:41 +0100 Message-Id: <20191104150341.13896-1-markus.theil@tu-ilmenau.de> X-Mailer: git-send-email 2.17.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mt76x02 mmio and usb devices use a different number of beacon slots (8 vs. 5). Consider this in mt76x02_init_beacon_config. Signed-off-by: Markus Theil --- drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c index 4209209ac940..b7412953ff26 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c @@ -249,7 +249,7 @@ void mt76x02_init_beacon_config(struct mt76x02_dev *dev) mt76_set(dev, MT_BEACON_TIME_CFG, MT_BEACON_TIME_CFG_SYNC_MODE); mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xffff); - for (i = 0; i < 8; i++) + for (i = 0; i < dev->beacon_ops->nslots; i++) mt76x02_mac_set_beacon(dev, i, NULL); mt76x02_set_beacon_offsets(dev); -- 2.17.1