Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1607097pxb; Fri, 10 Sep 2021 09:32:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5u8nPj1whxZ4sDef7lUlzcGlqAKSRLkdB5dGxJXYZuTflqY/GUhef5v27w+GgqNwVeLb7 X-Received: by 2002:a05:6e02:1074:: with SMTP id q20mr7095540ilj.204.1631291532702; Fri, 10 Sep 2021 09:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631291532; cv=none; d=google.com; s=arc-20160816; b=OVJGpbB9UgiDW5ANy1dAy0jnG8xrSIN1hkwrBtv+dqUzrGZWjKa3gz5z5VfLhRsa17 iuyAMjHZ+P5i5azPvnNec4LqThB4S5pIQgf1kQmI/MBcb5AcRz9rCbWyw4rO9YuNGDZS 3CyFbIo/UlOyGueCUwZwahj+VomGW8BU6JhYH47iQcoe8n2w5e7oHhZdKhwm7VcANuRq EJyChWMl2EF3T0MGy1GwHZoVGQqT5gwUVdFxnoc3ADkBx7f9CCaJVaA057zYqCwke9Nf jjCqw9YszDtDFjcRRyToTRbryQpg9S1+zySvQ/GTk03HIP9xNj72cejJMneH3xeS9gTE CsZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ot1wSZknEFAuaHQCHHkAEUFlBeAHkhZrdgLFIvcXlmk=; b=u19DtPsx3GgVcSBpG3nBlcqfZngpWEkUE0kLaqvtHU0eI75in5aJm/Qu5oqawWtkgW 2S+4yNwad2Z37MT2EDj5jYrK9QBfmBlS5pXqbx3Ix2IwA7ZV7In0KnhT4ErZewV25whS tpavJX9HoFo8iNgytdMMWlewJC2RaWVRcM2FrGkXkvGNctbkCzniDJbH9f5OCm2mLOBs QIZv2/DOAUxu7g8mL7duzDlu5pP+FUQYiTm8YCLruA4m1TLozgx6xVi9lvmG4OnHk4Uz gCf+PNdbCcr0tV3xdp4FMOufKQkcTT0pqMc3Y3XHqkLapYg9LgvIQc/f4pmW9EEASnBJ Fu8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YQrbyos8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si5301910jaa.118.2021.09.10.09.31.36; Fri, 10 Sep 2021 09:32:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YQrbyos8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbhIJQcP (ORCPT + 99 others); Fri, 10 Sep 2021 12:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbhIJQcP (ORCPT ); Fri, 10 Sep 2021 12:32:15 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4B62C061756; Fri, 10 Sep 2021 09:31:03 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id h16so5167993lfk.10; Fri, 10 Sep 2021 09:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ot1wSZknEFAuaHQCHHkAEUFlBeAHkhZrdgLFIvcXlmk=; b=YQrbyos8oQHIQq79OeYPJpMki7YOoCkZuXxuwup0PtJKdXZmTeX2Ci7KCOEzz31nVA o8p+ItoM3f2yfB/8cH6Js/dPSNABYFBbfZJo6lfd5MLvvHXfJ7EFvAA+GE1xn/NCXsxj Z4TxCOgs8S4jGIQg34rKT+Qtf2hxKr5FOY1k3eM+h1ekEnkvN/1FdUVsUBEHHyC3XizW 1brftKIg0TGz3Ag5M6jVYtfWacjHW0llc/n5PqG+04po2N3/0ZG1Ho9T5msccZiHDhIG lncKCv8jljzHAbU1PNwS7i13AikiVRMCl8gtaahmUSd3zY2W/VQ9HSczX2wEFp7SVZ9l X1oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ot1wSZknEFAuaHQCHHkAEUFlBeAHkhZrdgLFIvcXlmk=; b=Q1aVieLXw0UQ6tb/G72dx3yVN1g3wMHejD7+t3Gm8YmIcmVdiVKMiGJo4bchSUJr/8 V+0w04o4FDp9GjXoH4EJxF+WKLMLjatm6h1vTWmOCQyLXShf93qnEZ07MbFiF59n7TZK Ndvf+0jO07SQUUoore2vxn1G/Y1og5wUjhJq9NYqi2522kwSXqp1KfNEirYayXV/HDuV u8BQbF7/l73MpqrIGNlDJLHT/L7YFX4pZaPADHR1/sW22tc7AbDHl9cC92B8YZ8Gq8jB vNr/ZsrquAczjspRrBfEoLqV0Q9o5aSbUjrVm/BUr87ez/AfVp2yu+GUIzJZ3AUXpX4f vubw== X-Gm-Message-State: AOAM5311lVZbSF5AFEGAmCZWm5Jqn1pjKf3C0lq4eBtO390H0399uinM JY8bI/hZXTUvLk/MVFha3As= X-Received: by 2002:a05:6512:687:: with SMTP id t7mr4310506lfe.399.1631291462283; Fri, 10 Sep 2021 09:31:02 -0700 (PDT) Received: from kari-VirtualBox ([31.132.12.44]) by smtp.gmail.com with ESMTPSA id c19sm640666ljn.75.2021.09.10.09.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 09:31:01 -0700 (PDT) Date: Fri, 10 Sep 2021 19:31:00 +0300 From: Kari Argillander To: Jerome Pouiller Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" Subject: Re: [PATCH 02/31] staging: wfx: do not send CAB while scanning Message-ID: <20210910163100.n6ltzn543f2mnggy@kari-VirtualBox> References: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> <20210910160504.1794332-3-Jerome.Pouiller@silabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210910160504.1794332-3-Jerome.Pouiller@silabs.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Sep 10, 2021 at 06:04:35PM +0200, Jerome Pouiller wrote: > From: J?r?me Pouiller > > During the scan requests, the Tx traffic is suspended. This lock is > shared by all the network interfaces. So, a scan request on one > interface will block the traffic on a second interface. This causes > trouble when the queued traffic contains CAB (Content After DTIM Beacon) > since this traffic cannot be delayed. > > It could be possible to make the lock local to each interface. But It > would only push the problem further. The device won't be able to send > the CAB before the end of the scan. > > So, this patch just ignore the DTIM indication when a scan is in > progress. The firmware will send another indication on the next DTIM and > this time the system will be able to send the traffic just behind the > beacon. > > The only drawback of this solution is that the stations connected to > the AP will wait for traffic after the DTIM for nothing. But since the > case is really rare it is not a big deal. > > Signed-off-by: J?r?me Pouiller > --- > drivers/staging/wfx/sta.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c > index a236e5bb6914..d901588237a4 100644 > --- a/drivers/staging/wfx/sta.c > +++ b/drivers/staging/wfx/sta.c > @@ -629,8 +629,18 @@ int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) > > void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) > { > + struct wfx_vif *wvif_it; > + > if (notify_cmd != STA_NOTIFY_AWAKE) > return; > + > + // Device won't be able to honor CAB if a scan is in progress on any > + // interface. Prefer to skip this DTIM and wait for the next one. In one patch you drop // comments but you introduce some of your self. > + wvif_it = NULL; > + while ((wvif_it = wvif_iterate(wvif->wdev, wvif_it)) != NULL) > + if (mutex_is_locked(&wvif_it->scan_lock)) > + return; > + > if (!wfx_tx_queues_has_cab(wvif) || wvif->after_dtim_tx_allowed) > dev_warn(wvif->wdev->dev, "incorrect sequence (%d CAB in queue)", > wfx_tx_queues_has_cab(wvif)); > -- > 2.33.0 >