Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278058
b: refs/heads/master
c: 2792972
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Nov 11, 2011
1 parent e9efac4 commit 945f342
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 990bd9151927ad55c7e3da3b05cf13ecfe7a31bf
refs/heads/master: 2792972395356254252f12205915a32dce9f50e4
15 changes: 4 additions & 11 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2099,14 +2099,7 @@ void ath6kl_deinit_if_data(struct ath6kl_vif *vif)
{
aggr_module_destroy(vif->aggr_cntxt);

vif->aggr_cntxt = NULL;

if (test_bit(NETDEV_REGISTERED, &vif->flags)) {
unregister_netdev(vif->ndev);
clear_bit(NETDEV_REGISTERED, &vif->flags);
}

free_netdev(vif->ndev);
unregister_netdevice(vif->ndev);
}

struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,
Expand Down Expand Up @@ -2138,7 +2131,7 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,
if (ath6kl_init_if_data(vif))
goto err;

if (register_netdev(ndev))
if (register_netdevice(ndev))
goto err;

vif->sme_state = SME_DISCONNECTED;
Expand All @@ -2153,8 +2146,8 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,
return ndev;

err:
ath6kl_deinit_if_data(vif);

aggr_module_destroy(vif->aggr_cntxt);
free_netdev(ndev);
return NULL;
}

Expand Down
12 changes: 10 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,13 @@ static int ath6kl_init(struct ath6kl *ar)
goto err_node_cleanup;
}

rtnl_lock();

/* Add an initial station interface */
ndev = ath6kl_interface_add(ar, "wlan%d", NL80211_IFTYPE_STATION, 0);

rtnl_unlock();

if (!ndev) {
ath6kl_err("Failed to instantiate a network device\n");
status = -ENOMEM;
Expand Down Expand Up @@ -1523,7 +1528,9 @@ static int ath6kl_init(struct ath6kl *ar)
err_cleanup_scatter:
ath6kl_hif_cleanup_scatter(ar);
err_if_deinit:
rtnl_lock();
ath6kl_deinit_if_data(netdev_priv(ndev));
rtnl_unlock();
wiphy_unregister(ar->wiphy);
err_debug_init:
ath6kl_debug_cleanup(ar);
Expand Down Expand Up @@ -1622,8 +1629,6 @@ static void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready)
cfg80211_scan_done(vif->scan_req, true);
vif->scan_req = NULL;
}

ath6kl_deinit_if_data(vif);
}

void ath6kl_stop_txrx(struct ath6kl *ar)
Expand All @@ -1642,6 +1647,9 @@ void ath6kl_stop_txrx(struct ath6kl *ar)
list_del(&vif->list);
spin_unlock(&ar->list_lock);
ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag));
rtnl_lock();
ath6kl_deinit_if_data(vif);
rtnl_unlock();
spin_lock(&ar->list_lock);
}
spin_unlock(&ar->list_lock);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ static struct net_device_ops ath6kl_netdev_ops = {
void init_netdev(struct net_device *dev)
{
dev->netdev_ops = &ath6kl_netdev_ops;
dev->destructor = free_netdev;
dev->watchdog_timeo = ATH6KL_TX_TIMEOUT;

dev->needed_headroom = ETH_HLEN;
Expand Down

0 comments on commit 945f342

Please sign in to comment.