Skip to content

Commit

Permalink
staging: brcm80211: only allow one call to add_interface callback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Oct 3, 2011
1 parent 71e233a commit 683fbb4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/mac80211_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 683fbb4

Please sign in to comment.