Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2131983pxj; Thu, 20 May 2021 00:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV7kRdpKXKxfHQWX93YnmuA3GKrnDTE3G8FatDSa/OwpPpZ3BqebHmvZg3cXyLi8EjtUlO X-Received: by 2002:a92:c951:: with SMTP id i17mr3556272ilq.198.1621495511274; Thu, 20 May 2021 00:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621495511; cv=none; d=google.com; s=arc-20160816; b=fPaJIJ8CypwrpuOQx7u2YBV//7+7xH0/8y8YsHAdWnDkl+iMd/4zVxPdY/79GFmKFO RGa9XRilPbQIBGlnNO22+/mbcvTHm6Ogkj4BIJZ4v5jdRnr5YQiHZcm87nTrrp9tw2nJ xEbbpVhtaxODfdkc5v/mPFDc7Aqyd5MM8czq4XFvbH2VA/77E02c7L7vM045JPQkCmyb 8dGtu7ZW29jmm7Y7ybCvKzfbsLJ3ovk9zghI0FaSykAB89HgnK0Hx4EZinDZH52QG1bC INLBSlg0FL5QdVUrSW6CldFNhaI68dJw56P1MqlI7qPUPQoLTgugnTAOewNaJdiCIyW0 xsww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=6jSaQrf60LMFEz8/Pc1rsv42sG7WbGkHWxcMtm5b4cU=; b=t6020RQh6dxw6R8a7l3s9c7SFKXYGZwyCFLinrda84V0AkgdO+L7MxwXXytRJDwdH9 grq5XF/MfpSzbfGlbnNUsjPH77GUQOfUE+5EhjhMIKVsJ+SQP+jKuTwvK+L2ZO/ZsDCg I8t+ikKU3BlyKKEBOlVEaso2lMI/xlYtocjIeXZtvAhGp/9EKjjgP1GPU/6qmdF2XHGs pB1wLt3j9KEVJrTYegctWNN3EUcS74C/QmNIu51xfe8ARK7BJfhOsMOddf5K48kC7w0u ukyo1vBGwafKl6AL5m60ss30pWBm8wh43pJJdLeZRY4orF9En1j4Omlk3wn17igvLV2B PnRQ== 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 k15si1983898ilr.47.2021.05.20.00.24.55; Thu, 20 May 2021 00:25:11 -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 S230448AbhETHYH (ORCPT + 99 others); Thu, 20 May 2021 03:24:07 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:40870 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230102AbhETHYH (ORCPT ); Thu, 20 May 2021 03:24:07 -0400 X-UUID: db89d2bdd08c45feac49c9359cd45b3b-20210520 X-UUID: db89d2bdd08c45feac49c9359cd45b3b-20210520 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 884026645; Thu, 20 May 2021 15:22:36 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 May 2021 15:22:35 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 May 2021 15:22:34 +0800 From: To: , CC: , , , , , , , , , , , , , , , , Deren Wu , YN Chen Subject: [PATCH] mt76: mt7921: fix UC entry is being overwritten Date: Thu, 20 May 2021 15:22:34 +0800 Message-ID: <1621495354-4130-1-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Deren Wu Fix UC entry is being overwritten by BC entry Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine") Signed-off-by: Deren Wu Signed-off-by: YN Chen Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 73359defa176..f3decc59a6fe 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy, if (IS_ERR(skb)) return PTR_ERR(skb); - mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable); - if (info->enable && info->sta) - mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif, - info->rcpi); + if (info->sta) { + mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, + info->enable); + if (info->enable) + mt76_connac_mcu_sta_tlv(phy, skb, info->sta, + info->vif, info->rcpi); + } sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv)); -- 2.25.1