Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3837131rwe; Mon, 29 Aug 2022 22:27:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/sTh9zZl7MZlNZY+WHdqQf7Fj9boB2tXjw/u+MjNdvH+3ylm5/elcLzzn3W00fp3T/ji4 X-Received: by 2002:a17:902:e98c:b0:174:4f67:890a with SMTP id f12-20020a170902e98c00b001744f67890amr16466162plb.44.1661837270254; Mon, 29 Aug 2022 22:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661837270; cv=none; d=google.com; s=arc-20160816; b=ipMxin1wpVVaxYirwt7rN70DnKeCDR2mtRPqd0sqVCu8CZxLHObxHZW2lkPbDK0A7R wF3hechGdcyvXn3Rx0iIieH+edxYhSF9zKjIPRImT10CAtgKTuqt2BWetSJhDxfmPZOc NdwguKtOjRbCabWBaS4z1+5ghnpM/OR0GCPnDGNoGD39RHaJ1pQv2TtjjvGuagVJV/rR SdQMHcfN/8AOq+Em8+ccEnwEGTSZMnglFIxLQxah959UqSeL0IPzFg27/WiEHFKlYhzP f0ocsZzpJsGQppTjuWtdrTDSJaSRikPVMUH58sAjFDEySq+N8NKJaZO2+pmTiBQdY4Dr 7TYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=1y0Wan8DXpf1HBrvVHFVpfKrieKbNPugv7wSN4JiZbE=; b=tLa7DZVE+PjL+QqH3f4UPN8GCC7gLmqA1oZG1KQQeeQWGYhsncWfeIGkt3+iIybdpF 0gxo28k3dhpCT3QyTT+/BgMjfq4CXHR598Ej61G4M/+TrABvXhfmlgMHJxnZRKhn0/Am Q4UGoaC95SWHjYRN7Bnig24GnXrV4wETSjFHRgMs9AiqS5hqMQK0p31ecpFTZG8w0VjW cVB06+hw3jIoGgQ6CHXHouZ+t4kPkKXSXY+XsyCGkysoFOfke33uTvPei22uYV08D2Ul +BcQbbGfgb45rsdtx6+YtduGGKogpt1g15dVzRhHNXjmi7P0IBSisdPcgmfhk6lAPEby yO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="uE/1lkRX"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a17090a854700b001f23cb884b8si10102545pjw.57.2022.08.29.22.27.38; Mon, 29 Aug 2022 22:27:50 -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=@kernel.org header.s=k20201202 header.b="uE/1lkRX"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbiH3FSb (ORCPT + 64 others); Tue, 30 Aug 2022 01:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiH3FSa (ORCPT ); Tue, 30 Aug 2022 01:18:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE0629E10B for ; Mon, 29 Aug 2022 22:18:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8C860B811B2 for ; Tue, 30 Aug 2022 05:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 777AEC433C1; Tue, 30 Aug 2022 05:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661836707; bh=nCbPAjIAPqJ/YO8bszJdZw+GFvqrBlsOPZLW1wkqTSM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=uE/1lkRXGNRVgC7IHZgu3JOGUEIOSiKMlKQftKurS/ae1KYsL4ANQU7EZV4vyImFt rtdZfh1NXQ3s7YgeJW2R6wXuH7D41GqpQk1HctTPUVszryY0IGkwm/DZUTQxwbPWc0 tWsZh0qVCNT+aZns3puUaZyyfy+dvBRwVCreaDQrrzTey3CXVDhbEUvlrnMbmCSJoR 4/KVp2pzYpfiVlCUPp6x54KeB34cuFBUU501RK1/M63YU91PpcDbO+QsS9LGFrMMtp PVkMp4f2wGJaoEDnYvW9d26qv1urcUC7CrCaRLtPUlajnjmbVc6Tf6PuA3PRQgnEyh 69V9N37Evb3nA== From: Kalle Valo To: Sean Wang Cc: Lorenzo Bianconi , =?utf-8?B?U2VhbiBXYW5nICjnjos=?= =?utf-8?B?5b+X5LqYKQ==?= , Felix Fietkau , lorenzo.bianconi@redhat.com, Soul.Huang@mediatek.com, YN.Chen@mediatek.com, Leon.Yen@mediatek.com, Eric-SY.Chang@mediatek.com, Deren Wu , km.lin@mediatek.com, jenhao.yang@mediatek.com, robin.chiu@mediatek.com, Eddie.Chen@mediatek.com, ch.yeh@mediatek.com, posh.sun@mediatek.com, ted.huang@mediatek.com, Stella.Chang@mediatek.com, Tom.Chou@mediatek.com, steve.lee@mediatek.com, jsiuda@google.com, frankgor@google.com, kuabhs@google.com, druth@google.com, abhishekpandit@google.com, shawnku@google.com, linux-wireless@vger.kernel.org, "moderated list\:ARM\/Mediatek SoC support" Subject: Re: [PATCH 8/9] wifi: mt76: mt7921: introduce remain_on_channel support References: Date: Tue, 30 Aug 2022 08:18:19 +0300 In-Reply-To: (Sean Wang's message of "Wed, 24 Aug 2022 17:10:59 -0700") Message-ID: <87k06qfgx0.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Sean Wang writes: >> > > > +static int mt7921_check_offload_capability(struct mt7921_dev *dev) >> > > > +{ >> > > > + struct ieee80211_hw *hw = mt76_hw(dev); >> > > > + int year, mon, day, hour, min, sec; >> > > > + struct wiphy *wiphy = hw->wiphy; >> > > > + bool fw_can_roc = false; >> > > > + int ret; >> > > > + >> > > > + ret = sscanf(dev->mt76.hw->wiphy->fw_version + 11, "%4d%2d%2d%2d%2d%2d", >> > > > + &year, &mon, &day, &hour, &min, &sec); >> > > >> > > does the fw have a differnt base version with respect to the previous ones? >> > > checking the date is a bit ugly. >> > >> > I admitted that way was a bit ugly, but I have investigated for a >> > while, and that is the only way we can use to distinguish the version >> > in current mt7921 firmware. >> >> the fw seems pretty new (2022/7/15), is it already available in linux-firmware >> git tree? If not I guess you can increment fw version in a more evident way. >> For the future please remember to do it for major fw changes. > > The new FW is not released in linux-firmware. I will try to figure out > a better way to recognize the FW can support the feature and add it in > v2. It would be a lot better and more future proof to use some kind feature advertising instead of guessing from a firmware version. For example, ath11k uses WMI service bits and other upstream drivers have something similar. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches