Skip to content

Commit 2d83ddd

Browse files
dlebedKalle Valo
authored andcommitted
qtnfmac: add interface combination check for repeater mode
Firmware supports only STA as primary interface in repeater mode. Since the only meaningful usage of AP + STA interface combination is repeater, reject such combination with AP as primary interface. Signed-off-by: Dmitry Lebed <dlebed@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
1 parent 616f570 commit 2d83ddd

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎drivers/net/wireless/quantenna/qtnfmac/cfg80211.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,21 @@ qtnf_validate_iface_combinations(struct wiphy *wiphy,
102102

103103
ret = cfg80211_check_combinations(wiphy, &params);
104104

105+
if (ret)
106+
return ret;
107+
108+
/* Check repeater interface combination: primary VIF should be STA only.
109+
* STA (primary) + AP (secondary) is OK.
110+
* AP (primary) + STA (secondary) is not supported.
111+
*/
112+
vif = qtnf_mac_get_base_vif(mac);
113+
if (vif && vif->wdev.iftype == NL80211_IFTYPE_AP &&
114+
vif != change_vif && new_type == NL80211_IFTYPE_STATION) {
115+
ret = -EINVAL;
116+
pr_err("MAC%u invalid combination: AP as primary repeater interface is not supported\n",
117+
mac->macid);
118+
}
119+
105120
return ret;
106121
}
107122

0 commit comments

Comments
 (0)