Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp4111703rwp; Sat, 15 Jul 2023 17:16:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlF53fetN1DTWLhWD3MwMkb+5AyQ6uWROwkZZQtyiwGI32SwyR2Zh0NZjXT4mAOM/tBjnJtI X-Received: by 2002:a05:6a00:1353:b0:682:537f:2cb8 with SMTP id k19-20020a056a00135300b00682537f2cb8mr11072128pfu.26.1689466570467; Sat, 15 Jul 2023 17:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689466570; cv=none; d=google.com; s=arc-20160816; b=PGajREopy8AE9Pwcbk/LRhdFri0YTYz6XDjF2nUZ1C0TR56hv73kgPEF33wiNQ7Jeg ePl9vzNqT5kbhse2A3WIyvwCqz5dwgAgfBHNknHp0rhAGx6qTcQKnWP2WAnCF4X/17DB L0xMvdlrS6EXyAPG1/stYpHai51NfC8n2Uz2yihv/deLHsL8b51MqTLLu1jKUUydZnMv Ica8MBPOrmf64B9U/lk+2v7FjCL9PsomjfsizT7Mop+GvkCduk3SFMhXjlESUxs/9PMs BkYfYp6/tLmyMeMQpxCFr7cEg61tn0wx2QqCHc8gW+hf4xqhJNWKoFzNLkXvmw4cFBdV OdxQ== 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:organization :from:references:cc:to:subject:dkim-signature:dkim-filter; bh=G5Jg4rvpcT5DoPPVCMvjOkVy5CqFoEc8YqYRUkRPwT4=; fh=i92ke36S/JkOyxYt2GEoRPcHYxNZ+MC1hyK90nFec5s=; b=AYeCLevEZjyommqb/KnVgrGHWUskPs342xxAqiv1F4KXqiLgv7pBNbuDYgi7lcPmgY 42zYTstl6XQEdlEdd+cynV522bxG9lrdHwR80RgjU0juMwDdHgnVWqo1xyF3AhqMuwtQ /7zpq9NTehYJqTqllQo+Bwxm6qGfqxXzL+33FJapWLZdTtLgmDtvs2139QkNVuyeKNul FQ2CLU58fTJG0Jky+dEKhru/GRtBXWFBrfie2f9i8xXL3d9EZn+slrpM8zs0XO69rMqt LbUT5ipyLm3+8msx5D/jxte+jrEIPhSl24HZo0N2r2xzP6lyONUb9DOsa5P8HLnZUF8g dCBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=piNXzXWr; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a056a00089400b00666b8536d8asi9769915pfj.305.2023.07.15.17.15.56; Sat, 15 Jul 2023 17:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@candelatech.com header.s=default header.b=piNXzXWr; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbjGPAAe (ORCPT + 60 others); Sat, 15 Jul 2023 20:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjGPAAd (ORCPT ); Sat, 15 Jul 2023 20:00:33 -0400 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B0D2118 for ; Sat, 15 Jul 2023 17:00:32 -0700 (PDT) X-Virus-Scanned: Proofpoint Essentials engine Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 64FD0340061; Sun, 16 Jul 2023 00:00:30 +0000 (UTC) Received: from [192.168.1.115] (unknown [98.97.112.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id F3FBB13C2B0; Sat, 15 Jul 2023 17:00:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com F3FBB13C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1689465629; bh=fEiPZ3FMcQFglGMn2iejpQZqWwaKcd+hEleVApCk4lM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=piNXzXWrgjI18l6uD3Pi2xEK7etpXTfjnzwDL1J1XhHIUrw0RmL0Dz2lsdXGLwNwG mBXT8ydYTti+p0yIJGZDeQoClX/45JG0kLWRYszDqlA1EEag+6bLp3y+EgFSA4IEge 7BfiYxC/vTIBjSfrqwHM/sBsQ/HZVGI55nLKv/Lo= Subject: Re: [PATCH 1/3] wifi: mt76: mt7915: move mib_stats structure in mt76.h To: Lorenzo Bianconi Cc: Lorenzo Bianconi , nbd@nbd.name, linux-wireless@vger.kernel.org References: <486cb426-737e-fa57-20da-344fc44bb4de@candelatech.com> From: Ben Greear Organization: Candela Technologies Message-ID: Date: Sat, 15 Jul 2023 17:00:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-MW Content-Transfer-Encoding: 7bit X-MDID: 1689465631-6GqKUXb52O1b X-MDID-O: us5;ut7;1689465631;6GqKUXb52O1b;;0a45d51dfbd39c7bb3fe23128efe5de6 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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-wireless@vger.kernel.org On 7/15/23 4:54 AM, Lorenzo Bianconi wrote: >> On 5/12/23 15:29, Lorenzo Bianconi wrote: >>> mib_stats structure is shared by mostly all chipsets. Move it to shared >>> code. >> >> In case this thing hasn't been pushed upstream yet, then a suggestion: >> >> Create a struct mt76_mib_stats_common class that has the common counters, >> and then per-driver can have that struct as first member of its mib stats. >> >> I have added a lot of per-driver stats that never made it upstream >> and are not fully shared across different drivers. > > I would say mt76_mib_stats is quite a general name. I think we can do somothing > like (if it is really necessary): > > struct mt7915_mib_stats { > struct mt76_mib_stats mt76; > ... > }; Maybe: struct mt7915_mib_stats { struct mt76_mib_stats common; ... }; I also noticed that Ryder added a few of my patches that extended the stats, so I think there are probably a lot of stats in that struct that are not set on the 7921 driver and probably older drivers too. To me, unset stats are confusing, so I'd prefer to put stats that are mostly common in a common struct, and have per-driver stats just found in the driver itself. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com