Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2778805pxb; Mon, 19 Apr 2021 13:47:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh/YlYPzMEX3fy4PFcUpzyUagyR3A2qVm6bvtmt7J/RLIQVTYxhTk9mID0KWX8OyzdUJp2 X-Received: by 2002:a17:90a:2847:: with SMTP id p7mr1055184pjf.1.1618865240425; Mon, 19 Apr 2021 13:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618865240; cv=none; d=google.com; s=arc-20160816; b=WedrNUexkvNpn/C8/dZ/W8Z8hnoG6Ak5a202JgWYhiCxZKAsaHNgpL1MoEUS2KWbe+ MOofklxDa+DZWqJ0ogyt3H5X6jxY5G1Ow9nh/ryGDV84V+VxzEwZYgowci0ror8xliID 2SLH6fNnZP2Be6VMX6NgPvxF4WZv2vYH/UVJxm4DieBnXDdo3SJ0b52J5QO9nlAl+RCO V8On41d+sF9p3cDZygJ1eUivgHSTOknfGpGcfsYTkmnNiXPAB6hg/ya88x34zc67s43w LgHWaDAD2bEaqMaaxXN9EKNghhBeiKF0n78n4KtzFNHAmmi9Nv/nHIEbNROyvoK1s0AF h/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=o4xltc7kNorfWfawnX4J5GtnAuRCsg5Q6q7/kJuYq+M=; b=ghdtPpI4FIEktUWMZSzH3Ds8arCqy9CYGmtSyLaQOA5Md+BGjsPeu71Io/vVSkbTj0 OMXiKG9Nlv7ry801aPHeVU+IOIhRqYuKIkJ/fzKKpk/9Ke3FUwuOIPwZjjiLZwszt3KU Qj9/Ehfb0uK5WC11zgFGmwnRP6gOVLDYy4XkPfftsmiKDJssNiNwy0GRQE0L7XPkrB4S FLB4A2H3PowM6MZajpydikQ7tH2U7D8jDPiXlg6JI4jl/qLzQL+oM7ZpKDV3ZxMKehRd FkL+RBx+Ktx5gacifpLRcHldQK/joOcn4h4xhMsvmdoxdHqjRqzb8WPZbKu9nDDdP9tY Pgww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si676034pjo.69.2021.04.19.13.47.07; Mon, 19 Apr 2021 13:47:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241688AbhDST0b (ORCPT + 99 others); Mon, 19 Apr 2021 15:26:31 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:48636 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbhDST0b (ORCPT ); Mon, 19 Apr 2021 15:26:31 -0400 Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.93.0.4) (envelope-from ) id 1lYZWp-0001It-Nq; Mon, 19 Apr 2021 21:25:51 +0200 To: Pkshih Cc: "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "johannes@sipsolutions.net" , "kvalo@codeaurora.org" , Larry Finger References: <846f6166-c570-01fc-6bbc-3e3b44e51327@maciej.szmigiero.name> <87r1jnohq6.fsf@codeaurora.org> <8e0434eb-d15f-065d-2ba7-b50c67877112@maciej.szmigiero.name> <1617763692.9857.7.camel@realtek.com> <1dc7e487-b97b-8584-47f7-37f3385c7bf9@lwfinger.net> <15737dcf-95ac-1ce6-a681-94ff5db968e4@maciej.szmigiero.name> <220c4fe4-c9e1-347a-8cef-cd91d31c56df@maciej.szmigiero.name> <35249c6028f645a79c4186c9689ba8aa@realtek.com> <52f89f4f-568e-f04e-5c3e-e31f4a9e0910@lwfinger.net> <56d52ee8681a43aaa20924c5fa047bf0@realtek.com> From: "Maciej S. Szmigiero" Subject: Re: rtlwifi/rtl8192cu AP mode broken with PS STA Message-ID: <584036ac-f3d7-f6a1-3f4a-136c7af10b5a@maciej.szmigiero.name> Date: Mon, 19 Apr 2021 21:25:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <56d52ee8681a43aaa20924c5fa047bf0@realtek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.04.2021 09:04, Pkshih wrote: > >> -----Original Message----- >> From: Larry Finger [mailto:larry.finger@gmail.com] On Behalf Of Larry Finger >> Sent: Monday, April 19, 2021 9:23 AM >> To: Pkshih; Maciej S. Szmigiero >> Cc: linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; >> johannes@sipsolutions.net; kvalo@codeaurora.org >> Subject: Re: rtlwifi/rtl8192cu AP mode broken with PS STA >> >> On 4/18/21 7:32 PM, Pkshih wrote: >>> >>>> -----Original Message----- >>>> From: Maciej S. Szmigiero [mailto:mail@maciej.szmigiero.name] >>>> Sent: Sunday, April 18, 2021 2:08 AM >>>> To: Pkshih >>>> Cc: linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; >>>> johannes@sipsolutions.net; kvalo@codeaurora.org; Larry Finger >>>> Subject: Re: rtlwifi/rtl8192cu AP mode broken with PS STA >>>> >>>> On 08.04.2021 21:04, Maciej S. Szmigiero wrote: >>>>> On 08.04.2021 06:42, Pkshih wrote: >>>>>>> -----Original Message----- >>>>>>> From: Maciej S. Szmigiero [mailto:mail@maciej.szmigiero.name] >>>>>>> Sent: Thursday, April 08, 2021 4:53 AM >>>>>>> To: Larry Finger; Pkshih >>>>>>> Cc: linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; >>>>>>> johannes@sipsolutions.net; kvalo@codeaurora.org >>>>>>> Subject: Re: rtlwifi/rtl8192cu AP mode broken with PS STA >>>>>>> >>>>> (...) >>>>>>>> Maceij, >>>>>>>> >>>>>>>> Does this patch fix the problem? >>>>>>> >>>>>>> The beacon seems to be updating now and STAs no longer get stuck in PS >>>>>>> mode. >>>>>>> Although sometimes (every 2-3 minutes with continuous 1s interval pings) >>>>>>> there is around 5s delay in updating the transmitted beacon - don't know >>>>>>> why, maybe the NIC hardware still has the old version in queue? >>>>>> >>>>>> Since USB device doesn't update every beacon, dtim_count isn't updated neither. >>>>>> It leads STA doesn't awake properly. Please try to fix dtim_period=1 in >>>>>> hostapd.conf, which tells STA awakes every beacon interval. >>>>> >>>>> The situation is the same with dtim_period=1. >>>>> >>>> (...) >>>> >>>> Ping-Ke, >>>> are you going to submit your set_tim() patch so at least the AP mode is >>>> usable with PS STAs or are you waiting for a solution to the delayed >>>> beacon update issue? >>>> >>> >>> I'm still trying to get a 8192cu, and then I can reproduce the symptom you >>> met. However, I'm busy now; maybe I have free time two weeks later. >>> >>> Do you think I submit the set_tim() patch with your Reported-by and Tested-by first? >> >> PK, >> >> I would say yes. Get the fix in as soon as possible. >> > > I have sent a patch that only 8192cu, which is the only one USB device supported by rtlwifi, > schedules a work to update beacon content to wifi card. > > https://lore.kernel.org/linux-wireless/20210419065956.6085-1-pkshih@realtek.com/T/#u Thanks, I have tested the patch and it seems to work as good as the previous one. It definitely improves things. However, it would be great to eventually fix the update delay issue, too. It looks to me like possibly just a missing beacon queue flush. > -- > Ping-Ke > Maciej