Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/init.c | 2 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 2 +-
drivers/net/wireless/ath/ath6kl/wmi.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index d574d08..1d6294f 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1053,7 +1053,7 @@ static int ath6kl_init(struct net_device *dev)
/* Indicate that WMI is enabled (although not ready yet) */
set_bit(WMI_ENABLED, &ar->flag);
- ar->wmi = ath6kl_wmi_init((void *) ar);
+ ar->wmi = ath6kl_wmi_init(ar);
if (!ar->wmi) {
ath6kl_err("failed to initialize wmi\n");
status = -EIO;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 6e4febf..9b06a82 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2724,7 +2724,7 @@ static void ath6kl_wmi_qos_state_init(struct wmi *wmi)
spin_unlock_bh(&wmi->lock);
}
-void *ath6kl_wmi_init(void *dev)
+void *ath6kl_wmi_init(struct ath6kl *dev)
{
struct wmi *wmi;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index bbaa704..afc9be9 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -114,7 +114,7 @@ struct wmi {
bool ready;
u16 stream_exist_for_ac[WMM_NUM_AC];
u8 fat_pipe_exist;
- void *parent_dev;
+ struct ath6kl *parent_dev;
struct wmi_stats stat;
struct ath6kl_node_table scan_table;
u8 bssid[ETH_ALEN];
@@ -2018,7 +2018,7 @@ int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag);
int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 rx_meta_version,
bool rx_dot11_hdr, bool defrag_on_host);
-void *ath6kl_wmi_init(void *devt);
+void *ath6kl_wmi_init(struct ath6kl *devt);
void ath6kl_wmi_shutdown(struct wmi *wmi);
#endif /* WMI_H */
--
1.7.0.4
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 +--
drivers/net/wireless/ath/ath6kl/common.h | 1 -
drivers/net/wireless/ath/ath6kl/core.h | 1 +
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index d28e72a..dc299a6 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -721,9 +721,8 @@ static inline bool is_ch_11a(u16 ch)
}
/* struct ath6kl_node_table::nt_nodelock is locked when calling this */
-void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni)
+void ath6kl_cfg80211_scan_node(struct wiphy *wiphy, struct bss *ni)
{
- struct wiphy *wiphy = (struct wiphy *)arg;
u16 size;
unsigned char *ieeemgmtbuf = NULL;
struct ieee80211_mgmt *mgmt;
diff --git a/drivers/net/wireless/ath/ath6kl/common.h b/drivers/net/wireless/ath/ath6kl/common.h
index ab03f44..6b0d456 100644
--- a/drivers/net/wireless/ath/ath6kl/common.h
+++ b/drivers/net/wireless/ath/ath6kl/common.h
@@ -177,5 +177,4 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev);
int ath6kl_core_init(struct ath6kl *ar);
int ath6kl_unavail_ev(struct ath6kl *ar);
struct sk_buff *ath6kl_buf_alloc(int size);
-void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni);
#endif /* COMMON_H */
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index f3f588a..7417022 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -540,4 +540,5 @@ void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no,
void ath6kl_wakeup_event(void *dev);
void ath6kl_target_failure(struct ath6kl *ar);
+void ath6kl_cfg80211_scan_node(struct wiphy *wiphy, struct bss *ni);
#endif /* CORE_H */
--
1.7.0.4
It does not need to be in wmi
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/core.h | 2 ++
drivers/net/wireless/ath/ath6kl/wmi.c | 30 +++++++++++++++---------------
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 6778475..f3f588a 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -455,6 +455,8 @@ struct ath6kl {
size_t fw_patch_len;
struct workqueue_struct *ath6kl_wq;
+
+ struct ath6kl_node_table scan_table;
};
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 9b06a82..2e1b411 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,
void (*f) (void *arg, struct bss *),
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,
@@ -728,7 +728,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL;
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 (bss == NULL)
@@ -777,7 +777,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
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)
* which is done in ath6kl_wlan_parse_beacon
*/
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;
}
@@ -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",
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) {
/* 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);
@@ -900,7 +900,7 @@ static int ath6kl_wmi_opt_frame_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL;
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;
}
@@ -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;
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));
wmi->is_probe_ssid = false;
@@ -2343,7 +2343,7 @@ s32 ath6kl_wmi_get_rate(s8 rate_index)
void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *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,
@@ -2352,7 +2352,7 @@ struct bss *ath6kl_wmi_find_ssid_node(struct wmi *wmi, u8 * ssid,
{
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);
return node;
}
@@ -2361,7 +2361,7 @@ struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 * mac_addr)
{
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;
}
@@ -2370,9 +2370,9 @@ void ath6kl_wmi_node_free(struct wmi *wmi, const u8 * mac_addr)
{
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)
- wlan_node_reclaim(&wmi->scan_table, ni);
+ wlan_node_reclaim(&wmi->parent_dev->scan_table, ni);
return;
}
@@ -2736,7 +2736,7 @@ void *ath6kl_wmi_init(struct ath6kl *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);
wmi->pwr_mode = REC_POWER;
@@ -2756,6 +2756,6 @@ void ath6kl_wmi_shutdown(struct wmi *wmi)
if (!wmi)
return;
- wlan_node_table_cleanup(&wmi->scan_table);
+ wlan_node_table_cleanup(&wmi->parent_dev->scan_table);
kfree(wmi);
}
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index afc9be9..1ef779d 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -116,7 +116,6 @@ struct wmi {
u8 fat_pipe_exist;
struct ath6kl *parent_dev;
struct wmi_stats stat;
- struct ath6kl_node_table scan_table;
u8 bssid[ETH_ALEN];
u8 pwr_mode;
u8 phy_mode;
--
1.7.0.4
And remove the reference to wmi in ath6kl_node_table.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/common.h | 3 +--
drivers/net/wireless/ath/ath6kl/node.c | 6 +++---
drivers/net/wireless/ath/ath6kl/wmi.c | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/common.h b/drivers/net/wireless/ath/ath6kl/common.h
index 0a3a1d8..cc8b040 100644
--- a/drivers/net/wireless/ath/ath6kl/common.h
+++ b/drivers/net/wireless/ath/ath6kl/common.h
@@ -88,7 +88,6 @@ enum crypto_type {
* is a second table for associated stations or neighbors.
*/
struct ath6kl_node_table {
- void *nt_wmi; /* back reference */
spinlock_t nt_nodelock; /* on node table */
struct bss *nt_node_first; /* information of all nodes */
struct bss *nt_node_last; /* information of all nodes */
@@ -159,7 +158,7 @@ void wlan_iterate_nodes(struct ath6kl_node_table *nt,
void wlan_node_table_init(void *wmip, struct ath6kl_node_table *nt);
void wlan_node_table_cleanup(struct ath6kl_node_table *nt);
-void wlan_refresh_inactive_nodes(struct ath6kl_node_table *nt);
+void wlan_refresh_inactive_nodes(struct ath6kl *ar);
struct bss *wlan_find_ssid_node(struct ath6kl_node_table *nt, u8 *ssid,
u32 ssid_len, bool is_wpa2, bool match_ssid);
diff --git a/drivers/net/wireless/ath/ath6kl/node.c b/drivers/net/wireless/ath/ath6kl/node.c
index b0f9ba2..533588c 100644
--- a/drivers/net/wireless/ath/ath6kl/node.c
+++ b/drivers/net/wireless/ath/ath6kl/node.c
@@ -169,17 +169,17 @@ void wlan_node_table_init(void *wmi, struct ath6kl_node_table *nt)
spin_lock_init(&nt->nt_nodelock);
- nt->nt_wmi = wmi;
nt->nt_node_age = WLAN_NODE_INACT_TIMEOUT_MSEC;
}
-void wlan_refresh_inactive_nodes(struct ath6kl_node_table *nt)
+void wlan_refresh_inactive_nodes(struct ath6kl *ar)
{
+ struct ath6kl_node_table *nt = &ar->scan_table;
struct bss *bss;
u8 my_bssid[ETH_ALEN];
u32 now;
- ath6kl_wmi_get_current_bssid(nt->nt_wmi, my_bssid);
+ ath6kl_wmi_get_current_bssid(ar->wmi, my_bssid);
now = jiffies_to_msecs(jiffies);
bss = nt->nt_node_first;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 2e1b411..ea123c9 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -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;
if (a_sle32_to_cpu(ev->status) == 0)
- wlan_refresh_inactive_nodes(&wmi->parent_dev->scan_table);
+ wlan_refresh_inactive_nodes(wmi->parent_dev);
ath6kl_scan_complete_evt(wmi->parent_dev, a_sle32_to_cpu(ev->status));
wmi->is_probe_ssid = false;
--
1.7.0.4
By having scan_table in struct ath6kl, it makes sense to move initialization
to ath6kl_init() and deinitialization to ath6kl_destroy().
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/init.c | 9 +++++++--
drivers/net/wireless/ath/ath6kl/wmi.c | 2 --
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 1d6294f..e8ec617 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1062,6 +1062,8 @@ static int ath6kl_init(struct net_device *dev)
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: got wmi @ 0x%p.\n", __func__, ar->wmi);
+ wlan_node_table_init(&ar->scan_table);
+
/*
* The reason we have to wait for the target here is that the
* driver layer has to init BMI in order to set the host block
@@ -1069,7 +1071,7 @@ static int ath6kl_init(struct net_device *dev)
*/
if (htc_wait_target(ar->htc_target)) {
status = -EIO;
- goto err_wmi_cleanup;
+ goto err_node_cleanup;
}
if (ath6kl_init_service_ep(ar)) {
@@ -1142,7 +1144,8 @@ err_rxbuf_cleanup:
ath6kl_cleanup_amsdu_rxbufs(ar);
err_cleanup_scatter:
ath6kl_hif_cleanup_scatter(ar);
-err_wmi_cleanup:
+err_node_cleanup:
+ wlan_node_table_cleanup(&ar->scan_table);
ath6kl_wmi_shutdown(ar->wmi);
clear_bit(WMI_ENABLED, &ar->flag);
ar->wmi = NULL;
@@ -1289,5 +1292,7 @@ void ath6kl_destroy(struct net_device *dev, unsigned int unregister)
free_netdev(dev);
+ wlan_node_table_cleanup(&ar->scan_table);
+
ath6kl_cfg80211_deinit(ar);
}
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 6f145d4..742eaa1 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2727,7 +2727,6 @@ void *ath6kl_wmi_init(struct ath6kl *dev)
wmi->parent_dev = dev;
- wlan_node_table_init(&dev->scan_table);
ath6kl_wmi_qos_state_init(wmi);
wmi->pwr_mode = REC_POWER;
@@ -2747,6 +2746,5 @@ void ath6kl_wmi_shutdown(struct wmi *wmi)
if (!wmi)
return;
- wlan_node_table_cleanup(&wmi->parent_dev->scan_table);
kfree(wmi);
}
--
1.7.0.4
This is nothing but bssid of struct ath6kl.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/wmi.c | 7 ++-----
drivers/net/wireless/ath/ath6kl/wmi.h | 1 -
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index ea123c9..ff71b7f 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -498,8 +498,6 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len)
ath6kl_dbg(ATH6KL_DBG_WMI, "%s: freq %d bssid %pM\n",
__func__, ev->ch, ev->bssid);
- memcpy(wmi->bssid, ev->bssid, ETH_ALEN);
-
/* Start of assoc rsp IEs */
pie = ev->assoc_info + ev->beacon_ie_len +
ev->assoc_req_len + (sizeof(u16) * 3); /* capinfo, status, aid */
@@ -546,7 +544,6 @@ static int ath6kl_wmi_disconnect_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL;
ev = (struct wmi_disconnect_event *) datap;
- memset(wmi->bssid, 0, sizeof(wmi->bssid));
wmi->is_wmm_enabled = false;
wmi->pair_crypto_type = NONE_CRYPT;
@@ -772,7 +769,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
* instance value of scan result. It also sync up RSSI info
* in GUI between scan result and RSSI signal icon.
*/
- if (memcmp(wmi->bssid, bih->bssid, ETH_ALEN) == 0) {
+ if (memcmp(wmi->parent_dev->bssid, bih->bssid, ETH_ALEN) == 0) {
bih->rssi = a_cpu_to_sle16(bss->ni_rssi);
bih->snr = bss->ni_snr;
}
@@ -2253,7 +2250,7 @@ int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi)
void ath6kl_wmi_get_current_bssid(struct wmi *wmi, u8 *bssid)
{
if (bssid)
- memcpy(bssid, wmi->bssid, ETH_ALEN);
+ memcpy(bssid, wmi->parent_dev->bssid, ETH_ALEN);
}
int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, u8 preamble_policy)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 1ef779d..1646a92 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -116,7 +116,6 @@ struct wmi {
u8 fat_pipe_exist;
struct ath6kl *parent_dev;
struct wmi_stats stat;
- u8 bssid[ETH_ALEN];
u8 pwr_mode;
u8 phy_mode;
u8 keep_alive_intvl;
--
1.7.0.4
Use the bssid from ath6kl directly.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/node.c | 5 +----
drivers/net/wireless/ath/ath6kl/wmi.c | 6 ------
drivers/net/wireless/ath/ath6kl/wmi.h | 1 -
3 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/node.c b/drivers/net/wireless/ath/ath6kl/node.c
index 533588c..9611541 100644
--- a/drivers/net/wireless/ath/ath6kl/node.c
+++ b/drivers/net/wireless/ath/ath6kl/node.c
@@ -176,16 +176,13 @@ void wlan_refresh_inactive_nodes(struct ath6kl *ar)
{
struct ath6kl_node_table *nt = &ar->scan_table;
struct bss *bss;
- u8 my_bssid[ETH_ALEN];
u32 now;
- ath6kl_wmi_get_current_bssid(ar->wmi, my_bssid);
-
now = jiffies_to_msecs(jiffies);
bss = nt->nt_node_first;
while (bss != NULL) {
/* refresh all nodes except the current bss */
- if (memcmp(my_bssid, bss->ni_macaddr, sizeof(my_bssid)) != 0) {
+ if (memcmp(ar->bssid, bss->ni_macaddr, ETH_ALEN) != 0) {
if (((now - bss->ni_tstamp) > nt->nt_node_age)
|| --bss->ni_actcnt == 0) {
wlan_node_reclaim(nt, bss);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index ff71b7f..50cee9b 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2247,12 +2247,6 @@ int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi)
return ath6kl_wmi_simple_cmd(wmi, WMI_GET_TX_PWR_CMDID);
}
-void ath6kl_wmi_get_current_bssid(struct wmi *wmi, u8 *bssid)
-{
- if (bssid)
- memcpy(bssid, wmi->parent_dev->bssid, ETH_ALEN);
-}
-
int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 status, u8 preamble_policy)
{
struct sk_buff *skb;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 1646a92..991d29f 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1995,7 +1995,6 @@ int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, const u8 *bssid,
const u8 *pmkid, bool set);
int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 dbM);
int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi);
-void ath6kl_wmi_get_current_bssid(struct wmi *wmi, u8 *bssid);
int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, enum wmi_txop_cfg cfg);
int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 keep_alive_intvl);
--
1.7.0.4
Use wlan_iterate_nodes() directly.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++--
drivers/net/wireless/ath/ath6kl/wmi.c | 7 -------
drivers/net/wireless/ath/ath6kl/wmi.h | 3 ---
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 9eaa1b1..cf5ab55 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -833,8 +833,8 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status)
}
/* Translate data to cfg80211 mgmt format */
- ath6kl_wmi_iterate_nodes(&ar->scan_table, ath6kl_cfg80211_scan_node,
- ar->wdev->wiphy);
+ wlan_iterate_nodes(&ar->scan_table, ath6kl_cfg80211_scan_node,
+ ar->wdev->wiphy);
cfg80211_scan_done(ar->scan_req, false);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 6a6f79c..f5aa33d 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -386,13 +386,6 @@ int ath6kl_wmi_data_hdr_remove(struct wmi *wmi, struct sk_buff *skb)
return 0;
}
-void ath6kl_wmi_iterate_nodes(struct ath6kl_node_table *scan_tbl,
- void (*f) (void *arg, struct bss *),
- void *arg)
-{
- wlan_iterate_nodes(scan_tbl, f, arg);
-}
-
static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb,
u8 *datap)
{
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index a9f8f9e..fe3ddce 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1931,9 +1931,6 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb,
u8 *ac);
int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb);
-void ath6kl_wmi_iterate_nodes(struct ath6kl_node_table *scan_tbl,
- void (*f) (void *arg, struct bss *),
- void *arg);
struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 *mac_addr);
void ath6kl_wmi_node_free(struct wmi *wmi, const u8 *mac_addr);
--
1.7.0.4
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/common.h | 2 +-
drivers/net/wireless/ath/ath6kl/node.c | 2 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/common.h b/drivers/net/wireless/ath/ath6kl/common.h
index cc8b040..e37ae9b 100644
--- a/drivers/net/wireless/ath/ath6kl/common.h
+++ b/drivers/net/wireless/ath/ath6kl/common.h
@@ -155,7 +155,7 @@ void wlan_iterate_nodes(struct ath6kl_node_table *nt,
void (*f) (void *arg, struct bss *),
void *arg);
-void wlan_node_table_init(void *wmip, struct ath6kl_node_table *nt);
+void wlan_node_table_init(struct ath6kl_node_table *nt);
void wlan_node_table_cleanup(struct ath6kl_node_table *nt);
void wlan_refresh_inactive_nodes(struct ath6kl *ar);
diff --git a/drivers/net/wireless/ath/ath6kl/node.c b/drivers/net/wireless/ath/ath6kl/node.c
index 9611541..7c9fbde 100644
--- a/drivers/net/wireless/ath/ath6kl/node.c
+++ b/drivers/net/wireless/ath/ath6kl/node.c
@@ -160,7 +160,7 @@ void wlan_iterate_nodes(struct ath6kl_node_table *nt,
spin_unlock_bh(&nt->nt_nodelock);
}
-void wlan_node_table_init(void *wmi, struct ath6kl_node_table *nt)
+void wlan_node_table_init(struct ath6kl_node_table *nt)
{
ath6kl_dbg(ATH6KL_DBG_WLAN_NODE, "node table = 0x%lx\n",
(unsigned long)nt);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 50cee9b..6f145d4 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2727,7 +2727,7 @@ void *ath6kl_wmi_init(struct ath6kl *dev)
wmi->parent_dev = dev;
- wlan_node_table_init(wmi, &dev->scan_table);
+ wlan_node_table_init(&dev->scan_table);
ath6kl_wmi_qos_state_init(wmi);
wmi->pwr_mode = REC_POWER;
--
1.7.0.4
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 5 ++---
drivers/net/wireless/ath/ath6kl/common.h | 5 ++---
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 cf5ab55..d28e72a 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)
}
/* struct ath6kl_node_table::nt_nodelock is locked when calling this */
-static void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni)
+void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni)
{
struct wiphy *wiphy = (struct wiphy *)arg;
u16 size;
@@ -833,8 +833,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status)
}
/* Translate data to cfg80211 mgmt format */
- wlan_iterate_nodes(&ar->scan_table, ath6kl_cfg80211_scan_node,
- ar->wdev->wiphy);
+ wlan_iterate_nodes(&ar->scan_table, ar->wdev->wiphy);
cfg80211_scan_done(ar->scan_req, false);
diff --git a/drivers/net/wireless/ath/ath6kl/common.h b/drivers/net/wireless/ath/ath6kl/common.h
index e37ae9b..ab03f44 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,
const u8 *mac_addr);
void wlan_node_reclaim(struct ath6kl_node_table *nt, struct bss *ni);
void wlan_free_allnodes(struct ath6kl_node_table *nt);
-void wlan_iterate_nodes(struct ath6kl_node_table *nt,
- void (*f) (void *arg, struct bss *),
- void *arg);
+void wlan_iterate_nodes(struct ath6kl_node_table *nt, void *arg);
void wlan_node_table_init(struct ath6kl_node_table *nt);
void wlan_node_table_cleanup(struct ath6kl_node_table *nt);
@@ -179,4 +177,5 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev);
int ath6kl_core_init(struct ath6kl *ar);
int ath6kl_unavail_ev(struct ath6kl *ar);
struct sk_buff *ath6kl_buf_alloc(int size);
+void ath6kl_cfg80211_scan_node(void *arg, struct bss *ni);
#endif /* COMMON_H */
diff --git a/drivers/net/wireless/ath/ath6kl/node.c b/drivers/net/wireless/ath/ath6kl/node.c
index 7c9fbde..131205c 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)
wlan_node_reclaim(nt, ni);
}
-void wlan_iterate_nodes(struct ath6kl_node_table *nt,
- void (*f) (void *arg, struct bss *), void *arg)
+void wlan_iterate_nodes(struct ath6kl_node_table *nt, void *arg)
{
struct bss *ni;
spin_lock_bh(&nt->nt_nodelock);
for (ni = nt->nt_node_first; ni; ni = ni->ni_list_next) {
ni->ni_refcnt++;
- (*f) (arg, ni);
+ ath6kl_cfg80211_scan_node(arg, ni);
wlan_node_dec_free(ni);
}
spin_unlock_bh(&nt->nt_nodelock);
--
1.7.0.4
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 4 ++--
drivers/net/wireless/ath/ath6kl/wmi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index d1d4794..9eaa1b1 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -833,7 +833,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status)
}
/* Translate data to cfg80211 mgmt format */
- ath6kl_wmi_iterate_nodes(ar->wmi, ath6kl_cfg80211_scan_node,
+ ath6kl_wmi_iterate_nodes(&ar->scan_table, ath6kl_cfg80211_scan_node,
ar->wdev->wiphy);
cfg80211_scan_done(ar->scan_req, false);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 742eaa1..6a6f79c 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -386,11 +386,11 @@ int ath6kl_wmi_data_hdr_remove(struct wmi *wmi, struct sk_buff *skb)
return 0;
}
-void ath6kl_wmi_iterate_nodes(struct wmi *wmi,
+void ath6kl_wmi_iterate_nodes(struct ath6kl_node_table *scan_tbl,
void (*f) (void *arg, struct bss *),
void *arg)
{
- wlan_iterate_nodes(&wmi->parent_dev->scan_table, f, arg);
+ wlan_iterate_nodes(scan_tbl, f, arg);
}
static void ath6kl_wmi_convert_bssinfo_hdr2_to_hdr(struct sk_buff *skb,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 991d29f..a9f8f9e 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -1931,7 +1931,7 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, struct sk_buff *skb,
u8 *ac);
int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb);
-void ath6kl_wmi_iterate_nodes(struct wmi *wmi,
+void ath6kl_wmi_iterate_nodes(struct ath6kl_node_table *scan_tbl,
void (*f) (void *arg, struct bss *),
void *arg);
struct bss *ath6kl_wmi_find_node(struct wmi *wmi, const u8 *mac_addr);
--
1.7.0.4