Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp51089ybg; Mon, 8 Jun 2020 16:10:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZMLvROEMZhI4/x/E9s1RZ4h0hZufTq1Z8nnUT4UBtHfSMlV8rkxlkhuXftI/coC+vRrMU X-Received: by 2002:a50:ed08:: with SMTP id j8mr24294689eds.58.1591657818966; Mon, 08 Jun 2020 16:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591657818; cv=none; d=google.com; s=arc-20160816; b=Y7V/inqDEdcftLdNpYMYCJbYYvvo56mYSZXMX5fYiYJG398gpd8A0sWYcJEXdXGEzZ cV+/DHqrMd6VwmG7GUi8tlwhmKAyTfhTnKOnZdl03y/4WlFEi47GsDSxAwJm74ebzkbt Xw79/67Qaj0rS8bNiSxaafUSR8sPfOjmx0SRlascwnNW2Xbq6/6HT/M8RfxY+V8RKDU+ Ey4+eM/06tGz0UmYLaxFGE5U8ycq3gFXSf8D2NogYgHIPocyH/nDR8L2yk8Hpx7/Whsn P32cytrvGp0XT1emMyJK/JF65VinHVgjbKqfYDi1kT7M85EBUolqWQkgefRMCw3NV367 Lyng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=at+tLkRMIab7yxfNo54axn8iXOUDBokm1o8ZDPOo00g=; b=w3wafkcOA7cnCe4g6pm/fDumNFDHaQLfPA7t5asEDTZFuYL7yiwmmsgJq45grlPWPo 3tPYtWMp4R/H/I9j7w1HXSSJF3u57MDqiXppNUS5iOhlwczZQjqP1uiPkszjPsy4IWsf xJ5l1lWEYzgvYN3xIEPhR0OajNM7aGTxDfyFJsXwOlVtonnpxgdIYGLj9ggL84ozUvjX iP6Kq63SLAnf1+POqWczQdI6EfWuUdudSbcWJIi9H1Mp8hu4A4p8zMrQsjtIj+clNH9a YSgN+J+hLcrSOzz5h+ndXDAnEiplEivklTjg85VQAOJHx/K1ZjiBVcuXe5l2Og86KcHq EMrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LNcUfdbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lh21si9639375ejb.54.2020.06.08.16.09.55; Mon, 08 Jun 2020 16:10:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LNcUfdbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbgFHXHf (ORCPT + 99 others); Mon, 8 Jun 2020 19:07:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:50712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727784AbgFHXHE (ORCPT ); Mon, 8 Jun 2020 19:07:04 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D4E9B20801; Mon, 8 Jun 2020 23:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657623; bh=T1TFFnuOR8yP9KXZ3SI9ba8JrUEjNEAKKapF2hBhyM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LNcUfdbAu+qPxo9Ufa+tE7TZQCgGYeUaoDOC6FDj1G8PdoARt/a1ytmvIDfpcvOCT yrsnDjlQpErv7WeqJW2vz1u6XYXuE1HJtWiZuR8W9IeB0DY4hB/v0USCwEBMMXqKCO h0269BWE4U5SAhNsytWzTllwocfxoCTMijUsSzFQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lorenzo Bianconi , Felix Fietkau , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 044/274] mt76: mt7615: fix aid configuration in mt7615_mcu_wtbl_generic_tlv Date: Mon, 8 Jun 2020 19:02:17 -0400 Message-Id: <20200608230607.3361041-44-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit fdf433121f82766ff508a6f06665d2aca3e258d5 ] If the vif is running in station mode the aid will be passed by mac80211 using bss_conf.aid. Fix aid configuration in mt7615_mcu_wtbl_generic_tlv Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 610cfa918c7b..a19fb0cb7794 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -823,8 +823,11 @@ mt7615_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.25.1