aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2015-12-10 13:43:06 +0100
committerKalle Valo <kvalo@codeaurora.org>2015-12-11 13:51:51 +0200
commit353c46ac9e530f511fba9387e1e63226eb168e63 (patch)
tree15012da17ddbb19b31867f74f5613c549a330e67
parentfdf3456422972016ab802317ba1c2ce5969dd7a6 (diff)
downloadwireless-testing-353c46ac9e530f511fba9387e1e63226eb168e63.tar.gz
brcmfmac: no interface combination check for single interface
The interface combinations are intended for use-case in which the driver handles multiple interface concurrently. This means that the combinations do not need to be checked when there is only a single interface active. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 8557566fff54a4..3ac5cf79cd2bb8 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -396,15 +396,23 @@ static int brcmf_vif_change_validate(struct brcmf_cfg80211_info *cfg,
{
int iftype_num[NUM_NL80211_IFTYPES];
struct brcmf_cfg80211_vif *pos;
+ bool check_combos = false;
+ int ret = 0;
memset(&iftype_num[0], 0, sizeof(iftype_num));
list_for_each_entry(pos, &cfg->vif_list, list)
- if (pos == vif)
+ if (pos == vif) {
iftype_num[new_type]++;
- else
+ } else {
+ /* concurrent interfaces so need check combinations */
+ check_combos = true;
iftype_num[pos->wdev.iftype]++;
+ }
- return cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
+ if (check_combos)
+ ret = cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num);
+
+ return ret;
}
static int brcmf_vif_add_validate(struct brcmf_cfg80211_info *cfg,