Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266611
b: refs/heads/master
c: 457fb04
h: refs/heads/master
i:
  266609: 2c4707f
  266607: fec89b4
v: v3
  • Loading branch information
Jouni Malinen authored and Kalle Valo committed Sep 22, 2011
1 parent 4dc64b6 commit fc39e44
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 423 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1aaa8c7469db14c3cbb0776afda0fb007eb43f46
refs/heads/master: 457fb0415a887b6389854b850e9815cf0ec44178
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ath6kl-y += init.o
ath6kl-y += main.o
ath6kl-y += txrx.o
ath6kl-y += wmi.o
ath6kl-y += node.o
ath6kl-y += sdio.o
ath6kl-$(CONFIG_NL80211_TESTMODE) += testmode.o

Expand Down
52 changes: 0 additions & 52 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,55 +626,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
ar->sme_state = SME_DISCONNECTED;
}

static inline bool is_ch_11a(u16 ch)
{
return (!((ch >= 2412) && (ch <= 2484)));
}

/* struct ath6kl_node_table::nt_nodelock is locked when calling this */
void ath6kl_cfg80211_scan_node(struct wiphy *wiphy, struct bss *ni)
{
struct ieee80211_mgmt *mgmt;
struct ieee80211_channel *channel;
struct ieee80211_supported_band *band;
struct ath6kl_common_ie *cie;
s32 signal;
int freq;

cie = &ni->ni_cie;

if (is_ch_11a(cie->ie_chan))
band = wiphy->bands[IEEE80211_BAND_5GHZ]; /* 11a */
else if ((cie->ie_erp) || (cie->ie_xrates))
band = wiphy->bands[IEEE80211_BAND_2GHZ]; /* 11g */
else
band = wiphy->bands[IEEE80211_BAND_2GHZ]; /* 11b */

freq = cie->ie_chan;
channel = ieee80211_get_channel(wiphy, freq);
signal = ni->ni_snr * 100;

ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
"%s: bssid %pM ch %d freq %d size %d\n", __func__,
ni->ni_macaddr, channel->hw_value, freq, ni->ni_framelen);
/*
* Both Beacon and Probe Response frames have same payload structure,
* so it is fine to share the parser for both.
*/
if (ni->ni_framelen < 8 + 2 + 2)
return;
mgmt = (struct ieee80211_mgmt *) (ni->ni_buf -
offsetof(struct ieee80211_mgmt, u));
cfg80211_inform_bss(wiphy, channel, ni->ni_macaddr,
le64_to_cpu(mgmt->u.beacon.timestamp),
le16_to_cpu(mgmt->u.beacon.capab_info),
le16_to_cpu(mgmt->u.beacon.beacon_int),
mgmt->u.beacon.variable,
ni->ni_buf + ni->ni_framelen -
mgmt->u.beacon.variable,
signal, GFP_ATOMIC);
}

static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_scan_request *request)
{
Expand Down Expand Up @@ -768,9 +719,6 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl *ar, int status)
goto out;
}

/* Translate data to cfg80211 mgmt format */
wlan_iterate_nodes(&ar->scan_table, ar->wdev->wiphy);

cfg80211_scan_done(ar->scan_req, false);

if (ar->scan_req->n_ssids && ar->scan_req->ssids[0].ssid_len) {
Expand Down
83 changes: 0 additions & 83 deletions trunk/drivers/net/wireless/ath/ath6kl/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,94 +75,11 @@ enum crypto_type {
AES_CRYPT = 0x08,
};

#define ATH6KL_NODE_HASHSIZE 32
/* simple hash is enough for variation of macaddr */
#define ATH6KL_NODE_HASH(addr) \
(((const u8 *)(addr))[ETH_ALEN - 1] % \
ATH6KL_NODE_HASHSIZE)

/*
* Table of ath6kl_node instances. Each ieee80211com
* has at least one for holding the scan candidates.
* When operating as an access point or in ibss mode there
* is a second table for associated stations or neighbors.
*/
struct ath6kl_node_table {
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 */
struct bss *nt_hash[ATH6KL_NODE_HASHSIZE];
const char *nt_name; /* for debugging */
u32 nt_node_age; /* node aging time */
};

#define WLAN_NODE_INACT_TIMEOUT_MSEC 120000
#define WLAN_NODE_INACT_CNT 4

struct ath6kl_common_ie {
u16 ie_chan;
u8 *ie_tstamp;
u8 *ie_ssid;
u8 *ie_rates;
u8 *ie_xrates;
u8 *ie_country;
u8 *ie_wpa;
u8 *ie_rsn;
u8 *ie_wmm;
u8 *ie_ath;
u16 ie_capInfo;
u16 ie_beaconInt;
u8 *ie_tim;
u8 *ie_chswitch;
u8 ie_erp;
u8 *ie_wsc;
u8 *ie_htcap;
u8 *ie_htop;
};

struct bss {
u8 ni_macaddr[ETH_ALEN];
u8 ni_snr;
s16 ni_rssi;
struct bss *ni_list_next;
struct bss *ni_list_prev;
struct bss *ni_hash_next;
struct bss *ni_hash_prev;
struct ath6kl_common_ie ni_cie;
u8 *ni_buf;
u16 ni_framelen;
struct ath6kl_node_table *ni_table;
u32 ni_refcnt;

u32 ni_tstamp;
u32 ni_actcnt;
};

struct htc_endpoint_credit_dist;
struct ath6kl;
enum htc_credit_dist_reason;
struct htc_credit_state_info;

struct bss *wlan_node_alloc(int wh_size);
void wlan_node_free(struct bss *ni);
void wlan_setup_node(struct ath6kl_node_table *nt, struct bss *ni,
const u8 *mac_addr);
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 *arg);

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);

struct bss *wlan_find_ssid_node(struct ath6kl_node_table *nt, u8 *ssid,
u32 ssid_len, bool is_wpa2, bool match_ssid);

void wlan_node_return(struct ath6kl_node_table *nt, struct bss *ni);

int ath6k_setup_credit_dist(void *htc_handle,
struct htc_credit_state_info *cred_info);
void ath6k_credit_distribute(struct htc_credit_state_info *cred_inf,
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ struct ath6kl {

struct workqueue_struct *ath6kl_wq;

struct ath6kl_node_table scan_table;
struct dentry *debugfs_phy;

u32 send_action_id;
Expand Down Expand Up @@ -626,5 +625,4 @@ 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 */
5 changes: 0 additions & 5 deletions trunk/drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,8 +1418,6 @@ 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
Expand Down Expand Up @@ -1501,7 +1499,6 @@ static int ath6kl_init(struct net_device *dev)
err_cleanup_scatter:
ath6kl_hif_cleanup_scatter(ar);
err_node_cleanup:
wlan_node_table_cleanup(&ar->scan_table);
ath6kl_wmi_shutdown(ar->wmi);
clear_bit(WMI_ENABLED, &ar->flag);
ar->wmi = NULL;
Expand Down Expand Up @@ -1658,8 +1655,6 @@ void ath6kl_destroy(struct net_device *dev, unsigned int unregister)

free_netdev(dev);

wlan_node_table_cleanup(&ar->scan_table);

kfree(ar->fw_board);
kfree(ar->fw_otp);
kfree(ar->fw);
Expand Down
Loading

0 comments on commit fc39e44

Please sign in to comment.