init.c (334234b51453fe5def250bd60ea63b1f04a8e0d2) | init.c (28ae58dd1f55f55dabf02fbc76a76f0809eee937) |
---|---|
1 2/* 3 * Copyright (c) 2011 Atheros Communications Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 507 unchanged lines hidden (view full) --- 516 517void ath6kl_core_free(struct ath6kl *ar) 518{ 519 wiphy_free(ar->wiphy); 520} 521 522int ath6kl_unavail_ev(struct ath6kl *ar) 523{ | 1 2/* 3 * Copyright (c) 2011 Atheros Communications Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 507 unchanged lines hidden (view full) --- 516 517void ath6kl_core_free(struct ath6kl *ar) 518{ 519 wiphy_free(ar->wiphy); 520} 521 522int ath6kl_unavail_ev(struct ath6kl *ar) 523{ |
524 ath6kl_destroy(ar->net_dev, 1); | 524 ath6kl_destroy(ar->vif->ndev, 1); |
525 526 return 0; 527} 528 529/* firmware upload */ 530static int ath6kl_get_fw(struct ath6kl *ar, const char *filename, 531 u8 **fw, size_t *fw_len) 532{ --- 879 unchanged lines hidden (view full) --- 1412 ath6kl_err("Failed to instantiate a network device\n"); 1413 status = -ENOMEM; 1414 wiphy_unregister(ar->wiphy); 1415 goto err_debug_init; 1416 } 1417 1418 1419 ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n", | 525 526 return 0; 527} 528 529/* firmware upload */ 530static int ath6kl_get_fw(struct ath6kl *ar, const char *filename, 531 u8 **fw, size_t *fw_len) 532{ --- 879 unchanged lines hidden (view full) --- 1412 ath6kl_err("Failed to instantiate a network device\n"); 1413 status = -ENOMEM; 1414 wiphy_unregister(ar->wiphy); 1415 goto err_debug_init; 1416 } 1417 1418 1419 ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n", |
1420 __func__, ar->net_dev->name, ar->net_dev, ar); | 1420 __func__, ndev->name, ndev, ar); |
1421 1422 /* 1423 * The reason we have to wait for the target here is that the 1424 * driver layer has to init BMI in order to set the host block 1425 * size. 1426 */ 1427 if (ath6kl_htc_wait_target(ar->htc_target)) { 1428 status = -EIO; --- 146 unchanged lines hidden (view full) --- 1575err_wq: 1576 destroy_workqueue(ar->ath6kl_wq); 1577 1578 return ret; 1579} 1580 1581void ath6kl_stop_txrx(struct ath6kl *ar) 1582{ | 1421 1422 /* 1423 * The reason we have to wait for the target here is that the 1424 * driver layer has to init BMI in order to set the host block 1425 * size. 1426 */ 1427 if (ath6kl_htc_wait_target(ar->htc_target)) { 1428 status = -EIO; --- 146 unchanged lines hidden (view full) --- 1575err_wq: 1576 destroy_workqueue(ar->ath6kl_wq); 1577 1578 return ret; 1579} 1580 1581void ath6kl_stop_txrx(struct ath6kl *ar) 1582{ |
1583 struct net_device *ndev = ar->net_dev; | |
1584 struct ath6kl_vif *vif = ar->vif; | 1583 struct ath6kl_vif *vif = ar->vif; |
1584 struct net_device *ndev = vif->ndev; |
|
1585 1586 if (!ndev) 1587 return; 1588 1589 set_bit(DESTROY_IN_PROGRESS, &ar->flag); 1590 1591 if (down_interruptible(&ar->sem)) { 1592 ath6kl_err("down_interruptible failed\n"); --- 58 unchanged lines hidden --- | 1585 1586 if (!ndev) 1587 return; 1588 1589 set_bit(DESTROY_IN_PROGRESS, &ar->flag); 1590 1591 if (down_interruptible(&ar->sem)) { 1592 ath6kl_err("down_interruptible failed\n"); --- 58 unchanged lines hidden --- |