Skip to content

Commit

Permalink
qtnfmac: add interface combination check for repeater mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Lebed authored and Kalle Valo committed Mar 12, 2020
1 parent 616f570 commit 2d83ddd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ qtnf_validate_iface_combinations(struct wiphy *wiphy,

ret = cfg80211_check_combinations(wiphy, &params);

if (ret)
return ret;

/* Check repeater interface combination: primary VIF should be STA only.
* STA (primary) + AP (secondary) is OK.
* AP (primary) + STA (secondary) is not supported.
*/
vif = qtnf_mac_get_base_vif(mac);
if (vif && vif->wdev.iftype == NL80211_IFTYPE_AP &&
vif != change_vif && new_type == NL80211_IFTYPE_STATION) {
ret = -EINVAL;
pr_err("MAC%u invalid combination: AP as primary repeater interface is not supported\n",
mac->macid);
}

return ret;
}

Expand Down

0 comments on commit 2d83ddd

Please sign in to comment.