Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp326416rwb; Thu, 1 Dec 2022 02:43:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Imxh4caxRjkpiPq4uY/q/dptE19y+7PSy32AIOACcSaXvjP9NLTMH4lji43aTilkmqgeT X-Received: by 2002:a17:906:bc86:b0:78d:8580:8e07 with SMTP id lv6-20020a170906bc8600b0078d85808e07mr10732584ejb.131.1669891403722; Thu, 01 Dec 2022 02:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669891403; cv=none; d=google.com; s=arc-20160816; b=e36ji7ROvO3TZHVT64FDCHmgh0I5sWTtLS7EmDp7XKzZeDa/t8pgyAmvoWUVIXVyOy pgkg4D5Sts4rZA4PxDNpty2mA33ryPkxV5PbkbVmetsJxRq4yi6fndhYMNG9vCpnQwOu cMe3MjBS/EkVvZoBXKnDHjw8Gf5FeH6R1YLpMDWjl5t1OK57uJe1NzagzSD4I1NJBXib IS2VsbGyAsfOSfsKmirXaohXdrMXqw3DAkTOtjOQ/TuXO0sJLjUYLRhM+7uVbfLi2E1V LkBTMkbvo7GrqpkHZWSKFCk9we7rn5eHIUnMW10Qwsp1H9/1bzixPxu7zrX6tQYFaSUz ltdA== 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=IcEiNeIHfhjQOz/UE8eyz9B4mtOnpXK5F0RGas0C0to=; b=zz+eBINY6EwS22oVtjxTUTVzH7SgnSNarrfelAZpWxwbP/GrtpNzREXtxoM2jBjrGT Rhxb5j15swOMFdmRxTa6lEDKK1ovIGs4urkbZ0rEV6JZjJIhC2UdBvPO4Vf3OGewJd+X eMVgTDo3rmyH2L39m6tkhuw3ThMaegsaJLKk73YjFY51hKKVy1P3T61cB5EfYKU68kZu J1JdtcjvaTNBcadPHsV/9IQ13trjwpq65XvYV7ccAp0Tts33SiybVzubn4LqWk2JVQz4 /GAzN4IvD6gk5DoVmGssNirg3ctLjGNeLNCBcewvo2+pdy1xbmk+rYzxU1lQtxtGvE1F 1YWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GShxMvi6; 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 f3-20020a50ee83000000b0046b9dc9bd27si3330790edr.157.2022.12.01.02.43.04; Thu, 01 Dec 2022 02:43:23 -0800 (PST) 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=GShxMvi6; 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 S230193AbiLAKjU (ORCPT + 68 others); Thu, 1 Dec 2022 05:39:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbiLAKjT (ORCPT ); Thu, 1 Dec 2022 05:39:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46FB88E5BB for ; Thu, 1 Dec 2022 02:39:19 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id D2AF361F72 for ; Thu, 1 Dec 2022 10:39:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93A74C433D7; Thu, 1 Dec 2022 10:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669891158; bh=6HpDL5+INCtBpEEy8dHsD96qaaRPVHYBzx/FxGGFGBA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GShxMvi6wsH6WZPhK1cDVmSP2184tK1y+0EXFrfZGpRErT+OfTWNK6yip4kn4xIfR T3spuPKNdbTTiPwgVVae9s2xy9PkCoe73UVq11V5xwvMVrNkctS4jUzF9ur7qwAxdW 9n0bR0WFQlsLxlusG27XnMQtfapdS3Mb5hKLGQKtASo6NE8Jj02RiLIr+A0nts69gp /HmoloTNQv69WFO213x6EpFheXlvHsqSkvQv6tunsBkIweinJ4+fvDH9VfKOZHAx/f 6CEm482EVEH/egY8WgcWMn9yKQqakejExU2NGt3nfCQBVCJvV//rAclOnaerC1URLq oWa5EBfr2QuOQ== From: Kalle Valo To: Shayne Chen Cc: Felix Fietkau , linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek Subject: Re: [PATCH 5/9] wifi: mt76: mt7996: add MAC support References: <20221122084554.9494-1-shayne.chen@mediatek.com> <20221122084554.9494-6-shayne.chen@mediatek.com> Date: Thu, 01 Dec 2022 12:39:07 +0200 In-Reply-To: <20221122084554.9494-6-shayne.chen@mediatek.com> (Shayne Chen's message of "Tue, 22 Nov 2022 16:45:50 +0800") Message-ID: <87zgc7mmr8.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 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 Shayne Chen writes: > (Split the big patch into smaller intermediate patches by functionality > for easier review. Refer to the cover letter for more info.) > > Signed-off-by: Shayne Chen [...] > +static void mt7996_mac_sta_poll(struct mt7996_dev *dev) > +{ > + static const u8 ac_to_tid[] = { > + [IEEE80211_AC_BE] = 0, > + [IEEE80211_AC_BK] = 1, > + [IEEE80211_AC_VI] = 4, > + [IEEE80211_AC_VO] = 6 > + }; > + struct ieee80211_sta *sta; > + struct mt7996_sta *msta; > + struct rate_info *rate; > + u32 tx_time[IEEE80211_NUM_ACS], rx_time[IEEE80211_NUM_ACS]; > + LIST_HEAD(sta_poll_list); > + int i; > + > + spin_lock_bh(&dev->sta_poll_lock); > + list_splice_init(&dev->sta_poll_list, &sta_poll_list); > + spin_unlock_bh(&dev->sta_poll_lock); > + > + rcu_read_lock(); > + > + while (true) { In upstream we have a preference that there's some kind of limit for loops, to avoid neverending loops. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches