From patchwork Tue Apr 21 14:31:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 215905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76929C54FCC for ; Tue, 21 Apr 2020 14:31:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4739D206D4 for ; Tue, 21 Apr 2020 14:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587479515; bh=QqWJv7OMMkKaFNz90O6BkmJQ8qdb36Zf81DIU/rO+AQ=; h=From:To:Cc:Subject:Date:List-ID:From; b=vbR/vihrszLESMSEXoa+liN5domMXNFJWEi9Lig07rTB7qHpRbEuj4gNCC11g3Oth 9bcwmZ5UjFnfIlCla6nt/eEhiYbuGl8Lf0SPq2ysWu2iHdP4r4gqJWrhxTrvD55/Ui WMJkO2JU6RpwB8IiXWLZFHr2mazgzKeoUG+DQYDs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728671AbgDUOby (ORCPT ); Tue, 21 Apr 2020 10:31:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:44928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgDUOby (ORCPT ); Tue, 21 Apr 2020 10:31:54 -0400 Received: from lore-desk-wlan.redhat.com (unknown [151.66.196.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7265206B8; Tue, 21 Apr 2020 14:31:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587479514; bh=QqWJv7OMMkKaFNz90O6BkmJQ8qdb36Zf81DIU/rO+AQ=; h=From:To:Cc:Subject:Date:From; b=Oi7m4uzUde2kI9dj9gLV4rBWp7d8NPP5zuopVMJP0TZEghOC0vXbo+2aUYmEPgh4p 3Q0d1zgECYYwrqEfx3xGwisYg+gJS8e/NenhIZg4JnGH4BR04zCDOWjslIGsBiQcUh SAOw6tMD2Mc2kWuTV8Cu7kqn3mKhafPtEoL8kENc= From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com, linux-mediatek@lists.infradead.org Subject: [PATCH] mt76: mt7615: fix aid configuration in mt7615_mcu_wtbl_generic_tlv Date: Tue, 21 Apr 2020 16:31:40 +0200 Message-Id: <169fea4c2ac578349c79ffc46df75a8b447f72d3.1587477244.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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 864973022014..672c708bc12c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -942,8 +942,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 {