Commit 8e73c045 authored by Zong-Zhe Yang's avatar Zong-Zhe Yang Committed by Kalle Valo

wifi: rtw89: declare MCC in interface combination

MCC (multi-channel concurrency) supports two combinations as below.
* P2P-GO + STA
* P2P-GC + STA
We add the corresponding ieee80211_iface_limit for it into
ieee80211_iface_combination.

Besides, for multiple channels, it must run with mac80211 chanctx.
So, only with it, ieee80211_iface_combination can allow MCC case.
Signed-off-by: default avatarZong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230921003559.11588-5-pkshih@realtek.com
parent 0f93824e
...@@ -172,13 +172,31 @@ static const struct ieee80211_iface_limit rtw89_iface_limits[] = { ...@@ -172,13 +172,31 @@ static const struct ieee80211_iface_limit rtw89_iface_limits[] = {
}, },
}; };
static const struct ieee80211_iface_limit rtw89_iface_limits_mcc[] = {
{
.max = 1,
.types = BIT(NL80211_IFTYPE_STATION),
},
{
.max = 1,
.types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO),
},
};
static const struct ieee80211_iface_combination rtw89_iface_combs[] = { static const struct ieee80211_iface_combination rtw89_iface_combs[] = {
{ {
.limits = rtw89_iface_limits, .limits = rtw89_iface_limits,
.n_limits = ARRAY_SIZE(rtw89_iface_limits), .n_limits = ARRAY_SIZE(rtw89_iface_limits),
.max_interfaces = 2, .max_interfaces = 2,
.num_different_channels = 1, .num_different_channels = 1,
} },
{
.limits = rtw89_iface_limits_mcc,
.n_limits = ARRAY_SIZE(rtw89_iface_limits_mcc),
.max_interfaces = 2,
.num_different_channels = 2,
},
}; };
bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate) bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate)
...@@ -4285,6 +4303,10 @@ struct rtw89_dev *rtw89_alloc_ieee80211_hw(struct device *device, ...@@ -4285,6 +4303,10 @@ struct rtw89_dev *rtw89_alloc_ieee80211_hw(struct device *device,
goto err; goto err;
hw->wiphy->iface_combinations = rtw89_iface_combs; hw->wiphy->iface_combinations = rtw89_iface_combs;
if (no_chanctx || chip->support_chanctx_num == 1)
hw->wiphy->n_iface_combinations = 1;
else
hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw89_iface_combs); hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw89_iface_combs);
rtwdev = hw->priv; rtwdev = hw->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment