diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-01-17 13:08:27 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-01-18 06:51:11 -0500 |
commit | c25889e8a6fdfc54618b192a80c94419ddb7949d (patch) | |
tree | 7473a05b26903e82a2fa0b188b486f087c89a0f3 | |
parent | cd23c1c9b8a2de64477a795ab5a9cd5278397f24 (diff) |
ath6kl: rename vif init and cleanup functions
ath6kl_cfg80211_vif_init/cleanup() follow more closely the style used
elsewhere in ath6kl.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index a13ecec00702..7e92dc9799ac 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -1401,7 +1401,7 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy, | |||
1401 | 1401 | ||
1402 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); | 1402 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); |
1403 | 1403 | ||
1404 | ath6kl_deinit_if_data(vif); | 1404 | ath6kl_cfg80211_vif_cleanup(vif); |
1405 | 1405 | ||
1406 | return 0; | 1406 | return 0; |
1407 | } | 1407 | } |
@@ -2806,7 +2806,7 @@ int ath6kl_register_ieee80211_hw(struct ath6kl *ar) | |||
2806 | return 0; | 2806 | return 0; |
2807 | } | 2807 | } |
2808 | 2808 | ||
2809 | static int ath6kl_init_if_data(struct ath6kl_vif *vif) | 2809 | static int ath6kl_cfg80211_vif_init(struct ath6kl_vif *vif) |
2810 | { | 2810 | { |
2811 | vif->aggr_cntxt = aggr_init(vif->ndev); | 2811 | vif->aggr_cntxt = aggr_init(vif->ndev); |
2812 | if (!vif->aggr_cntxt) { | 2812 | if (!vif->aggr_cntxt) { |
@@ -2827,7 +2827,7 @@ static int ath6kl_init_if_data(struct ath6kl_vif *vif) | |||
2827 | return 0; | 2827 | return 0; |
2828 | } | 2828 | } |
2829 | 2829 | ||
2830 | void ath6kl_deinit_if_data(struct ath6kl_vif *vif) | 2830 | void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif) |
2831 | { | 2831 | { |
2832 | struct ath6kl *ar = vif->ar; | 2832 | struct ath6kl *ar = vif->ar; |
2833 | struct ath6kl_mc_filter *mc_filter, *tmp; | 2833 | struct ath6kl_mc_filter *mc_filter, *tmp; |
@@ -2880,8 +2880,7 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, | |||
2880 | 2880 | ||
2881 | ath6kl_init_control_info(vif); | 2881 | ath6kl_init_control_info(vif); |
2882 | 2882 | ||
2883 | /* TODO: Pass interface specific pointer instead of ar */ | 2883 | if (ath6kl_cfg80211_vif_init(vif)) |
2884 | if (ath6kl_init_if_data(vif)) | ||
2885 | goto err; | 2884 | goto err; |
2886 | 2885 | ||
2887 | if (register_netdevice(ndev)) | 2886 | if (register_netdevice(ndev)) |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.h b/drivers/net/wireless/ath/ath6kl/cfg80211.h index 81f20a572315..aa961694cf99 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.h +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.h | |||
@@ -53,6 +53,8 @@ int ath6kl_cfg80211_suspend(struct ath6kl *ar, | |||
53 | 53 | ||
54 | int ath6kl_cfg80211_resume(struct ath6kl *ar); | 54 | int ath6kl_cfg80211_resume(struct ath6kl *ar); |
55 | 55 | ||
56 | void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif); | ||
57 | |||
56 | void ath6kl_cfg80211_stop(struct ath6kl_vif *vif); | 58 | void ath6kl_cfg80211_stop(struct ath6kl_vif *vif); |
57 | void ath6kl_cfg80211_stop_all(struct ath6kl *ar); | 59 | void ath6kl_cfg80211_stop_all(struct ath6kl *ar); |
58 | 60 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index f53594f2e537..bdeb254c259c 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -753,7 +753,6 @@ void ath6kl_wakeup_event(void *dev); | |||
753 | void ath6kl_reset_device(struct ath6kl *ar, u32 target_type, | 753 | void ath6kl_reset_device(struct ath6kl *ar, u32 target_type, |
754 | bool wait_fot_compltn, bool cold_reset); | 754 | bool wait_fot_compltn, bool cold_reset); |
755 | void ath6kl_init_control_info(struct ath6kl_vif *vif); | 755 | void ath6kl_init_control_info(struct ath6kl_vif *vif); |
756 | void ath6kl_deinit_if_data(struct ath6kl_vif *vif); | ||
757 | void ath6kl_core_free(struct ath6kl *ar); | 756 | void ath6kl_core_free(struct ath6kl *ar); |
758 | struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar); | 757 | struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar); |
759 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready); | 758 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready); |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index b88f41dc3dfa..3cc4e0842add 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -1811,7 +1811,7 @@ err_rxbuf_cleanup: | |||
1811 | ath6kl_htc_flush_rx_buf(ar->htc_target); | 1811 | ath6kl_htc_flush_rx_buf(ar->htc_target); |
1812 | ath6kl_cleanup_amsdu_rxbufs(ar); | 1812 | ath6kl_cleanup_amsdu_rxbufs(ar); |
1813 | rtnl_lock(); | 1813 | rtnl_lock(); |
1814 | ath6kl_deinit_if_data(netdev_priv(ndev)); | 1814 | ath6kl_cfg80211_vif_cleanup(netdev_priv(ndev)); |
1815 | rtnl_unlock(); | 1815 | rtnl_unlock(); |
1816 | wiphy_unregister(ar->wiphy); | 1816 | wiphy_unregister(ar->wiphy); |
1817 | err_debug_init: | 1817 | err_debug_init: |
@@ -1832,6 +1832,7 @@ err_wq: | |||
1832 | return ret; | 1832 | return ret; |
1833 | } | 1833 | } |
1834 | 1834 | ||
1835 | /* FIXME: move this to cfg80211.c and rename to ath6kl_cfg80211_vif_stop() */ | ||
1835 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready) | 1836 | void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready) |
1836 | { | 1837 | { |
1837 | static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | 1838 | static u8 bcast_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; |
@@ -1877,7 +1878,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar) | |||
1877 | spin_unlock_bh(&ar->list_lock); | 1878 | spin_unlock_bh(&ar->list_lock); |
1878 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); | 1879 | ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); |
1879 | rtnl_lock(); | 1880 | rtnl_lock(); |
1880 | ath6kl_deinit_if_data(vif); | 1881 | ath6kl_cfg80211_vif_cleanup(vif); |
1881 | rtnl_unlock(); | 1882 | rtnl_unlock(); |
1882 | spin_lock_bh(&ar->list_lock); | 1883 | spin_lock_bh(&ar->list_lock); |
1883 | } | 1884 | } |