summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-10-02 17:14:34 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 23:16:48 (GMT)
commit683fbb42396106974c315897d8d379f9e7b8ee40 (patch)
treedd52ecf82b7a5d8d5144e9f83336d5bde5b8d6b0 /drivers
parent71e233a2abc11a8b4263e4883e90f9fbe01fd806 (diff)
downloadlinux-fsl-qoriq-683fbb42396106974c315897d8d379f9e7b8ee40.tar.xz
staging: brcm80211: only allow one call to add_interface callback
The driver only supports one network interface to be associated with it. Only for the first call it does actually something. For subsequent calls it does return -ENODEV error code. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/brcm80211/brcmsmac/mac80211_if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/mac80211_if.c b/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
index 1fa95d7..6787498 100644
--- a/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/staging/brcm80211/brcmsmac/mac80211_if.c
@@ -341,7 +341,10 @@ brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
wl = hw->priv;
LOCK(wl);
- err = brcms_up(wl);
+ if (!wl->pub->up)
+ err = brcms_up(wl);
+ else
+ err = -ENODEV;
UNLOCK(wl);
if (err != 0)