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>
This commit is contained in:
Arend van Spriel 2011-10-02 10:14:34 -07:00 committed by Greg Kroah-Hartman
parent 71e233a2ab
commit 683fbb4239
1 changed files with 4 additions and 1 deletions

View File

@ -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)