Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp770172rwb; Wed, 26 Jul 2023 02:34:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbr7YRy93yaq622LebWwepD9MINT4d0OtXoUKcUhFycI2mKcSmetfqUt6RI6JMxNAundl5 X-Received: by 2002:a17:902:c3cd:b0:1b3:a928:18e7 with SMTP id j13-20020a170902c3cd00b001b3a92818e7mr1119139plj.59.1690364041710; Wed, 26 Jul 2023 02:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690364041; cv=none; d=google.com; s=arc-20160816; b=k5JDIQp7oC3DN0Htwd/+cMjCGrXWjskqim8Ay5me6Vw3UGgB8Cfm/fbWdudVA2VkCL c/PBwk8e9igFMBItBAHRFtD7w/kpikFi1ZQ9rtFGFGgvywgAJ4HFyQtzssXxttZcMlXX E9zDrVbTEG0gDrkkfH/qq5Zq5ADEVMlX0WQTfLbdOUPUEDSkeYjUvH5wPM8+Fs2zYbkl 1E2XG01wADFZnFwhO1+BLY1f6GXOZ/jleC0Ng64qU0v+G1LBeHceXnMRG/TtCCEMdlVj DLHJFJL9m5y0zo7AYmgTnxEjxgScUjv+BbKLeuef+ANDjGn0tXkdNwUU0cATxuAZYDN8 8zXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aBO/2X8Kh9zAFI0kKRAKUBHaIL0WFnX+gQ4MtU5TMAo=; fh=MXiEBe39BGvQr4EuIas3ehfmU9VgJUgKUy4wMy7Qjj8=; b=0TbDqTEzHoa7go31J+QMlsI+BHklfEBZmopGDfNPBvhtbJrwpEY2LPS3/jpMzxUVp9 Uo3SC2NQR3ltZkhKobkLP4MEOyOu1HaH5yLidW8IZ+Pt9Dl7vTIT2lvBWgY8biPAmeUE x8w2z160jWXySr0c04UCu6rd57VeukmuIenHScTgDIS0F4T4NhXlIv1lLcLyhQrUU8Ne OwKkeV4f5wjP+crEzeXSSjt5r0PkaRvJZFD8VDtbXnx3Pup9ov8uCXDxtpsL2NGQAF6A j35/DCN9CrWKH52QYsPsZxwsrdEL2MjReABEkmdYo2AWg0EQPwcnk3+61umTo7IUosG+ dVjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=N5mekpYZ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij6-20020a170902ab4600b001bbb87642a0si3581206plb.230.2023.07.26.02.33.52; Wed, 26 Jul 2023 02:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=N5mekpYZ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232709AbjGZJUu (ORCPT + 58 others); Wed, 26 Jul 2023 05:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232118AbjGZJUe (ORCPT ); Wed, 26 Jul 2023 05:20:34 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14B5A171D for ; Wed, 26 Jul 2023 02:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aBO/2X8Kh9zAFI0kKRAKUBHaIL0WFnX+gQ4MtU5TMAo=; b=N5mekpYZXEwkG+j7DAkxgsUCwF e/Az5E7jL7FLmTuzvZhKQTUXb4fELoZytVegEG1Vt/3bRbioFGA/ad03EJhj47mps82Uz2cZN3XGZ qSreVbXCtcFY7OAkWUMxb+4DMtwcgiB52oWZH3OJZ0IBnqCERUpp7LrgDuHHUwad9Ws8=; Received: from p4ff134dd.dip0.t-ipconnect.de ([79.241.52.221] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1qOadt-001nWM-HE for linux-wireless@vger.kernel.org; Wed, 26 Jul 2023 11:17:13 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif Date: Wed, 26 Jul 2023 11:17:03 +0200 Message-ID: <20230726091704.25795-2-nbd@nbd.name> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726091704.25795-1-nbd@nbd.name> References: <20230726091704.25795-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When disabling beacons on a vif, intval is 0. Ensure that dev->mt76.beacon_int is not overwritten in this case, so that beacons continue to work for other interfaces. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c index b65b0a88c1de..888678732f29 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c @@ -161,7 +161,8 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval) return; } - dev->mt76.beacon_int = intval; + if (intval) + dev->mt76.beacon_int = intval; mt76_wr(dev, MT_TBTT, FIELD_PREP(MT_TBTT_PERIOD, intval) | MT_TBTT_CAL_ENABLE); -- 2.41.0