Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp330785pxj; Tue, 1 Jun 2021 23:44:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2J55HAZ28jEzDZbRDcxMKlhyyIf7wHQk6puwts2xoR6Yw1EVO6ZFC4XiOlMcj+nKd2lRr X-Received: by 2002:a05:6808:b22:: with SMTP id t2mr2541771oij.67.1622616259478; Tue, 01 Jun 2021 23:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622616259; cv=none; d=google.com; s=arc-20160816; b=SnMYE733ECWsZH4fwLvH/XZ89I+7OWe2UZl3hi9LA0fxycQHfTSUGBPVq0QKSUDouG 1SkN7FDYmElSmMbZJBds0Nh/M5ccWZRWzAmx3iSdCvMTJRZOj/ZHwrTQjf7M4yc9YIYi mH0FX5wYMumMGhzpUvLeldAiw6jMVRNMptBOEQ4l1drX6aeshu/tA13/t6OFN11JiXzI Mn5V/cEY9gC9zuEyoIEminUXF5w5UqvAAygp9cuoSsIRtzj4CJ27PgEzwFVmDrEANp2T BWefV5Ej+Oz/fChMpEGe4H6P1g3SLskdrgaIEV9UdNATVCB9UYVHnlP+KIT3m4/m/6vF iFOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=lN8/WHahPS6Oiuz3dBMVM7+Nsxw5i+AV4hZOC9FGpq4=; b=PC8UL54eAwNU4VuICGesqaljePjJA7Ewl0ZkxyzIL55bEpypYE5Lfxq5z2eS3cgz/T eZaGP9lsJA+veD4iEczKA06tyR7HLjiBvkbOF4EGzUVufv5v04R3zqXgAfm7BoVev/C/ J8WtWK6F+vCGvVp2OFxz1x2OL4BFDjAgQy4s0puc/LsMfm8oFQjv2FCfkVa1f4Pv6aze OjGK998Xyz61l4LXvii+hNURFQjl2Q3fixDf26v7sOLSfF+siW9snHT/uiMvYMRQrdz9 2nOh4eS1EUxecm5kdsr/bupY1TMtCHD5EhpcNVqmQOnSYMeiA8Sb++XubybL0TxYsxST lq0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R26yzoy+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si19502222iow.99.2021.06.01.23.44.06; Tue, 01 Jun 2021 23:44:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R26yzoy+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230320AbhFBGBb (ORCPT + 99 others); Wed, 2 Jun 2021 02:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhFBGB3 (ORCPT ); Wed, 2 Jun 2021 02:01:29 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF41C061574 for ; Tue, 1 Jun 2021 22:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lN8/WHahPS6Oiuz3dBMVM7+Nsxw5i+AV4hZOC9FGpq4=; b=R26yzoy+oQb5oBSs57uUL8LDQq 5sZIFKYWdxFE2xroyQfisxed/IzDiw25CTCS+F38p0AisNn8yCXtSViAGMQ87kn5aecbJcc3swjcM EGjyxXGkgTp4B0nc5Wiqfh75Cq86y7eDWWIojhdvhxjUhzl/+VvaY9p3CnvMRudlcFPA=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1loJum-0002lU-S7; Wed, 02 Jun 2021 07:59:40 +0200 Subject: Re: [PATCH v2 1/3] mt76: connac: add mt76_connac_mcu_update_sta_cmd support To: sean.wang@mediatek.com, lorenzo.bianconi@redhat.com Cc: Soul.Huang@mediatek.com, YN.Chen@mediatek.com, Leon.Yen@mediatek.com, Eric-SY.Chang@mediatek.com, Deren.Wu@mediatek.com, km.lin@mediatek.com, robin.chiu@mediatek.com, ch.yeh@mediatek.com, posh.sun@mediatek.com, Eric.Liang@mediatek.com, Stella.Chang@mediatek.com, jemele@google.com, yenlinlai@google.com, linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: From: Felix Fietkau Message-ID: <6ddea8d1-551d-5a58-267c-506d22cc932f@nbd.name> Date: Wed, 2 Jun 2021 07:59:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-06-02 07:24, sean.wang@mediatek.com wrote: > From: Sean Wang > > Add mt76_connac_mcu_update_sta_cmd support that is the prerequisite patch > for we are able to update the station record with the current state the > station has into the offload firmware at runtime. > > Signed-off-by: Sean Wang > --- > v1->v2: no change > --- > .../net/wireless/mediatek/mt76/mt7615/mcu.c | 6 ++-- > .../wireless/mediatek/mt76/mt76_connac_mcu.c | 32 ++++++++++++++----- > .../wireless/mediatek/mt76/mt76_connac_mcu.h | 16 ++++++++-- > .../net/wireless/mediatek/mt76/mt7921/main.c | 8 +++-- > .../net/wireless/mediatek/mt76/mt7921/mcu.c | 3 +- > .../wireless/mediatek/mt76/mt7921/mt7921.h | 2 +- > 6 files changed, 50 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > index d64b8058b744..6666507f43ed 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h > @@ -902,6 +902,14 @@ struct mt76_connac_suspend_tlv { > u8 pad[5]; > } __packed; > > + /* 0: state 1 - unauthenticated & unassociated > + * 1: state 2 - authenticated & unassociated > + * 2: state 3 - authenticated & associated > + */ > +#define MT76_STA_INFO_STATE_1 0 > +#define MT76_STA_INFO_STATE_2 1 > +#define MT76_STA_INFO_STATE_3 2 Please turn this into an enum: enum mt76_sta_info_state { MT76_STA_INFO_STATE_NONE, MT76_STA_INFO_STATE_AUTH, MT76_STA_INFO_STATE_ASSOC }; The _1 _2 _3 suffixes are not that readable and add extra confusion by not matching the numeric values. - Felix