diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-07-21 04:08:33 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-08-09 12:45:22 -0400 |
commit | 7c3075e9ea20a5feca48c8ff22dd23140e55ab1e (patch) | |
tree | 38ded0555e8618e221bb75b6d8ca4d1b39cd95c6 /drivers/net | |
parent | 2865785e96b5990db6928126996fa246d399ec6d (diff) |
ath6kl: Move scan table from wmi to ath6kl
It does not need to be in wmi
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 1 |
3 files changed, 17 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 67784752533f..f3f588a5a02a 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -455,6 +455,8 @@ struct ath6kl { | |||
455 | size_t fw_patch_len; | 455 | size_t fw_patch_len; |
456 | 456 | ||
457 | struct workqueue_struct *ath6kl_wq; | 457 | struct workqueue_struct *ath6kl_wq; |
458 | |||
459 | struct ath6kl_node_table scan_table; | ||
458 | }; | 460 | }; |
459 | 461 | ||
460 | static inline void *ath6kl_priv(struct net_device *dev) | 462 | static inline void *ath6kl_priv(struct net_device *dev) |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 9b06a82cad7a..2e1b4111e6b2 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -390,7 +390,7 @@ void ath6kl_wmi_iterate_nodes(struct wmi *wmi, | |||
390 | void (*f) (void *arg, struct bss *), | 390 | void (*f) (void *arg, struct bss *), |
391 | void *arg) | 391 | void *arg) |
392 | { | 392 | { |
393 | wlan_iterate_nodes(&wmi->scan_table, f, arg); | 393 | wlan_iterate_nodes(&wmi->parent_dev->scan_table, f, arg); |
394 | } | 394 | } |
395 | 395 | ||
396 | static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb, | 396 | static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb, |
@@ -728,7 +728,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
728 | return -EINVAL; | 728 | return -EINVAL; |
729 | 729 | ||
730 | bih = (struct wmi_bss_info_hdr *) datap; | 730 | bih = (struct wmi_bss_info_hdr *) datap; |
731 | bss = wlan_find_node(&wmi->scan_table, bih->bssid); | 731 | bss = wlan_find_node(&wmi->parent_dev->scan_table, bih->bssid); |
732 | 732 | ||
733 | if (a_sle16_to_cpu(bih->rssi) > 0) { | 733 | if (a_sle16_to_cpu(bih->rssi) > 0) { |
734 | if (bss == NULL) | 734 | if (bss == NULL) |
@@ -777,7 +777,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
777 | bih->snr = bss->ni_snr; | 777 | bih->snr = bss->ni_snr; |
778 | } | 778 | } |
779 | 779 | ||
780 | wlan_node_reclaim(&wmi->scan_table, bss); | 780 | wlan_node_reclaim(&wmi->parent_dev->scan_table, bss); |
781 | } | 781 | } |
782 | 782 | ||
783 | /* | 783 | /* |
@@ -862,7 +862,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
862 | * which is done in ath6kl_wlan_parse_beacon | 862 | * which is done in ath6kl_wlan_parse_beacon |
863 | */ | 863 | */ |
864 | bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); | 864 | bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); |
865 | wlan_setup_node(&wmi->scan_table, bss, bih->bssid); | 865 | wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid); |
866 | 866 | ||
867 | return 0; | 867 | return 0; |
868 | } | 868 | } |
@@ -883,10 +883,10 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
883 | ath6kl_dbg(ATH6KL_DBG_WMI, "opt frame event %2.2x:%2.2x\n", | 883 | ath6kl_dbg(ATH6KL_DBG_WMI, "opt frame event %2.2x:%2.2x\n", |
884 | bih->bssid[4], bih->bssid[5]); | 884 | bih->bssid[4], bih->bssid[5]); |
885 | 885 | ||
886 | bss = wlan_find_node(&wmi->scan_table, bih->bssid); | 886 | bss = wlan_find_node(&wmi->parent_dev->scan_table, bih->bssid); |
887 | if (bss != NULL) { | 887 | if (bss != NULL) { |
888 | /* Free up the node. We are about to allocate a new node. */ | 888 | /* Free up the node. We are about to allocate a new node. */ |
889 | wlan_node_reclaim(&wmi->scan_table, bss); | 889 | wlan_node_reclaim(&wmi->parent_dev->scan_table, bss); |
890 | } | 890 | } |
891 | 891 | ||
892 | bss = wlan_node_alloc(len); | 892 | bss = wlan_node_alloc(len); |
@@ -900,7 +900,7 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len) | |||
900 | return -EINVAL; | 900 | return -EINVAL; |
901 | 901 | ||
902 | memcpy(bss->ni_buf, buf, len); | 902 | memcpy(bss->ni_buf, buf, len); |
903 | wlan_setup_node(&wmi->scan_table, bss, bih->bssid); | 903 | wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid); |
904 | 904 | ||
905 | return 0; | 905 | return 0; |
906 | } | 906 | } |
@@ -1009,7 +1009,7 @@ static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len) | |||
1009 | ev = (struct wmi_scan_complete_event *) datap; | 1009 | ev = (struct wmi_scan_complete_event *) datap; |
1010 | 1010 | ||
1011 | if (a_sle32_to_cpu(ev->status) == 0) | 1011 | if (a_sle32_to_cpu(ev->status) == 0) |
1012 | wlan_refresh_inactive_nodes(&wmi->scan_table); | 1012 | wlan_refresh_inactive_nodes(&wmi->parent_dev->scan_table); |
1013 | 1013 | ||
1014 | ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status)); | 1014 | ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status)); |
1015 | wmi->is_probe_ssid = false; | 1015 | wmi->is_probe_ssid = false; |
@@ -2343,7 +2343,7 @@ s32 ath6kl_wmi_get_rate(s8 rate_index) | |||
2343 | void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *bss) | 2343 | void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *bss) |
2344 | { | 2344 | { |
2345 | if (bss) | 2345 | if (bss) |
2346 | wlan_node_return(&wmi->scan_table, bss); | 2346 | wlan_node_return(&wmi->parent_dev->scan_table, bss); |
2347 | } | 2347 | } |
2348 | 2348 | ||
2349 | struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid, | 2349 | struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid, |
@@ -2352,7 +2352,7 @@ struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid, | |||
2352 | { | 2352 | { |
2353 | struct bss *node = NULL; | 2353 | struct bss *node = NULL; |
2354 | 2354 | ||
2355 | node = wlan_find_ssid_node(&wmi->scan_table, ssid, | 2355 | node = wlan_find_ssid_node(&wmi->parent_dev->scan_table, ssid, |
2356 | ssid_len, is_wpa2, match_ssid); | 2356 | ssid_len, is_wpa2, match_ssid); |
2357 | return node; | 2357 | return node; |
2358 | } | 2358 | } |
@@ -2361,7 +2361,7 @@ struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 * mac_addr) | |||
2361 | { | 2361 | { |
2362 | struct bss *ni = NULL; | 2362 | struct bss *ni = NULL; |
2363 | 2363 | ||
2364 | ni = wlan_find_node(&wmi->scan_table, mac_addr); | 2364 | ni = wlan_find_node(&wmi->parent_dev->scan_table, mac_addr); |
2365 | 2365 | ||
2366 | return ni; | 2366 | return ni; |
2367 | } | 2367 | } |
@@ -2370,9 +2370,9 @@ void ath6kl_wmi_node_free(struct wmi *wmi, const u8 * mac_addr) | |||
2370 | { | 2370 | { |
2371 | struct bss *ni = NULL; | 2371 | struct bss *ni = NULL; |
2372 | 2372 | ||
2373 | ni = wlan_find_node(&wmi->scan_table, mac_addr); | 2373 | ni = wlan_find_node(&wmi->parent_dev->scan_table, mac_addr); |
2374 | if (ni != NULL) | 2374 | if (ni != NULL) |
2375 | wlan_node_reclaim(&wmi->scan_table, ni); | 2375 | wlan_node_reclaim(&wmi->parent_dev->scan_table, ni); |
2376 | 2376 | ||
2377 | return; | 2377 | return; |
2378 | } | 2378 | } |
@@ -2736,7 +2736,7 @@ void *ath6kl_wmi_init(struct ath6kl *dev) | |||
2736 | 2736 | ||
2737 | wmi->parent_dev = dev; | 2737 | wmi->parent_dev = dev; |
2738 | 2738 | ||
2739 | wlan_node_table_init(wmi, &wmi->scan_table); | 2739 | wlan_node_table_init(wmi, &dev->scan_table); |
2740 | ath6kl_wmi_qos_state_init(wmi); | 2740 | ath6kl_wmi_qos_state_init(wmi); |
2741 | 2741 | ||
2742 | wmi->pwr_mode = REC_POWER; | 2742 | wmi->pwr_mode = REC_POWER; |
@@ -2756,6 +2756,6 @@ void ath6kl_wmi_shutdown(struct wmi *wmi) | |||
2756 | if (!wmi) | 2756 | if (!wmi) |
2757 | return; | 2757 | return; |
2758 | 2758 | ||
2759 | wlan_node_table_cleanup(&wmi->scan_table); | 2759 | wlan_node_table_cleanup(&wmi->parent_dev->scan_table); |
2760 | kfree(wmi); | 2760 | kfree(wmi); |
2761 | } | 2761 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index afc9be914088..1ef779d0ba7a 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -116,7 +116,6 @@ struct wmi { | |||
116 | u8 fat_pipe_exist; | 116 | u8 fat_pipe_exist; |
117 | struct ath6kl *parent_dev; | 117 | struct ath6kl *parent_dev; |
118 | struct wmi_stats stat; | 118 | struct wmi_stats stat; |
119 | struct ath6kl_node_table scan_table; | ||
120 | u8 bssid[ETH_ALEN]; | 119 | u8 bssid[ETH_ALEN]; |
121 | u8 pwr_mode; | 120 | u8 pwr_mode; |
122 | u8 phy_mode; | 121 | u8 phy_mode; |