aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 52425975bbbe..256fa19e14ec 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -20,6 +20,7 @@
20#include "debugfs_netdev.h" 20#include "debugfs_netdev.h"
21#include "mesh.h" 21#include "mesh.h"
22#include "led.h" 22#include "led.h"
23#include "driver-ops.h"
23 24
24/** 25/**
25 * DOC: Interface list locking 26 * DOC: Interface list locking
@@ -164,9 +165,7 @@ static int ieee80211_open(struct net_device *dev)
164 } 165 }
165 166
166 if (local->open_count == 0) { 167 if (local->open_count == 0) {
167 res = 0; 168 res = drv_start(local);
168 if (local->ops->start)
169 res = local->ops->start(local_to_hw(local));
170 if (res) 169 if (res)
171 goto err_del_bss; 170 goto err_del_bss;
172 /* we're brought up, everything changes */ 171 /* we're brought up, everything changes */
@@ -199,8 +198,8 @@ static int ieee80211_open(struct net_device *dev)
199 * Validate the MAC address for this device. 198 * Validate the MAC address for this device.
200 */ 199 */
201 if (!is_valid_ether_addr(dev->dev_addr)) { 200 if (!is_valid_ether_addr(dev->dev_addr)) {
202 if (!local->open_count && local->ops->stop) 201 if (!local->open_count)
203 local->ops->stop(local_to_hw(local)); 202 drv_stop(local);
204 return -EADDRNOTAVAIL; 203 return -EADDRNOTAVAIL;
205 } 204 }
206 205
@@ -241,7 +240,7 @@ static int ieee80211_open(struct net_device *dev)
241 conf.vif = &sdata->vif; 240 conf.vif = &sdata->vif;
242 conf.type = sdata->vif.type; 241 conf.type = sdata->vif.type;
243 conf.mac_addr = dev->dev_addr; 242 conf.mac_addr = dev->dev_addr;
244 res = local->ops->add_interface(local_to_hw(local), &conf); 243 res = drv_add_interface(local, &conf);
245 if (res) 244 if (res)
246 goto err_stop; 245 goto err_stop;
247 246
@@ -328,10 +327,10 @@ static int ieee80211_open(struct net_device *dev)
328 327
329 return 0; 328 return 0;
330 err_del_interface: 329 err_del_interface:
331 local->ops->remove_interface(local_to_hw(local), &conf); 330 drv_remove_interface(local, &conf);
332 err_stop: 331 err_stop:
333 if (!local->open_count && local->ops->stop) 332 if (!local->open_count)
334 local->ops->stop(local_to_hw(local)); 333 drv_stop(local);
335 err_del_bss: 334 err_del_bss:
336 sdata->bss = NULL; 335 sdata->bss = NULL;
337 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 336 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -544,7 +543,7 @@ static int ieee80211_stop(struct net_device *dev)
544 conf.mac_addr = dev->dev_addr; 543 conf.mac_addr = dev->dev_addr;
545 /* disable all keys for as long as this netdev is down */ 544 /* disable all keys for as long as this netdev is down */
546 ieee80211_disable_keys(sdata); 545 ieee80211_disable_keys(sdata);
547 local->ops->remove_interface(local_to_hw(local), &conf); 546 drv_remove_interface(local, &conf);
548 } 547 }
549 548
550 sdata->bss = NULL; 549 sdata->bss = NULL;
@@ -553,8 +552,7 @@ static int ieee80211_stop(struct net_device *dev)
553 if (netif_running(local->mdev)) 552 if (netif_running(local->mdev))
554 dev_close(local->mdev); 553 dev_close(local->mdev);
555 554
556 if (local->ops->stop) 555 drv_stop(local);
557 local->ops->stop(local_to_hw(local));
558 556
559 ieee80211_led_radio(local, 0); 557 ieee80211_led_radio(local, 0);
560 558