Commit c1b6cf4e authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: remove beacon counters

The beacon counters mac80211 keeps are only used for debugfs,
unfortunately, they are incorrect for many hardware designs,
namely any design that has a beacon template. Hence, remove the
counters so we don't create the impression they are usable.

This also allows removing the beacon MESH #ifdef again.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 62c1f95e
...@@ -173,7 +173,6 @@ IEEE80211_IF_FILE(assoc_tries, u.sta.assoc_tries, DEC); ...@@ -173,7 +173,6 @@ IEEE80211_IF_FILE(assoc_tries, u.sta.assoc_tries, DEC);
IEEE80211_IF_FILE(auth_algs, u.sta.auth_algs, HEX); IEEE80211_IF_FILE(auth_algs, u.sta.auth_algs, HEX);
IEEE80211_IF_FILE(auth_alg, u.sta.auth_alg, DEC); IEEE80211_IF_FILE(auth_alg, u.sta.auth_alg, DEC);
IEEE80211_IF_FILE(auth_transaction, u.sta.auth_transaction, DEC); IEEE80211_IF_FILE(auth_transaction, u.sta.auth_transaction, DEC);
IEEE80211_IF_FILE(num_beacons_sta, u.sta.num_beacons, DEC);
static ssize_t ieee80211_if_fmt_flags( static ssize_t ieee80211_if_fmt_flags(
const struct ieee80211_sub_if_data *sdata, char *buf, int buflen) const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
...@@ -192,7 +191,6 @@ __IEEE80211_IF_FILE(flags); ...@@ -192,7 +191,6 @@ __IEEE80211_IF_FILE(flags);
/* AP attributes */ /* AP attributes */
IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC); IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC);
IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC); IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC);
IEEE80211_IF_FILE(num_beacons, u.ap.num_beacons, DEC);
static ssize_t ieee80211_if_fmt_num_buffered_multicast( static ssize_t ieee80211_if_fmt_num_buffered_multicast(
const struct ieee80211_sub_if_data *sdata, char *buf, int buflen) const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
...@@ -265,7 +263,6 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) ...@@ -265,7 +263,6 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(auth_alg, sta); DEBUGFS_ADD(auth_alg, sta);
DEBUGFS_ADD(auth_transaction, sta); DEBUGFS_ADD(auth_transaction, sta);
DEBUGFS_ADD(flags, sta); DEBUGFS_ADD(flags, sta);
DEBUGFS_ADD(num_beacons_sta, sta);
} }
static void add_ap_files(struct ieee80211_sub_if_data *sdata) static void add_ap_files(struct ieee80211_sub_if_data *sdata)
...@@ -276,7 +273,6 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata) ...@@ -276,7 +273,6 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(num_sta_ps, ap); DEBUGFS_ADD(num_sta_ps, ap);
DEBUGFS_ADD(dtim_count, ap); DEBUGFS_ADD(dtim_count, ap);
DEBUGFS_ADD(num_beacons, ap);
DEBUGFS_ADD(num_buffered_multicast, ap); DEBUGFS_ADD(num_buffered_multicast, ap);
} }
...@@ -398,7 +394,6 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata) ...@@ -398,7 +394,6 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_DEL(auth_alg, sta); DEBUGFS_DEL(auth_alg, sta);
DEBUGFS_DEL(auth_transaction, sta); DEBUGFS_DEL(auth_transaction, sta);
DEBUGFS_DEL(flags, sta); DEBUGFS_DEL(flags, sta);
DEBUGFS_DEL(num_beacons_sta, sta);
} }
static void del_ap_files(struct ieee80211_sub_if_data *sdata) static void del_ap_files(struct ieee80211_sub_if_data *sdata)
...@@ -409,7 +404,6 @@ static void del_ap_files(struct ieee80211_sub_if_data *sdata) ...@@ -409,7 +404,6 @@ static void del_ap_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_DEL(num_sta_ps, ap); DEBUGFS_DEL(num_sta_ps, ap);
DEBUGFS_DEL(dtim_count, ap); DEBUGFS_DEL(dtim_count, ap);
DEBUGFS_DEL(num_beacons, ap);
DEBUGFS_DEL(num_buffered_multicast, ap); DEBUGFS_DEL(num_buffered_multicast, ap);
} }
......
...@@ -229,7 +229,6 @@ struct ieee80211_if_ap { ...@@ -229,7 +229,6 @@ struct ieee80211_if_ap {
struct sk_buff_head ps_bc_buf; struct sk_buff_head ps_bc_buf;
atomic_t num_sta_ps; /* number of stations in PS mode */ atomic_t num_sta_ps; /* number of stations in PS mode */
int dtim_count; int dtim_count;
int num_beacons; /* number of TXed beacon frames for this BSS */
}; };
struct ieee80211_if_wds { struct ieee80211_if_wds {
...@@ -352,7 +351,6 @@ struct ieee80211_if_sta { ...@@ -352,7 +351,6 @@ struct ieee80211_if_sta {
u32 supp_rates_bits[IEEE80211_NUM_BANDS]; u32 supp_rates_bits[IEEE80211_NUM_BANDS];
int wmm_last_param_set; int wmm_last_param_set;
int num_beacons; /* number of TXed beacon frames by this STA */
}; };
struct ieee80211_if_mesh { struct ieee80211_if_mesh {
...@@ -388,7 +386,6 @@ struct ieee80211_if_mesh { ...@@ -388,7 +386,6 @@ struct ieee80211_if_mesh {
struct mesh_config mshcfg; struct mesh_config mshcfg;
u32 mesh_seqnum; u32 mesh_seqnum;
bool accepting_plinks; bool accepting_plinks;
int num_beacons;
}; };
#ifdef CONFIG_MAC80211_MESH #ifdef CONFIG_MAC80211_MESH
...@@ -484,7 +481,6 @@ struct ieee80211_sub_if_data { ...@@ -484,7 +481,6 @@ struct ieee80211_sub_if_data {
struct dentry *auth_alg; struct dentry *auth_alg;
struct dentry *auth_transaction; struct dentry *auth_transaction;
struct dentry *flags; struct dentry *flags;
struct dentry *num_beacons_sta;
struct dentry *force_unicast_rateidx; struct dentry *force_unicast_rateidx;
struct dentry *max_ratectrl_rateidx; struct dentry *max_ratectrl_rateidx;
} sta; } sta;
...@@ -492,7 +488,6 @@ struct ieee80211_sub_if_data { ...@@ -492,7 +488,6 @@ struct ieee80211_sub_if_data {
struct dentry *drop_unencrypted; struct dentry *drop_unencrypted;
struct dentry *num_sta_ps; struct dentry *num_sta_ps;
struct dentry *dtim_count; struct dentry *dtim_count;
struct dentry *num_beacons;
struct dentry *force_unicast_rateidx; struct dentry *force_unicast_rateidx;
struct dentry *max_ratectrl_rateidx; struct dentry *max_ratectrl_rateidx;
struct dentry *num_buffered_multicast; struct dentry *num_buffered_multicast;
......
...@@ -1864,7 +1864,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1864,7 +1864,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
struct rate_selection rsel; struct rate_selection rsel;
struct beacon_data *beacon; struct beacon_data *beacon;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int *num_beacons;
enum ieee80211_band band = local->hw.conf.channel->band; enum ieee80211_band band = local->hw.conf.channel->band;
sband = local->hw.wiphy->bands[band]; sband = local->hw.wiphy->bands[band];
...@@ -1912,8 +1911,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1912,8 +1911,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
if (beacon->tail) if (beacon->tail)
memcpy(skb_put(skb, beacon->tail_len), memcpy(skb_put(skb, beacon->tail_len),
beacon->tail, beacon->tail_len); beacon->tail, beacon->tail_len);
num_beacons = &ap->num_beacons;
} else } else
goto out; goto out;
} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
...@@ -1931,8 +1928,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1931,8 +1928,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_BEACON); IEEE80211_STYPE_BEACON);
num_beacons = &ifsta->num_beacons;
#ifdef CONFIG_MAC80211_MESH
} else if (ieee80211_vif_is_mesh(&sdata->vif)) { } else if (ieee80211_vif_is_mesh(&sdata->vif)) {
struct ieee80211_mgmt *mgmt; struct ieee80211_mgmt *mgmt;
u8 *pos; u8 *pos;
...@@ -1960,9 +1955,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1960,9 +1955,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
*pos++ = 0x0; *pos++ = 0x0;
mesh_mgmt_ies_add(skb, sdata); mesh_mgmt_ies_add(skb, sdata);
num_beacons = &sdata->u.mesh.num_beacons;
#endif
} else { } else {
WARN_ON(1); WARN_ON(1);
goto out; goto out;
...@@ -1999,7 +1991,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1999,7 +1991,6 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
info->antenna_sel_tx = local->hw.conf.antenna_sel_tx; info->antenna_sel_tx = local->hw.conf.antenna_sel_tx;
info->control.retry_limit = 1; info->control.retry_limit = 1;
(*num_beacons)++;
out: out:
rcu_read_unlock(); rcu_read_unlock();
return skb; return skb;
......
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