wifi: rtl8xxxu: Set maximum number of supported stations

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 <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230428150833.218605-19-martin.kaistra@linutronix.de
This commit is contained in:
Martin Kaistra 2023-04-28 17:08:33 +02:00 committed by Kalle Valo
parent b468481c9a
commit b9a07c443a
3 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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);