Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3192709pxf; Sun, 28 Mar 2021 15:56:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/C+Jmx4I4EPKVpBDLU+yAfV8xEkfGqATQfwnpnOkn2U+8LW+u3fqWn9cGaTodfEz1SvA0 X-Received: by 2002:a05:6402:510b:: with SMTP id m11mr26212003edd.103.1616972204083; Sun, 28 Mar 2021 15:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616972204; cv=none; d=google.com; s=arc-20160816; b=xKSuGO+IBKLPtpFUDgKrB5wb7HHG25bnN0beRnaYXLBUrSL+GqHxi/o7bzuyQgF+gG KihTyXHYGREqBGbfQjPLjN6O66Gjn79ujNvxCbyBOpVxXTcup+4RqKBBS7ippMq7GR8p X0Qdxzx0eQhI4vvthMQwOFqRgEJSGUDMJ41SH+ZwqDC9iSm0/hn4jaXPjYKWXOyc1Os4 LwwrrJKh9V03EkNHRiLrH6pduVc8sDiiDNaQgm2lRs0DbNwPvjmcL7GSQi+Xkiqjqkpr AUSyneXxEgZlbER2muTAeusXNYh9dEAeDlvohNEtByJvBA7IHzM5wWW0PvgjsToT2SZU h5fA== 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 :mime-version:user-agent:date:message-id:subject:cc:to:from; bh=wpO1tjc4kJ035lFd3zopeXHc/pO/Zf925FSvDSU7jP4=; b=RlB+CpSlYXJO022qWs1xQ1b3OjuKFKsOy72y1mCDYMbmzuID3nDmd8dQhrh4SYsb9d VOnCkMxboElfwYgFV3J/qk8NXhn5avllzW/48r/XKDAgVcC/EmDZbBNfT6NaAGV5A1SQ 0MBvI5p9NSEb91pic20mtkFJ82LACz8Wzuxr1Y0n0cNvlIivtWIaRIomICxkIkgtWBAP /aWwYhPCz52Bbo/0GRPevuuf+H+IQ3JGK8iqQAMTRuipq3FDOeH9mTikKXb9PqGyqs5t uNZo7cg2waoemVPocbJCVrAWcCe+lJjX+7WLZ1SjyzZJRzn5ImvGeg45OqfXd8SrGUFS 4CKQ== 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 i19si11131218ejd.152.2021.03.28.15.56.19; Sun, 28 Mar 2021 15:56:44 -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 S231479AbhC1WzJ (ORCPT + 99 others); Sun, 28 Mar 2021 18:55:09 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:45792 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbhC1Wyi (ORCPT ); Sun, 28 Mar 2021 18:54:38 -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 1lQeIk-0002kb-7d; Mon, 29 Mar 2021 00:54:34 +0200 From: "Maciej S. Szmigiero" To: Ping-Ke Shih , Kalle Valo Cc: Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: rtlwifi/rtl8192cu AP mode broken with PS STA Message-ID: Date: Mon, 29 Mar 2021 00:54:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 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 Hi, It looks like rtlwifi/rtl8192cu AP mode is broken when a STA is using PS, since the driver does not update its beacon to account for TIM changes, so a station that is sleeping will never learn that it has packets buffered at the AP. Looking at the code, the rtl8192cu driver implements neither the set_tim() callback, nor does it explicitly update beacon data periodically, so it has no way to learn that it had changed. This results in the AP mode being virtually unusable with STAs that do PS and don't allow for it to be disabled (IoT devices, mobile phones, etc.). I think the easiest fix here would be to implement set_tim() for example the way rt2x00 driver does: queue a work or schedule a tasklet to update the beacon data on the device. Thanks, Maciej