Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2263591rwr; Fri, 28 Apr 2023 08:09:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FdDx/bnpJ8kDfkbk1X/dxmLwLKMl7hQzn6orEW4pD2zPPnJjZ8RK8pA/GZrQUbe6LqViC X-Received: by 2002:a05:6a00:1255:b0:63c:6485:d5fd with SMTP id u21-20020a056a00125500b0063c6485d5fdmr7841415pfi.2.1682694597446; Fri, 28 Apr 2023 08:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682694597; cv=none; d=google.com; s=arc-20160816; b=cqRlaBhZY1fnH4od20/4z+Tajvqs3l1n8thFCmEbhhlS+wwc8z3jD9/dIyfgMNw9Zs 0e49pCgu3df+b6oBaFzWB6FoUdRGH5RiuP8A9XXcZKc0mtdvLGtWPNF1UbTDk3iistFT EHJBgu4yGYGdbPgg9H2eQUToc1ERi8+ZDXwtNtmmwXtRDtNRoam9S7QJiTPEiGlx81+Q 9zGoP3kWgktv1Onq64MaFBYzDoVc4KQaYAwENZZyP9rYSMWNtoRHRVheWaJ/SZgfHYtY JQLvr3tWaxb5dHhiY1Ekzpix4E7FjY2hNtugO1g5yd1aWXpRuc7aocyxbJ4w3UPogqyY GnDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=3cHsqTdQpCd9hxCR7NHVGDEoNd4waneQ7NPdz8R4Cw4=; b=BSeGaj33o/9WlfRQgiTM72z1kJgPoSws4WSHQ1jQ4BOVYNEwMqqY6QPPN3FsVsIVqz eIn9LeBIuVFlntawge6i+ahxZZU8oorO65b57Cf9OXalWPki2v22TQZ/1JBRnzSbjJ9i rQZUHoLlPAR+mMsRpoeNn1f0ZCRCiznITesx87JxSoPtbTQELRVyzDESqDNM2G6ly1pb Y0Pu5f3dqB0dUT7NDjSG6XqC7Or/oypi7S00CnZheB2GtDgh/Mbk2sZZbRMylD5hokz8 s3n+mYSPj7IRzSW0KtM83Pl8VYAzcQvQRPbEsTUZ2ANCz/Nukpo7EkEK7uwIferV8BXO 5T0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gLmerbl5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c22-20020aa79536000000b0063b7790fde1si21213436pfp.284.2023.04.28.08.09.49; Fri, 28 Apr 2023 08:09:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gLmerbl5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346323AbjD1PJG (ORCPT + 62 others); Fri, 28 Apr 2023 11:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346295AbjD1PIz (ORCPT ); Fri, 28 Apr 2023 11:08:55 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD4E540F8 for ; Fri, 28 Apr 2023 08:08:52 -0700 (PDT) From: Martin Kaistra DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682694522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3cHsqTdQpCd9hxCR7NHVGDEoNd4waneQ7NPdz8R4Cw4=; b=gLmerbl5sYbLofSdHlz6PfW01TbyyJZAJc5089wgrX50NVzQe15sRF/gvR/HY0BxYakdlf pI8yVXxF4DMVgdv/7rHi5W4HlA5qMFJk2+zSFPBev7auTDAJ9kOG0IXQiEgwgMpePPMwDX 5yrpAjvnf85EzOZ5TskqizBuJ1AAXOKvE8HT6EGVXjDG57uowz95QA0OIKwTxn2/9TCIoE WK0t7b5oBvxtAxtRMKfmVC57JRT5O0rsmHbaSOBBMmprUQIasz4iHGngCljnkayDeIocc7 bjf8rHaHtDvSbF5iysTeksfJaA/cerSO7TJ1GFjym7uCUFkQB7QSH0C+NOxYAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682694522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3cHsqTdQpCd9hxCR7NHVGDEoNd4waneQ7NPdz8R4Cw4=; b=6E4mreXASWmPb7qYCzSH4DWoD9cVDO3E0qU9VEJsnsuIwTtueccMvGufIWWCPXs+sedn/F jp9o3R1glOu0zQBg== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH v4 18/18] wifi: rtl8xxxu: Set maximum number of supported stations Date: Fri, 28 Apr 2023 17:08:33 +0200 Message-Id: <20230428150833.218605-19-martin.kaistra@linutronix.de> In-Reply-To: <20230428150833.218605-1-martin.kaistra@linutronix.de> References: <20230428150833.218605-1-martin.kaistra@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Set maximum number of associated stations supported in AP mode. For 8188f, the maximum number of supported macids is 16, reserve one for broadcast/multicast frames. Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 1 + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h index 296f345784682..2c756640f59d3 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h @@ -1944,6 +1944,7 @@ struct rtl8xxxu_fileops { u8 ampdu_max_time; u8 ustime_tsf_edca; u8 supports_ap:1; + u16 max_macid_num; u32 adda_1t_init; u32 adda_1t_path_on; u32 adda_2t_path_on_a; diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c index 7fd258bf65e36..71b7f0d31bf43 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c @@ -1749,6 +1749,7 @@ struct rtl8xxxu_fileops rtl8188fu_fops = { .ampdu_max_time = 0x70, .ustime_tsf_edca = 0x28, .supports_ap = 1, + .max_macid_num = 16, .adda_1t_init = 0x03c00014, .adda_1t_path_on = 0x03c00014, .trxff_boundary = 0x3f7f, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 71c715ec5608d..67901b3ee8968 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -7532,6 +7532,8 @@ static int rtl8xxxu_probe(struct usb_interface *interface, hw->wiphy->max_scan_ssids = 1; hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; + if (priv->fops->max_macid_num) + hw->wiphy->max_ap_assoc_sta = priv->fops->max_macid_num - 1; hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); if (priv->fops->supports_ap) hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP); -- 2.30.2