Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp667168pxb; Tue, 5 Apr 2022 18:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSuYdRUhtigzlLJmYGFHJcapMft2MMwhkIsuJ9E3Vbx/fDT24bzu8/ZLCHUHlVlJdvE0nr X-Received: by 2002:a05:6402:1c87:b0:41c:dd9c:2e94 with SMTP id cy7-20020a0564021c8700b0041cdd9c2e94mr6358284edb.2.1649206826961; Tue, 05 Apr 2022 18:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206826; cv=none; d=google.com; s=arc-20160816; b=JToOtb6EAof6edLUq+Adf3mmc/a8bxeR9xQN1YKXNdxCRvdmy5xcdxqUzME0dQ0yQC vkDfWKFqQceZTnhDOP+UTqaIULBQlZEz0eeN/I9VqHsu8QMg1+XHvPo87IrLtrQ5Tqyw pwTXlCS3pfExs9/QJJWLOSIfpU/d0MN909IOb8jLtFYyckhYDw7aXQpFc/5OEEXLJ5dL sKdrB8trc9z3RVxw3YrqoK270P0Kd63uLfpEXXy5F9adSDrcPgDjIiKhabQJb/fRLwhr PJpWcnPySucQDvxGnYgHnIcMUwSDkWkOUZ987Jc5CTTR1aMj+GxIvVx96B1EICDI4exL bMsA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lzko7U3r3pqjYFhFA3udhwC9YTntwmPpwdl/5PIeTJs=; b=fSKpYwvIkc30BeQM8O2RXkH/Ih6MRFYVbQX9xwoyBtlaah9H/iWfhc79pbt+GOC7/Y E5M8UVIXw1+8GpSMHFZx2f0/xxMz26JI8w/XDqYixybRWQYICDuIQCE4Z+TysTenWf3w J4tXCbanVAVanTrwX85d9X4TWTd5C91Xy7efKnY0vtwEYAS72kpTZhd5khf8FHnoQoOk xYHDH8qwyPsf4clzHOlB+Ym+07KHYACWb+Qjic84eYzfmsR/O4Di/xQdfwfZ/sXADm4N mC08z+uvqqNXo27ru02OEb+c6vLzDU/4hAmI7Ve6cJxQu2dkQqlwEiCnQklJV8Cayyat Pcyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rmJn8Msn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv17-20020a170906b1d100b006df76385bf5si10493004ejb.149.2022.04.05.18.00.00; Tue, 05 Apr 2022 18:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=rmJn8Msn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383998AbiDEM0t (ORCPT + 99 others); Tue, 5 Apr 2022 08:26:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245173AbiDEIyM (ORCPT ); Tue, 5 Apr 2022 04:54:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 693E0113E; Tue, 5 Apr 2022 01:51:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 076FE61504; Tue, 5 Apr 2022 08:51:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19AB3C385A0; Tue, 5 Apr 2022 08:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148706; bh=YupnqndCtkR3vV2ScBcqo7c4sEwMK9OisE3c80HtMlU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rmJn8Msne5ku2e4sftIl93YnHiHxqaS0irG+YkCYwwJiM5cgX0pz2T3tEIYPEEALA wmbxmAcNLs7E/zgG8cED7rHN8o/QfLopUMofJvk083ha6Vtfprj0Ipeuy8SHMhRetg j6OSuxa25ryTu2dcEA0qxfZfyEl1v0yg/lVL4b4s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 5.16 0452/1017] mt76: mt7915: use proper aid value in mt7915_mcu_wtbl_generic_tlv in sta mode Date: Tue, 5 Apr 2022 09:22:45 +0200 Message-Id: <20220405070407.715907378@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit a56b1b0f145ef2d6bb9312dedf3ab8558ef50a5b ] mac80211 provides aid in vif->bss_conf.aid for sta mode and not in sta->aid. Fix mt7915_mcu_wtbl_generic_tlv routine using proper value for aid in sta mode. Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 8215b3d79bbd..8cdf689b383e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1263,8 +1263,11 @@ mt7915_mcu_wtbl_generic_tlv(struct sk_buff *skb, struct ieee80211_vif *vif, generic = (struct wtbl_generic *)tlv; if (sta) { + if (vif->type == NL80211_IFTYPE_STATION) + generic->partial_aid = cpu_to_le16(vif->bss_conf.aid); + else + generic->partial_aid = cpu_to_le16(sta->aid); memcpy(generic->peer_addr, sta->addr, ETH_ALEN); - generic->partial_aid = cpu_to_le16(sta->aid); generic->muar_idx = mvif->omac_idx; generic->qos = sta->wme; } else { -- 2.34.1