Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1520020rdd; Thu, 11 Jan 2024 01:23:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVw8zVRRshd/1tQG/bVKxCtwfacTuVQ3H3xPMmoktdDjE3YuVMOLsgSAOPDey6v/ARh5eL X-Received: by 2002:a05:6214:4113:b0:680:c80b:7acf with SMTP id kc19-20020a056214411300b00680c80b7acfmr1004591qvb.86.1704965024688; Thu, 11 Jan 2024 01:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704965024; cv=none; d=google.com; s=arc-20160816; b=mhS0fcYAuJtrEwsiWY9h5p2Pxh66hdv2L42aS84teG4NC4nWugyGictfJrr+C17JoL KP297SgQDQFloP+2iKHVCPi96YI99Hk4TGawkFeeixLBDiKLoiOuJaxnHI5jV1gHbX5G UaSorg/kv96sytRMR+mC7HJXnntzwotNiCsAcPLUCIkzNzhU+ZWft+rMPnGj+f19SKJG RFTMZZAZWbnZIOk2t/8kpp4nkVrhblMsr0JLFc0Q3/t/NW6PW/jtEpw44DiiRwxjJDdr 3x6QY81P30sOsKdWwyX+c2+c053muV4/aEzn5UweR876PIcyZaJRs8dAU4EGuIiGMXpL 0UIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature :dkim-signature:message-id; bh=l+3pe2xjf0v67zJLczdI2/SCnnxVdkH2AKbVv4woPaI=; fh=B8o+z0BrKEPgpj9MKmYUFYnGwr+ws6ED0wqC2zV4cSs=; b=McuBNrGX5NHzHMyiIoRHSNjGos1EzNzW94W46wJW7vusyOZbjvCDyUqW4289mNojAm qIWc+oEjP9WY9duVsW3iqXQsUxuxxsQl0/8PeTdSlK6pRlEmik2ysNnxOY/8wb07fwkQ gsbE7CysvDtMRH5GGNWHMtmObJDdIH0pJ2SX4n7DnAHJKdE4ACmk4C3ssC3pJCvm9c+t GDj7JajbUgp8C805xNtzHIckjDxtDYij9x5VV33VD1pMgLgH59BPmHm6tXUVJslePKhs CZtCiVKg0nuSokitaYsXjTRAsf6BA7Jj4WHPFuvEWPajqeZVaTR5VrkG4+oSxS6jkafZ Tn9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e1Rk4M+P; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i25-20020a0cab59000000b0067f9c419238si427841qvb.34.2024.01.11.01.23.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 01:23:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e1Rk4M+P; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 6188C1C23A51 for ; Thu, 11 Jan 2024 09:23:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B765112E4B; Thu, 11 Jan 2024 09:23:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e1Rk4M+P"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WITZKnaM" X-Original-To: linux-wireless@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 1905912E47 for ; Thu, 11 Jan 2024 09:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1704965011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l+3pe2xjf0v67zJLczdI2/SCnnxVdkH2AKbVv4woPaI=; b=e1Rk4M+PEOB5ic03awNYyDlSx+nP7UbvzR2JaX82bBrudMDikzp7uvpcDp99Y5xKf+zOzM lQUOa/gcgIgC3c9/yl2ZOI9VWrky35VQyb+tJS/D1dB9prmWcZDt9NUEKKArgt9VHrd1Ud svW7NSUNvwFNaKnVB5tmcMdmvjXAFtoZAr3DhrfJ0BNaSyiMxdQtI+dstxLDSUwdnIZUgt tWmqn0mCxxImJGMY2KToFqe85c4KQ+s1TL7COYbr7b2P00KlrFPuzHL+0QsnYlDloPFJ4M meoEMSB++Ze0adrqG8hkRyyCU9vamivVbRFn2+GHx19wdK1cjIWhkleQ/AeaCQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704965011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l+3pe2xjf0v67zJLczdI2/SCnnxVdkH2AKbVv4woPaI=; b=WITZKnaMwsvb8ipQeZtCfOLzkL+Ss/lBkLoDZQn4sPW5GWonxaqsWR4Kgv6iVubt+BAE2E YEtBuxvCaT4zIhCw== Date: Thu, 11 Jan 2024 10:23:31 +0100 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] wifi: rtl8xxxu: enable channel switch support Content-Language: de-DE To: Ping-Ke Shih , "linux-wireless@vger.kernel.org" Cc: Jes Sorensen , Kalle Valo , Bitterblue Smith , Sebastian Andrzej Siewior References: <20240110103909.240514-1-martin.kaistra@linutronix.de> From: Martin Kaistra In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 11.01.24 um 02:21 schrieb Ping-Ke Shih: > > >> -----Original Message----- >> From: Martin Kaistra >> Sent: Wednesday, January 10, 2024 6:39 PM >> To: linux-wireless@vger.kernel.org >> Cc: Jes Sorensen ; Kalle Valo ; Ping-Ke Shih >> ; Bitterblue Smith ; Sebastian Andrzej Siewior >> >> Subject: [PATCH v2] wifi: rtl8xxxu: enable channel switch support >> >> The CSA countdown in the beacon frames, which are sent out by firmware, >> needs to get updated by the driver. To achieve this, convert >> update_beacon_work to delayed_work and schedule it with the beacon >> interval in case CSA is active and the countdown is not complete. >> >> Signed-off-by: Martin Kaistra >> --- >> changes v1->v2: use delayed_work instead of usleep_range >> v1: https://lore.kernel.org/linux-wireless/20240108111103.121378-1-martin.kaistra@linutronix.de/ >> .../net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +- >> .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 18 ++++++++++++++---- >> 2 files changed, 15 insertions(+), 5 deletions(-) >> > > [...] > >> @@ -7764,7 +7772,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface, >> spin_lock_init(&priv->rx_urb_lock); >> INIT_WORK(&priv->rx_urb_wq, rtl8xxxu_rx_urb_work); >> INIT_DELAYED_WORK(&priv->ra_watchdog, rtl8xxxu_watchdog_callback); >> - INIT_WORK(&priv->update_beacon_work, rtl8xxxu_update_beacon_work_callback); >> + INIT_DELAYED_WORK(&priv->update_beacon_work, rtl8xxxu_update_beacon_work_callback); > > It seems like we missed cancel priv->update_beacon_work work at rtl8xxxu_stop(). > Because that isn't introduced by this patch, you can decide to do it in this > patch or not. Also, 'struct work_struct c2hcmd_work;' has similar problem. Makes sense to me, I will add cancel_delayed_work_sync() for a v3 of this patch. Should I send a second patch for cancelling c2hcmd_work? > > This could be a problem theoretically, but not easy to see the problem though. > > >> skb_queue_head_init(&priv->c2hcmd_queue); >> >> usb_set_intfdata(interface, hw); > > [...] >