Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2735623rdb; Mon, 5 Feb 2024 16:37:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpZ/WDmnqbGF0lvPId1cPN4dbCLewNgmnYYC057jYE/MDZj/xuoKSS0iTzppVb+9pTCLRp X-Received: by 2002:aa7:db49:0:b0:55f:d6b9:5a9 with SMTP id n9-20020aa7db49000000b0055fd6b905a9mr528540edt.24.1707179828443; Mon, 05 Feb 2024 16:37:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707179828; cv=pass; d=google.com; s=arc-20160816; b=lgIzIRJOYbViBI7afBEJGfyJLyqF9yZaMCUHrfltSpcAjXEhnXf6lolq2lVikWH6wp kgMhlu8SJad564AyN/sHLywWX9enkmXlLXhFKQG1i3hnBakPInuZmveCYP/vKQrIXFKb oRZoDygMK/PiEiuUY1nYOP/60c2jKfd1butUIzrp11uDwLYvgKaa9n48CHT9KebGszkT MDrC3Ub2h6+e3tuFqANpwhy8fcweyJgv304e5r2F5r1UZ0EyTFqDp1du03IWwZpNO8qV +Fxn2UvXtKjP1Q19fUG2NQq7yM2SY+sQQRGpqflIb02ZlH6rC11CqDyVuLJn9tYY3e/r RNWA== 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 :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=RRNiUJW23npH9e3BUMPGpxCAWkbaRa2JGLoTUHMdpc8=; fh=tVpakGWquKHiFkUaQcbceGBrqhUGnXd94ERSXrRnyh0=; b=bXXswXhkvEVr3RyaM4i0jX6logUSyBHViomMiNjQNEVmbDae7OCvzCMJAmxSAKa/KZ ih199clkSncNTre71WhPrtFwq39eFYYvCcYyb03n5xlHN/ql3toLw1FlhjdRoQEVt4e2 R/tMRFI6W2szhOzVK2BbqIFnK/yeak01Cr8z+lmvFPROgcrXdhsJG2xXFEvbqHrgM/nl UoOpfMPFuJXCnbpGMdi7BV8luzuSc0U+wyCjHXTFhcUmV7Nsmg65iKb0cP3S5uNQ9kfq kX1HrIS7VUm5Gfv8TTAa15OKCo75ahvcFtxNqoobc6Ei352ZdnhfT2HOsVq5OCAB1BYn GyYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3181-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWua6oA5Y8lDy69tOFKhTOjcF+jmhyp3N7G7kbEMrvy661uhH0obqBgVi9U2F79auAgEHo1UMur6KZrNd7MhRTPJ9d7UuOfwi3GQ4GQQQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x6-20020aa7d6c6000000b0055ff318592dsi435438edr.460.2024.02.05.16.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 16:37:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-3181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3181-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id EA6A31F24B27 for ; Tue, 6 Feb 2024 00:37:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B2D21362; Tue, 6 Feb 2024 00:37:04 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C581373 for ; Tue, 6 Feb 2024 00:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707179824; cv=none; b=T4TvupzUvkCNWbhIQlRsjB9dr1BX3NrMDCPk4k9Vf9xkJ/9Tb6EIB4pw2fb5wApa4oJ7PZCn2++QTchokMRiizG6K0M11WZ0wKi1ZxLh0zGT2OBJ9iAUaYluuezb2VyBG6KnIKd1SSgwlHh/SB/RziYEuCRRhgHyIIJRgrkJcFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707179824; c=relaxed/simple; bh=RRNiUJW23npH9e3BUMPGpxCAWkbaRa2JGLoTUHMdpc8=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=l5eZc/igNxK7RZQgwbAiHr8k8Utfxy31KT56HYQhGZTdgeRusB9QKbTx1qvU1eo3lLJGSs66ZM7Pct6ocb8N++UsEsa95MbXYE1cITXjPksUv6MMne6MVlNelTq4FCoOp3FO0R9+p3bGHeXrp+WHo+TEJlJvWLVaABTVXGWidow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4160aa1gB3438781, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4160aa1gB3438781 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 08:36:36 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Tue, 6 Feb 2024 08:36:37 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 6 Feb 2024 08:36:36 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f]) by RTEXMBS04.realtek.com.tw ([fe80::c9b7:82a9:7e98:fa7f%7]) with mapi id 15.01.2507.035; Tue, 6 Feb 2024 08:36:36 +0800 From: Ping-Ke Shih To: Martin Kaistra , "linux-wireless@vger.kernel.org" CC: Jes Sorensen , Kalle Valo , Bitterblue Smith , Sebastian Andrzej Siewior Subject: RE: [PATCH v3] wifi: rtl8xxxu: update rate mask per sta Thread-Topic: [PATCH v3] wifi: rtl8xxxu: update rate mask per sta Thread-Index: AQHaWBYF7zDVDwY1+EGQA/lkHaVU+rD8dxvg Date: Tue, 6 Feb 2024 00:36:36 +0000 Message-ID: <1c59d20d51324b8bb7863580774199cf@realtek.com> References: <20240205093040.1941140-1-martin.kaistra@linutronix.de> In-Reply-To: <20240205093040.1941140-1-martin.kaistra@linutronix.de> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-kse-serverinfo: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback > -----Original Message----- > From: Martin Kaistra > Sent: Monday, February 5, 2024 5:31 PM > To: linux-wireless@vger.kernel.org > Cc: Jes Sorensen ; Kalle Valo ;= Ping-Ke Shih > ; Bitterblue Smith ; Sebasti= an Andrzej Siewior > > Subject: [PATCH v3] wifi: rtl8xxxu: update rate mask per sta >=20 > Until now, rtl8xxxu_watchdog_callback() only fetches RSSI and updates > the rate mask in station mode. This means, in AP mode only the default > rate mask is used. >=20 > In order to have the rate mask reflect the actual connection quality, > extend rtl8xxxu_watchdog_callback() to iterate over every sta. Like in > the rtw88 driver, add a function to collect all currently present stas > and then iterate over a list of copies to ensure no RCU lock problems > for register access via USB. Remove the existing RCU lock in > rtl8xxxu_refresh_rate_mask(). >=20 > Since the currently used ieee80211_ave_rssi() is only for 'vif', add > driver-level tracking of RSSI per sta. >=20 > Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih