Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp962713pxb; Wed, 6 Apr 2022 05:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEEKtyZ4ZZ791WHGvHuaSyrQ6zu9pyPMkilyaDeDj4NIHWc86q+BnxJ/hXr0nJHxsKKFYM X-Received: by 2002:a17:90a:f189:b0:1ca:c279:1bdf with SMTP id bv9-20020a17090af18900b001cac2791bdfmr9662438pjb.185.1649247978744; Wed, 06 Apr 2022 05:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649247978; cv=none; d=google.com; s=arc-20160816; b=ZcR8M8RRxYIx+uh+V3v8TwpUGsXHmujxZciqtXnK8mMRUDXaWRdHd3h2s95EeNnHAM 8aFXynXGMGHwTChGBgzVvC74jRsGzdL+TzZ19nOG1JVQ3WBWb40B4HnTxG9OJXHJi4YG PQyTX8td2/6uZQraCNM6T/NnAf/e+QZTUo+kVq4LQ/uy7i8d3LdCcCG8IoNs6pIehPiQ 1IIqz1h4z58A8glBlK0u8TN2omKl7+aPChkSK/m5CdRjPT/fxodoaFpPkjoxtWjAs60D BU/HexcrUC38cBFtebqiqVma+NdA+WxJEC1jvuBkmlJt/nHIthpo6HlR1+hENAjbsldI CM+g== 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=p/LP5bjH/eLYNGbvszKilRdkhiNqWy9/la1ije3Nng4=; b=etUyHYcXGsJ0c6wW1QtIa0ufdC95UNhxvzClDDELAKJe9HjE9hIwaDVC0dPpmX5e0g +pduE0TvScscaRVVgV3dH5Amacct1XYvZYtlNt9zLNULVrlhSc1bO0zcExn1Wb05IlTB wxgQ+mjmMRuboSy5tNCZ278Ki7taiiZUJn1Mf99Mm3+hclnMQJX6YyN+pv7WJ3ShPeYn Yplg9lOjc+WHtYFW1Ti8oCbbutxgLmGOh5Ye+o1gFCHKlhu/vSnudbFJ3zNdBdGodSGV 2LBgJN0tpNi3cCRG85KB9VXcifWbnBKIVccG7rwWZ7rnh9PGa8vqDjgjOdjIB2o1BMsk IrDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Igt+Tl4r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l10-20020a63da4a000000b003816043f030si14768491pgj.549.2022.04.06.05.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Igt+Tl4r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC7976E8433; Wed, 6 Apr 2022 04:36:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1587125AbiDFAHk (ORCPT + 99 others); Tue, 5 Apr 2022 20:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348922AbiDEJss (ORCPT ); Tue, 5 Apr 2022 05:48:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5631EE4F0; Tue, 5 Apr 2022 02:37:35 -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 8227561368; Tue, 5 Apr 2022 09:37:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94A0EC385A0; Tue, 5 Apr 2022 09:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151454; bh=QNoGFnLDPZWBXQwk0TSwDZMOh2bX8rqDTA3X0EL9tfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Igt+Tl4rZJy5vI89+QkHjKxQMcS8qkqvRUPb7kwJP3i6KI6snBFAPqjDTr6kRqzff 0PXi78UdTDc8UHSFv/vtoMabTBinamW93+cX0TFszIOqJtSSz4SkHVkXPc/rUobeEm f64yJcAUWCzOh+KD6B3CAy8W0Q2lqDyiCSWzrOtc= 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.15 422/913] mt76: mt7915: use proper aid value in mt7915_mcu_wtbl_generic_tlv in sta mode Date: Tue, 5 Apr 2022 09:24:44 +0200 Message-Id: <20220405070352.495259947@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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-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 7440f2b443ec..b157db9f8903 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1396,8 +1396,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