mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 03:06:50 -04:00
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:
committed by
Greg Kroah-Hartman
parent
71e233a2ab
commit
683fbb4239
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user