aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_netdev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-12-18 20:03:33 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:09:38 -0500
commit5dfdaf58d61f06a458529430c24b1191ea4d1a27 (patch)
treebd3fac57f66e80bf2a31d253af19093f4020ba79 /net/mac80211/debugfs_netdev.c
parent51fb61e76d952e6bc2fbdd9f0d38425fbab1cf31 (diff)
mac80211: add beacon configuration via cfg80211
This patch implements the cfg80211 hooks for configuring beaconing on an access point interface in mac80211. While doing so, it fixes a number of races that could badly crash the machine when the beacon is changed while being requested by the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r--net/mac80211/debugfs_netdev.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index d2d3c076c853..3500fe0d380b 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -124,7 +124,6 @@ __IEEE80211_IF_FILE(flags);
124 124
125/* AP attributes */ 125/* AP attributes */
126IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC); 126IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC);
127IEEE80211_IF_FILE(dtim_period, u.ap.dtim_period, DEC);
128IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC); 127IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC);
129IEEE80211_IF_FILE(num_beacons, u.ap.num_beacons, DEC); 128IEEE80211_IF_FILE(num_beacons, u.ap.num_beacons, DEC);
130IEEE80211_IF_FILE(force_unicast_rateidx, u.ap.force_unicast_rateidx, DEC); 129IEEE80211_IF_FILE(force_unicast_rateidx, u.ap.force_unicast_rateidx, DEC);
@@ -138,26 +137,6 @@ static ssize_t ieee80211_if_fmt_num_buffered_multicast(
138} 137}
139__IEEE80211_IF_FILE(num_buffered_multicast); 138__IEEE80211_IF_FILE(num_buffered_multicast);
140 139
141static ssize_t ieee80211_if_fmt_beacon_head_len(
142 const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
143{
144 if (sdata->u.ap.beacon_head)
145 return scnprintf(buf, buflen, "%d\n",
146 sdata->u.ap.beacon_head_len);
147 return scnprintf(buf, buflen, "\n");
148}
149__IEEE80211_IF_FILE(beacon_head_len);
150
151static ssize_t ieee80211_if_fmt_beacon_tail_len(
152 const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
153{
154 if (sdata->u.ap.beacon_tail)
155 return scnprintf(buf, buflen, "%d\n",
156 sdata->u.ap.beacon_tail_len);
157 return scnprintf(buf, buflen, "\n");
158}
159__IEEE80211_IF_FILE(beacon_tail_len);
160
161/* WDS attributes */ 140/* WDS attributes */
162IEEE80211_IF_FILE(peer, u.wds.remote_addr, MAC); 141IEEE80211_IF_FILE(peer, u.wds.remote_addr, MAC);
163 142
@@ -192,14 +171,11 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
192 DEBUGFS_ADD(drop_unencrypted, ap); 171 DEBUGFS_ADD(drop_unencrypted, ap);
193 DEBUGFS_ADD(ieee802_1x_pac, ap); 172 DEBUGFS_ADD(ieee802_1x_pac, ap);
194 DEBUGFS_ADD(num_sta_ps, ap); 173 DEBUGFS_ADD(num_sta_ps, ap);
195 DEBUGFS_ADD(dtim_period, ap);
196 DEBUGFS_ADD(dtim_count, ap); 174 DEBUGFS_ADD(dtim_count, ap);
197 DEBUGFS_ADD(num_beacons, ap); 175 DEBUGFS_ADD(num_beacons, ap);
198 DEBUGFS_ADD(force_unicast_rateidx, ap); 176 DEBUGFS_ADD(force_unicast_rateidx, ap);
199 DEBUGFS_ADD(max_ratectrl_rateidx, ap); 177 DEBUGFS_ADD(max_ratectrl_rateidx, ap);
200 DEBUGFS_ADD(num_buffered_multicast, ap); 178 DEBUGFS_ADD(num_buffered_multicast, ap);
201 DEBUGFS_ADD(beacon_head_len, ap);
202 DEBUGFS_ADD(beacon_tail_len, ap);
203} 179}
204 180
205static void add_wds_files(struct ieee80211_sub_if_data *sdata) 181static void add_wds_files(struct ieee80211_sub_if_data *sdata)
@@ -281,14 +257,11 @@ static void del_ap_files(struct ieee80211_sub_if_data *sdata)
281 DEBUGFS_DEL(drop_unencrypted, ap); 257 DEBUGFS_DEL(drop_unencrypted, ap);
282 DEBUGFS_DEL(ieee802_1x_pac, ap); 258 DEBUGFS_DEL(ieee802_1x_pac, ap);
283 DEBUGFS_DEL(num_sta_ps, ap); 259 DEBUGFS_DEL(num_sta_ps, ap);
284 DEBUGFS_DEL(dtim_period, ap);
285 DEBUGFS_DEL(dtim_count, ap); 260 DEBUGFS_DEL(dtim_count, ap);
286 DEBUGFS_DEL(num_beacons, ap); 261 DEBUGFS_DEL(num_beacons, ap);
287 DEBUGFS_DEL(force_unicast_rateidx, ap); 262 DEBUGFS_DEL(force_unicast_rateidx, ap);
288 DEBUGFS_DEL(max_ratectrl_rateidx, ap); 263 DEBUGFS_DEL(max_ratectrl_rateidx, ap);
289 DEBUGFS_DEL(num_buffered_multicast, ap); 264 DEBUGFS_DEL(num_buffered_multicast, ap);
290 DEBUGFS_DEL(beacon_head_len, ap);
291 DEBUGFS_DEL(beacon_tail_len, ap);
292} 265}
293 266
294static void del_wds_files(struct ieee80211_sub_if_data *sdata) 267static void del_wds_files(struct ieee80211_sub_if_data *sdata)