1 Subject: mac80211: remove aggregation status write support from debugfs
3 This code uses static variables and thus cannot be kept.
5 Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
7 net/mac80211/debugfs_sta.c | 73 ---------------------------------------------
8 1 file changed, 1 insertion(+), 72 deletions(-)
10 --- everything.orig/net/mac80211/debugfs_sta.c 2008-10-07 20:06:39.000000000 +0200
11 +++ everything/net/mac80211/debugfs_sta.c 2008-10-07 20:06:40.000000000 +0200
12 @@ -39,13 +39,6 @@ static const struct file_operations sta_
13 .open = mac80211_open_file_generic, \
16 -#define STA_OPS_WR(name) \
17 -static const struct file_operations sta_ ##name## _ops = { \
18 - .read = sta_##name##_read, \
19 - .write = sta_##name##_write, \
20 - .open = mac80211_open_file_generic, \
23 #define STA_FILE(name, field, format) \
24 STA_READ_##format(name, field) \
26 @@ -168,71 +161,7 @@ static ssize_t sta_agg_status_read(struc
28 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
31 -static ssize_t sta_agg_status_write(struct file *file,
32 - const char __user *user_buf, size_t count, loff_t *ppos)
34 - struct sta_info *sta = file->private_data;
35 - struct ieee80211_local *local = sta->sdata->local;
36 - struct ieee80211_hw *hw = &local->hw;
37 - u8 *da = sta->sta.addr;
38 - static int tid_static_tx[16] = {0, 0, 0, 0, 0, 0, 0, 0,
39 - 0, 0, 0, 0, 0, 0, 0, 0};
40 - static int tid_static_rx[16] = {1, 1, 1, 1, 1, 1, 1, 1,
41 - 1, 1, 1, 1, 1, 1, 1, 1};
45 - unsigned int tid_num;
48 - memset(buf, 0x00, sizeof(buf));
49 - buf_size = min(count, (sizeof(buf)-1));
50 - if (copy_from_user(buf, user_buf, buf_size))
53 - tid_num = simple_strtoul(buf, &endp, 0);
57 - if ((tid_num >= 100) && (tid_num <= 115)) {
58 - /* toggle Rx aggregation command */
59 - tid_num = tid_num - 100;
60 - if (tid_static_rx[tid_num] == 1) {
61 - strcpy(state, "off ");
62 - ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0,
63 - WLAN_REASON_QSTA_REQUIRE_SETUP);
64 - sta->ampdu_mlme.tid_state_rx[tid_num] |=
65 - HT_AGG_STATE_DEBUGFS_CTL;
66 - tid_static_rx[tid_num] = 0;
68 - strcpy(state, "on ");
69 - sta->ampdu_mlme.tid_state_rx[tid_num] &=
70 - ~HT_AGG_STATE_DEBUGFS_CTL;
71 - tid_static_rx[tid_num] = 1;
73 - printk(KERN_DEBUG "debugfs - try switching tid %u %s\n",
75 - } else if ((tid_num >= 0) && (tid_num <= 15)) {
76 - /* toggle Tx aggregation command */
77 - if (tid_static_tx[tid_num] == 0) {
78 - strcpy(state, "on ");
79 - rs = ieee80211_start_tx_ba_session(hw, da, tid_num);
81 - tid_static_tx[tid_num] = 1;
83 - strcpy(state, "off");
84 - rs = ieee80211_stop_tx_ba_session(hw, da, tid_num, 1);
86 - tid_static_tx[tid_num] = 0;
88 - printk(KERN_DEBUG "debugfs - switching tid %u %s, return=%d\n",
89 - tid_num, state, rs);
94 -STA_OPS_WR(agg_status);
97 #define DEBUGFS_ADD(name) \
98 sta->debugfs.name = debugfs_create_file(#name, 0400, \