Commit 683fbb42 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 71e233a2
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment