Skip to content

Commit d16836c

Browse files
Po-Hao HuangKalle Valo
authored andcommitted
wifi: rtw88: 8822c: add iface combination
Allow 8822c to operate two interface concurrently, only 1 AP mode plus 1 station mode under same frequency is supported. Combination of other types will not be added until 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/20230414121331.18062-1-pkshih@realtek.com
1 parent 96fbb84 commit d16836c

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

  • drivers/net/wireless/realtek/rtw88

drivers/net/wireless/realtek/rtw88/main.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,26 @@ static struct ieee80211_rate rtw_ratetable[] = {
103103
{.bitrate = 540, .hw_value = 0x0b,},
104104
};
105105

106+
static const struct ieee80211_iface_limit rtw_iface_limits[] = {
107+
{
108+
.max = 1,
109+
.types = BIT(NL80211_IFTYPE_STATION),
110+
},
111+
{
112+
.max = 1,
113+
.types = BIT(NL80211_IFTYPE_AP),
114+
}
115+
};
116+
117+
static const struct ieee80211_iface_combination rtw_iface_combs[] = {
118+
{
119+
.limits = rtw_iface_limits,
120+
.n_limits = ARRAY_SIZE(rtw_iface_limits),
121+
.max_interfaces = 2,
122+
.num_different_channels = 1,
123+
}
124+
};
125+
106126
u16 rtw_desc_to_bitrate(u8 desc_rate)
107127
{
108128
struct ieee80211_rate rate;
@@ -2205,6 +2225,11 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
22052225
hw->wiphy->max_scan_ssids = RTW_SCAN_MAX_SSIDS;
22062226
hw->wiphy->max_scan_ie_len = rtw_get_max_scan_ie_len(rtwdev);
22072227

2228+
if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) {
2229+
hw->wiphy->iface_combinations = rtw_iface_combs;
2230+
hw->wiphy->n_iface_combinations = ARRAY_SIZE(rtw_iface_combs);
2231+
}
2232+
22082233
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
22092234
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_SCAN_RANDOM_SN);
22102235
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL);

0 commit comments

Comments
 (0)