diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-07-21 05:12:52 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-08-09 12:45:24 -0400 |
commit | 8a8bc5a440a0b42cc8fc0d5a60c041e7ab5d76d1 (patch) | |
tree | e00f521c816b78c8ce35c89c59caa00e3c003dce /drivers | |
parent | 77fccc78a0fac77ac71fe341243970cfcd9a8ad3 (diff) |
ath6kl: Use ath6kl_cfg80211_scan_node() directly instead of function pointer
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/common.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/node.c | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index cf5ab55cc0df..d28e72a96e84 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -721,7 +721,7 @@ static inline bool is_ch_11a(u16 ch) | |||
721 | } | 721 | } |
722 | 722 | ||
723 | /* struct ath6kl_node_table::nt_nodelock is locked when calling this */ | 723 | /* struct ath6kl_node_table::nt_nodelock is locked when calling this */ |
724 | static void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni) | 724 | void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni) |
725 | { | 725 | { |
726 | struct wiphy *wiphy = (struct wiphy *)arg; | 726 | struct wiphy *wiphy = (struct wiphy *)arg; |
727 | u16 size; | 727 | u16 size; |
@@ -833,8 +833,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status) | |||
833 | } | 833 | } |
834 | 834 | ||
835 | /* Translate data to cfg80211 mgmt format */ | 835 | /* Translate data to cfg80211 mgmt format */ |
836 | wlan_iterate_nodes(&ar->scan_table, ath6kl_cfg80211_scan_node, | 836 | wlan_iterate_nodes(&ar->scan_table, ar->wdev->wiphy); |
837 | ar->wdev->wiphy); | ||
838 | 837 | ||
839 | cfg80211_scan_done(ar->scan_req, false); | 838 | cfg80211_scan_done(ar->scan_req, false); |
840 | 839 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/common.h b/drivers/net/wireless/ath/ath6kl/common.h index e37ae9bafc0d..ab03f4452888 100644 --- a/drivers/net/wireless/ath/ath6kl/common.h +++ b/drivers/net/wireless/ath/ath6kl/common.h | |||
@@ -151,9 +151,7 @@ struct bss *wlan_find_node(struct ath6kl_node_table *nt, | |||
151 | const u8 *mac_addr); | 151 | const u8 *mac_addr); |
152 | void wlan_node_reclaim(struct ath6kl_node_table *nt, struct bss *ni); | 152 | void wlan_node_reclaim(struct ath6kl_node_table *nt, struct bss *ni); |
153 | void wlan_free_allnodes(struct ath6kl_node_table *nt); | 153 | void wlan_free_allnodes(struct ath6kl_node_table *nt); |
154 | void wlan_iterate_nodes(struct ath6kl_node_table *nt, | 154 | void wlan_iterate_nodes(struct ath6kl_node_table *nt, void *arg); |
155 | void (*f) (void *arg, struct bss *), | ||
156 | void *arg); | ||
157 | 155 | ||
158 | void wlan_node_table_init(struct ath6kl_node_table *nt); | 156 | void wlan_node_table_init(struct ath6kl_node_table *nt); |
159 | void wlan_node_table_cleanup(struct ath6kl_node_table *nt); | 157 | void wlan_node_table_cleanup(struct ath6kl_node_table *nt); |
@@ -179,4 +177,5 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev); | |||
179 | int ath6kl_core_init(struct ath6kl *ar); | 177 | int ath6kl_core_init(struct ath6kl *ar); |
180 | int ath6kl_unavail_ev(struct ath6kl *ar); | 178 | int ath6kl_unavail_ev(struct ath6kl *ar); |
181 | struct sk_buff *ath6kl_buf_alloc(int size); | 179 | struct sk_buff *ath6kl_buf_alloc(int size); |
180 | void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni); | ||
182 | #endif /* COMMON_H */ | 181 | #endif /* COMMON_H */ |
diff --git a/drivers/net/wireless/ath/ath6kl/node.c b/drivers/net/wireless/ath/ath6kl/node.c index 7c9fbde9dedd..131205c610b9 100644 --- a/drivers/net/wireless/ath/ath6kl/node.c +++ b/drivers/net/wireless/ath/ath6kl/node.c | |||
@@ -146,15 +146,14 @@ void wlan_free_allnodes(struct ath6kl_node_table *nt) | |||
146 | wlan_node_reclaim(nt, ni); | 146 | wlan_node_reclaim(nt, ni); |
147 | } | 147 | } |
148 | 148 | ||
149 | void wlan_iterate_nodes(struct ath6kl_node_table *nt, | 149 | void wlan_iterate_nodes(struct ath6kl_node_table *nt, void *arg) |
150 | void (*f) (void *arg, struct bss *), void *arg) | ||
151 | { | 150 | { |
152 | struct bss *ni; | 151 | struct bss *ni; |
153 | 152 | ||
154 | spin_lock_bh(&nt->nt_nodelock); | 153 | spin_lock_bh(&nt->nt_nodelock); |
155 | for (ni = nt->nt_node_first; ni; ni = ni->ni_list_next) { | 154 | for (ni = nt->nt_node_first; ni; ni = ni->ni_list_next) { |
156 | ni->ni_refcnt++; | 155 | ni->ni_refcnt++; |
157 | (*f) (arg, ni); | 156 | ath6kl_cfg80211_scan_node(arg, ni); |
158 | wlan_node_dec_free(ni); | 157 | wlan_node_dec_free(ni); |
159 | } | 158 | } |
160 | spin_unlock_bh(&nt->nt_nodelock); | 159 | spin_unlock_bh(&nt->nt_nodelock); |