Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5310245rwd; Mon, 5 Jun 2023 01:26:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5NXFEmWCN2pRmKxgkOMYjYA0DXWAvvWhzfxjmzwWzX9rBrDk/ZLfclJPlK7UY2R6Hxg4yj X-Received: by 2002:a05:6a20:4413:b0:100:3964:6cb with SMTP id ce19-20020a056a20441300b00100396406cbmr7739926pzb.40.1685953590778; Mon, 05 Jun 2023 01:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685953590; cv=none; d=google.com; s=arc-20160816; b=m7dc4E2V4bQF3dmr2GA2NyurHFhvvSZ0mAj/WhUkd1ETtlTgtWR4j0TreZhaWbEcSM npZUq9ufK9Fp4KecKGZgpB/AQhnIWWnJyDwHOgIGbf8ruj4Bd4jDqAqUsn2CxL6zVfUT NoX6hkmUtcgWTG02TY9MaXhrKLmo5a0qL0G91KSg4ajgTfLZOqpKgMzbiJFvCga7v/Vy QffSWFYpeOqFZbA6mpAkp75BPZ6o9MCX7qKJ5H+HscJ80Fg31lWQJdU3/fF+93i4ShGY tJIqLmIujBEp4U3GOI4QVsLu3T58/K+8iqiJIfnjlQGzqDL4qKE8NxNYmIhBI9SjHt0p aiJQ== 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:dkim-signature; bh=ideZ1Klm2NAjWMwjK8/UouIl5u5BNTWawKkvNwAq98U=; b=vrmv1k09/QRx0O1cH6QfbCsc5q+CT0OXfPu0WO5e7o6Z3ZQ53YooBfsl0gz6qw6R6f S+bSWzyu6eTe2Dd8U4PrDlnwKrbBamSBKc/2y9Uko9XhZbNDR0AeIt3IBRScIk1NILT/ IP4CVzswEEvmCH+gIW4BD/nfHpmqD+3U4+T/7ywp8B/vnCuOSFKaAXwpB6N8TzF+nvMX 25mGqsxBpqCEjePkuaMHXIIRWP2NCafNx3USN8ntK4PCF5o2sTq+rlc6yCvYOAs93SNT NhHKk8EWcbHh8Qh0EuonqW5ZCTa7wtb3cJDzAJOCvfCQIarKSm+iR88zmcBBL9pyS6fO zqVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Kou+9FKq; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020aa797b2000000b00654d446d357si3567442pfq.177.2023.06.05.01.26.23; Mon, 05 Jun 2023 01:26:30 -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=pass header.i=@mediatek.com header.s=dk header.b=Kou+9FKq; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjFEIU6 (ORCPT + 62 others); Mon, 5 Jun 2023 04:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjFEIUw (ORCPT ); Mon, 5 Jun 2023 04:20:52 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C315DA for ; Mon, 5 Jun 2023 01:20:51 -0700 (PDT) X-UUID: dc92ddaa037911eeb20a276fd37b9834-20230605 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ideZ1Klm2NAjWMwjK8/UouIl5u5BNTWawKkvNwAq98U=; b=Kou+9FKq9+56g5OusoGwIRg1Hsbo2SZvtlFcrBcY3z/aRW6ZvrGVxRBMdfbDux1UFmcdGG5aILYhKGPtuXEnl7jicJF056BF5UBxgrJ4RJcX9Suw7oooNoaW6y/G8Q2ajLapdpjFx2VyiggXaag5pT9y1W79M9CZKBVKoxLryNI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:0b1b73ea-1c3e-4456-afb9-91cc99ac0c62,IP:0,U RL:0,TC:0,Content:20,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:20 X-CID-META: VersionHash:d5b0ae3,CLOUDID:6e0f0c6e-2f20-4998-991c-3b78627e4938,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:4,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-UUID: dc92ddaa037911eeb20a276fd37b9834-20230605 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 462674077; Mon, 05 Jun 2023 16:20:42 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 5 Jun 2023 16:20:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 5 Jun 2023 16:20:40 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Peter Chiu , Shayne Chen Subject: [PATCH v2 03/10] wifi: mt76: mt7996: fix bss wlan_idx when sending bss_info command Date: Mon, 5 Jun 2023 16:19:40 +0800 Message-ID: <20230605081947.12804-3-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230605081947.12804-1-shayne.chen@mediatek.com> References: <20230605081947.12804-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 From: Peter Chiu The bmc_tx_wlan_idx should be the wlan_idx of the current bss rather than peer AP's wlan_idx, otherwise there will appear some frame decryption problems on station mode. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Reviewed-by: Shayne Chen Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c index 28930693a75a..64b99fd16f51 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c @@ -712,6 +712,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, struct cfg80211_chan_def *chandef = &phy->chandef; struct mt76_connac_bss_basic_tlv *bss; u32 type = CONNECTION_INFRA_AP; + u16 sta_wlan_idx = wlan_idx; struct tlv *tlv; int idx; @@ -731,7 +732,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, struct mt76_wcid *wcid; wcid = (struct mt76_wcid *)sta->drv_priv; - wlan_idx = wcid->idx; + sta_wlan_idx = wcid->idx; } rcu_read_unlock(); } @@ -751,7 +752,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, bss->bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int); bss->dtim_period = vif->bss_conf.dtim_period; bss->bmc_tx_wlan_idx = cpu_to_le16(wlan_idx); - bss->sta_idx = cpu_to_le16(wlan_idx); + bss->sta_idx = cpu_to_le16(sta_wlan_idx); bss->conn_type = cpu_to_le32(type); bss->omac_idx = mvif->omac_idx; bss->band_idx = mvif->band_idx; -- 2.39.2