Commit 7c3075e9 authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Kalle Valo

ath6kl: Move scan table from wmi to ath6kl

It does not need to be in wmi
Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 2865785e
...@@ -455,6 +455,8 @@ struct ath6kl { ...@@ -455,6 +455,8 @@ struct ath6kl {
size_t fw_patch_len; size_t fw_patch_len;
struct workqueue_struct *ath6kl_wq; struct workqueue_struct *ath6kl_wq;
struct ath6kl_node_table scan_table;
}; };
static inline void *ath6kl_priv(struct net_device *dev) static inline void *ath6kl_priv(struct net_device *dev)
......
...@@ -390,7 +390,7 @@ void ath6kl_wmi_iterate_nodes(struct wmi *wmi, ...@@ -390,7 +390,7 @@ void ath6kl_wmi_iterate_nodes(struct wmi *wmi,
void (*f) (void *arg, struct bss *), void (*f) (void *arg, struct bss *),
void *arg) void *arg)
{ {
wlan_iterate_nodes(&wmi->scan_table, f, arg); wlan_iterate_nodes(&wmi->parent_dev->scan_table, f, arg);
} }
static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb, 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,7 +728,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL; return -EINVAL;
bih = (struct wmi_bss_info_hdr *) datap; bih = (struct wmi_bss_info_hdr *) datap;
bss = wlan_find_node(&wmi->scan_table, bih->bssid); bss = wlan_find_node(&wmi->parent_dev->scan_table, bih->bssid);
if (a_sle16_to_cpu(bih->rssi) > 0) { if (a_sle16_to_cpu(bih->rssi) > 0) {
if (bss == NULL) if (bss == NULL)
...@@ -777,7 +777,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -777,7 +777,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
bih->snr = bss->ni_snr; bih->snr = bss->ni_snr;
} }
wlan_node_reclaim(&wmi->scan_table, bss); wlan_node_reclaim(&wmi->parent_dev->scan_table, bss);
} }
/* /*
...@@ -862,7 +862,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -862,7 +862,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
* which is done in ath6kl_wlan_parse_beacon * which is done in ath6kl_wlan_parse_beacon
*/ */
bss->ni_cie.ie_chan = le16_to_cpu(bih->ch); bss->ni_cie.ie_chan = le16_to_cpu(bih->ch);
wlan_setup_node(&wmi->scan_table, bss, bih->bssid); wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid);
return 0; return 0;
} }
...@@ -883,10 +883,10 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -883,10 +883,10 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len)
ath6kl_dbg(ATH6KL_DBG_WMI, "opt frame event %2.2x:%2.2x\n", ath6kl_dbg(ATH6KL_DBG_WMI, "opt frame event %2.2x:%2.2x\n",
bih->bssid[4], bih->bssid[5]); bih->bssid[4], bih->bssid[5]);
bss = wlan_find_node(&wmi->scan_table, bih->bssid); bss = wlan_find_node(&wmi->parent_dev->scan_table, bih->bssid);
if (bss != NULL) { if (bss != NULL) {
/* Free up the node. We are about to allocate a new node. */ /* Free up the node. We are about to allocate a new node. */
wlan_node_reclaim(&wmi->scan_table, bss); wlan_node_reclaim(&wmi->parent_dev->scan_table, bss);
} }
bss = wlan_node_alloc(len); 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,7 +900,7 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL; return -EINVAL;
memcpy(bss->ni_buf, buf, len); memcpy(bss->ni_buf, buf, len);
wlan_setup_node(&wmi->scan_table, bss, bih->bssid); wlan_setup_node(&wmi->parent_dev->scan_table, bss, bih->bssid);
return 0; return 0;
} }
...@@ -1009,7 +1009,7 @@ static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len) ...@@ -1009,7 +1009,7 @@ static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len)
ev = (struct wmi_scan_complete_event *) datap; ev = (struct wmi_scan_complete_event *) datap;
if (a_sle32_to_cpu(ev->status) == 0) if (a_sle32_to_cpu(ev->status) == 0)
wlan_refresh_inactive_nodes(&wmi->scan_table); wlan_refresh_inactive_nodes(&wmi->parent_dev->scan_table);
ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status)); ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status));
wmi->is_probe_ssid = false; wmi->is_probe_ssid = false;
...@@ -2343,7 +2343,7 @@ s32 ath6kl_wmi_get_rate(s8 rate_index) ...@@ -2343,7 +2343,7 @@ s32 ath6kl_wmi_get_rate(s8 rate_index)
void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *bss) void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *bss)
{ {
if (bss) if (bss)
wlan_node_return(&wmi->scan_table, bss); wlan_node_return(&wmi->parent_dev->scan_table, bss);
} }
struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid, 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,7 +2352,7 @@ struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid,
{ {
struct bss *node = NULL; struct bss *node = NULL;
node = wlan_find_ssid_node(&wmi->scan_table, ssid, node = wlan_find_ssid_node(&wmi->parent_dev->scan_table, ssid,
ssid_len, is_wpa2, match_ssid); ssid_len, is_wpa2, match_ssid);
return node; return node;
} }
...@@ -2361,7 +2361,7 @@ struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 * mac_addr) ...@@ -2361,7 +2361,7 @@ struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 * mac_addr)
{ {
struct bss *ni = NULL; struct bss *ni = NULL;
ni = wlan_find_node(&wmi->scan_table, mac_addr); ni = wlan_find_node(&wmi->parent_dev->scan_table, mac_addr);
return ni; return ni;
} }
...@@ -2370,9 +2370,9 @@ void ath6kl_wmi_node_free(struct wmi *wmi, const u8 * mac_addr) ...@@ -2370,9 +2370,9 @@ void ath6kl_wmi_node_free(struct wmi *wmi, const u8 * mac_addr)
{ {
struct bss *ni = NULL; struct bss *ni = NULL;
ni = wlan_find_node(&wmi->scan_table, mac_addr); ni = wlan_find_node(&wmi->parent_dev->scan_table, mac_addr);
if (ni != NULL) if (ni != NULL)
wlan_node_reclaim(&wmi->scan_table, ni); wlan_node_reclaim(&wmi->parent_dev->scan_table, ni);
return; return;
} }
...@@ -2736,7 +2736,7 @@ void *ath6kl_wmi_init(struct ath6kl *dev) ...@@ -2736,7 +2736,7 @@ void *ath6kl_wmi_init(struct ath6kl *dev)
wmi->parent_dev = dev; wmi->parent_dev = dev;
wlan_node_table_init(wmi, &wmi->scan_table); wlan_node_table_init(wmi, &dev->scan_table);
ath6kl_wmi_qos_state_init(wmi); ath6kl_wmi_qos_state_init(wmi);
wmi->pwr_mode = REC_POWER; wmi->pwr_mode = REC_POWER;
...@@ -2756,6 +2756,6 @@ void ath6kl_wmi_shutdown(struct wmi *wmi) ...@@ -2756,6 +2756,6 @@ void ath6kl_wmi_shutdown(struct wmi *wmi)
if (!wmi) if (!wmi)
return; return;
wlan_node_table_cleanup(&wmi->scan_table); wlan_node_table_cleanup(&wmi->parent_dev->scan_table);
kfree(wmi); kfree(wmi);
} }
...@@ -116,7 +116,6 @@ struct wmi { ...@@ -116,7 +116,6 @@ struct wmi {
u8 fat_pipe_exist; u8 fat_pipe_exist;
struct ath6kl *parent_dev; struct ath6kl *parent_dev;
struct wmi_stats stat; struct wmi_stats stat;
struct ath6kl_node_table scan_table;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
u8 pwr_mode; u8 pwr_mode;
u8 phy_mode; u8 phy_mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment