From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFE4FC43217 for ; Thu, 1 Dec 2022 10:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbiLAKjU (ORCPT ); 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 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