Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp175517pxf; Thu, 25 Mar 2021 01:07:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr2fQhZ20+AM+ABH1m1ZWVVmsXnDZGsA7jSoQCZB/ZVLPdgTX16GYUmPOBdD1zu2z6YCyR X-Received: by 2002:a17:906:5248:: with SMTP id y8mr7859054ejm.150.1616659653837; Thu, 25 Mar 2021 01:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616659653; cv=none; d=google.com; s=arc-20160816; b=tPcNRbkX+GehD7mwEJ0ywI1Z5A8PNy+o+lcJkUlf6++xIyXIMSGMr9nqp8VXF5TN1M OPKIA9tb+aih51jytlvim5XVGxcEgi/TPiCO+54zbMLsbOrypH6nWEfr+rzTmv8rw7pk xcS8i49+RbkPGpaoTNNNMsovO2mqQowwM0b19WaWyLQzau7UdpyQ7qNn99jZsm1fygmS YGxLr7NGBGPIC4nEl9HOEqgVy+6RON2IDm/SsbSpwSxHMxmzQcnMph4TbHQO7aEnOdB4 v/JfSZBJL3XMjyv9I8mitN+G/UiOegx54UoNuvNkx21wSB72Uycg/dKjGAfM++pDFHzh EX+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=lUWzhKrEHLHKkYF0qcuD76KvcvyEJD14e7GbdXwxnD0=; b=Eunfr5NazmvLkAIi8tBDY9wMLtEcFkfRqr15wcE43eFqsc/x4L+kCDzBzFUvDOyknd e28N3JrLZzOkrSVxI4rgpD18jziswrvSjhAXMT+AJWdq+n3C+OG88Y1RvZz8m0lqfkK6 RF4LQVYK2DFN+UmGPYI67dSals7Mby/sZOn3FrTV1SmmUMWhsoGYU6na35sWTg313/kf GHixRjETqxEeLRSHPEDY9CdRwtJvok62ZyDhElsElo6HCo7bZOxhLSIkZ/yuHYI9Uknm GxwK/uGGr+Bpw0DgOws4BFNubvbT6dVEyeNLNTCT/FGCJY2sSvxZrC2UHnR+YdzImAbz zpCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si3573753ejd.683.2021.03.25.01.07.10; Thu, 25 Mar 2021 01:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbhCYIG3 (ORCPT + 99 others); Thu, 25 Mar 2021 04:06:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:41866 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229738AbhCYIGO (ORCPT ); Thu, 25 Mar 2021 04:06:14 -0400 X-UUID: 751633ca21df4d0ab33d0a4074db7175-20210325 X-UUID: 751633ca21df4d0ab33d0a4074db7175-20210325 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1990164669; Thu, 25 Mar 2021 16:06:11 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 25 Mar 2021 16:06:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 25 Mar 2021 16:06:09 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 4/5] mt76: mt7615: keep mcu_add_bss_info enabled till interface removal Date: Thu, 25 Mar 2021 16:06:04 +0800 Message-ID: <02d52818307a85b66e59ca11e36a9da47e2fe4df.1616657048.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20744fae1cbe0dcc098b3112b0a5ccb0b6254587.1616657048.git.ryder.lee@mediatek.com> References: <20744fae1cbe0dcc098b3112b0a5ccb0b6254587.1616657048.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org BSS_INFO_BASIC is never called alone with inactive state, which always follows beacon offload disable, so keep it enabled throughout interfaces life cycle. Inactive state also removes sta record of all connected stations, thurs causes connection lost which defeats the purpose of CSA. Lastly, this is especially an unexpected behavior that keeping mt7622 failing beacon buffer recyled when scanning channels. bss_conf change is updated with active state only, so just overwrite it. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 342e2c5d9766..ef879d71faa2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -253,7 +253,8 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw, struct mt7615_phy *phy = mt7615_hw_phy(hw); int idx = msta->wcid.idx; - /* TODO: disable beacon for the bss */ + mt7615_mcu_add_bss_info(phy, vif, NULL, false); + mt7615_mcu_sta_add(phy, vif, NULL, false); mt7615_mutex_acquire(dev); @@ -558,11 +559,11 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw, } } - if (changed & BSS_CHANGED_BEACON_ENABLED) { - mt7615_mcu_add_bss_info(phy, vif, NULL, info->enable_beacon); - mt7615_mcu_sta_add(phy, vif, NULL, info->enable_beacon); + if (changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon) { + mt7615_mcu_add_bss_info(phy, vif, NULL, true); + mt7615_mcu_sta_add(phy, vif, NULL, true); - if (vif->p2p && info->enable_beacon) + if (vif->p2p) mt7615_mcu_set_p2p_oppps(hw, vif); } -- 2.18.0