Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1216906rdb; Fri, 16 Feb 2024 08:36:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUooI5UP3oFbsQ79/8HTE/EnP1QitwBG47twEEI8xaLiv2MPaAStKzGAkJjrDCmRSBw9clTdXeM7ShLHmruB3LgKayw2Zkb8YbB7vtKAg== X-Google-Smtp-Source: AGHT+IGrwi5K1TpdUjRbrwLSeQsNCW3hlnvQBVftc0kJYBpg3kaVk4V6yvnaikuOFb/fxMWrU861 X-Received: by 2002:ac8:5882:0:b0:42d:e341:2af9 with SMTP id t2-20020ac85882000000b0042de3412af9mr2525656qta.21.1708101380832; Fri, 16 Feb 2024 08:36:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708101380; cv=pass; d=google.com; s=arc-20160816; b=ejnTJbbc5ZdWsw25KddrW2QbTvoyCpR41TCvEFz+5vdZffgsuCmKt55vvTJ93GUqbQ aoM91rFFdCPajsAaSMUQAzv8xue0waNsu1jHWyURpMRq8XIX23pBv8Y9ZjNdVdv705Mm s6n073f+4oVVKGJhX0VIQCPau+DD1NyQzl49ACIhC6rBKXv9XJBWScTvx8fWG32bf2jw IBWIBdC8rT0E0a6uilbX2nXqa7CW4sr6dS47Q62Kr1q7aFLInxa7oInM4c1+7+uwYKRb 2Iv/HVwSePSOlMK4tB74aJGFAJByGjjblbP13ecXxVy15OwXDePJrSB6gpGF+fbf7Utr uQug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=eWu9L5P0abMC4nkKScKKrgJkGxTQ5fQAm3MZv711kgo=; fh=UwiveEDT97qzK6QvPbFFxRVsvPQBKbZ5Ty8bgHaqpgM=; b=gwb4Ujqnu2vCMyKFn6w/Ki0LjSs8XonYSXSy6m+VWQLP6cQwQgDIP+UPoCIokPtoDi 3Z0cmBK3mlmxBUOFDln12JAH7AnBqUAPnXV3RZP5bZJ6w9FU9UvuUAVAFhz/ALmw83qb 53+g6Ana6HiKwITLmiIUqV+xY8bDXHRs0sSym/hHfT++0+I9dpfmiDEwrHcAWOdSq7/I tOJpAJ8tt07BlSOh4FxZPYEHxnu9A2A5ECDrk+lZBnGwJ/Slmz/lhMGWL/QeDMO/8tcZ wWolsmtnxFjhVk3daoyqU5OkpzP8QKCZsXiv7Z42u0TeeX8XBitY4oVWhzxZHn1D5LIq ckhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YUpmOZ9I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a18-20020ac85b92000000b0042c75a66b95si164124qta.799.2024.02.16.08.36.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 08:36:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YUpmOZ9I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3686-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3686-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4EC201C22565 for ; Fri, 16 Feb 2024 16:35:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4231112FB20; Fri, 16 Feb 2024 16:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YUpmOZ9I" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E73E12FB1E for ; Fri, 16 Feb 2024 16:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708101345; cv=none; b=N/h3fYfM1N5zynD157OXixHJuzH1wJQY6zoD89i3hVmCvCYCa9n0Cn07X7cmOJwGGg55iImFl1+MQ4+PV/1hZzesDH962yIkfF7eKbnHlD5d8HJwqbQknVh2uACxmxRlz1Y6mDvN2K++TlaEeBu6p5bTkUA/e0UHzaPYVGMPgOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708101345; c=relaxed/simple; bh=Ln8SvTSKUBvAst/PdaGwGh7GdSDxPCTOFBToh/EUHKU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=NEj63gFKlwQrhHIjkty5fJRsuVeo+qLVwaoicp1uiCv06xvxWVbfeEXMgezExXajiv1q55Z+npWnAlM8rASkXwoWPVMmEiktbiJcvuq085pMFaacvVPClTg12/TaaEUIFitzjKuL38vxq4KdDGwL0eGu0T0KxJCCmf2e1tkZxOU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YUpmOZ9I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C561C433C7; Fri, 16 Feb 2024 16:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708101344; bh=Ln8SvTSKUBvAst/PdaGwGh7GdSDxPCTOFBToh/EUHKU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YUpmOZ9I0aLwJcrYutr+JPvg/qE+8Y+Msy6FvdjxUX133kIQQCavXVwJV4xuSYzSt OBahGWxivh0b3PVDpGHQ+abXaRDW71xGgqqZ5aAoixRVDsDgqssa4M5onDbQyyXxLm mXqGIrKvZJSSFJk/FNFZI/cl+HfqKj9vLxCjEijEVgxi9SCOb7oCHSqHWuSotNajJz gdiM49diHqL3sT6ChuBS+374wHeLFhteeEgeJR31RCoguDKLT6P6qAp5dpS3e8l/wB DPEqEVTcc57NIWAM8qigHg8Fd0KCKFJL0xBGgAJVuU0/N8Ijts3WOqeRsFyEYNqauz MWWkD9J8z7jwg== From: Kalle Valo To: Rameshkumar Sundaram Cc: , , Sriram R Subject: Re: [PATCH v2 03/12] wifi: ath12k: modify ath12k mac start/stop ops for single wiphy References: <20240206091954.4144454-1-quic_ramess@quicinc.com> <20240206091954.4144454-4-quic_ramess@quicinc.com> Date: Fri, 16 Feb 2024 18:35:41 +0200 In-Reply-To: <20240206091954.4144454-4-quic_ramess@quicinc.com> (Rameshkumar Sundaram's message of "Tue, 6 Feb 2024 14:49:45 +0530") Message-ID: <8734tsnz8i.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Rameshkumar Sundaram writes: > From: Sriram R > > When mac80211 does drv start/stop, apply the state change > for all the radios within the wiphy in ath12k. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Sriram R > Signed-off-by: Rameshkumar Sundaram I haven't reviewed the patchset fully yet, first quick impressions: > +static void ath12k_drain_tx(struct ath12k_hw *ah) > +{ > + int i; > + struct ath12k *ar; We usually try to have reverse xmas style, of course not always possible but here it is. > + ar = ah->radio; > + > + for (i = 0; i < ah->num_radio; i++) { > + ath12k_mac_drain_tx(ar); > + ar++; > + } > +} Please avoid pointer arithmetic (in this case 'ar++') as much as possible, it's just so easy to shoot yourself in the foot. In patch 1 you add ath12k_ah_to_ar(), why not use it? And I see this pattern quite a lot, should we have ath12k_for_each_radio() or something like that? Or did I see that macro in some patch already? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches