diff options
-rw-r--r-- | net/mac80211/iface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index ed297649c57..6e85faed053 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -349,9 +349,8 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) | |||
349 | memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN); | 349 | memcpy(dev->perm_addr, dev->dev_addr, ETH_ALEN); |
350 | 350 | ||
351 | if (!is_valid_ether_addr(dev->dev_addr)) { | 351 | if (!is_valid_ether_addr(dev->dev_addr)) { |
352 | if (!local->open_count) | 352 | res = -EADDRNOTAVAIL; |
353 | drv_stop(local); | 353 | goto err_stop; |
354 | return -EADDRNOTAVAIL; | ||
355 | } | 354 | } |
356 | } | 355 | } |
357 | 356 | ||
@@ -485,6 +484,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) | |||
485 | sdata->bss = NULL; | 484 | sdata->bss = NULL; |
486 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 485 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
487 | list_del(&sdata->u.vlan.list); | 486 | list_del(&sdata->u.vlan.list); |
487 | /* might already be clear but that doesn't matter */ | ||
488 | clear_bit(SDATA_STATE_RUNNING, &sdata->state); | 488 | clear_bit(SDATA_STATE_RUNNING, &sdata->state); |
489 | return res; | 489 | return res; |
490 | } | 490 | } |