summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPo-Hao Huang <phhuang@realtek.com>2023-04-15 05:50:16 +0200
committerKalle Valo <kvalo@kernel.org>2023-04-17 11:49:52 +0200
commitf22c0bffe8d9528ace89a853c6065b79dcb88c43 (patch)
tree3ba6fffc7574af5de0b88587dd51f8a1727e4810 /drivers/net
parentwifi: rtw89: Disallow power save with multiple stations (diff)
downloadlinux-f22c0bffe8d9528ace89a853c6065b79dcb88c43.tar.xz
linux-f22c0bffe8d9528ace89a853c6065b79dcb88c43.zip
wifi: rtw89: add support of concurrent mode
Add iface_combination declaration to enable concurrent mode. Only two interfaces under same frequency is supported currently. We limit the role combination to be STA + P2P or STA + AP only for now until new feature is requested. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230415035016.15788-2-pkshih@realtek.com
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/realtek/rtw89/core.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index a589f0902a92..7fc0a26a4d73 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -156,6 +156,28 @@ static struct ieee80211_rate rtw89_bitrates[] = {
{ .bitrate = 540, .hw_value = 0x0b, },
};
+static const struct ieee80211_iface_limit rtw89_iface_limits[] = {
+ {
+ .max = 1,
+ .types = BIT(NL80211_IFTYPE_STATION),
+ },
+ {
+ .max = 1,
+ .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
+ BIT(NL80211_IFTYPE_P2P_GO) |
+ BIT(NL80211_IFTYPE_AP),
+ },
+};
+
+static const struct ieee80211_iface_combination rtw89_iface_combs[] = {
+ {
+ .limits = rtw89_iface_limits,
+ .n_limits = ARRAY_SIZE(rtw89_iface_limits),
+ .max_interfaces = 2,
+ .num_different_channels = 1,
+ }
+};
+
bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate)
{
struct ieee80211_rate rate;
@@ -3834,6 +3856,9 @@ struct rtw89_dev *rtw89_alloc_ieee80211_hw(struct device *device,
if (!hw)
goto err;
+ hw->wiphy->iface_combinations = rtw89_iface_combs;
+ hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw89_iface_combs);
+
rtwdev = hw->priv;
rtwdev->hw = hw;
rtwdev->dev = device;