diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-03-16 13:45:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-16 13:45:25 -0400 |
commit | 01a282980937f9ca55a3cb06b9c6ff1cc49ea396 (patch) | |
tree | 07a043edc861e245a7a9764751af0898a1f1199a /net/mac80211/debugfs.c | |
parent | d5ddb4a59ed43b4c569b4efa8b508d50ef140cc6 (diff) | |
parent | 377526578f2c343ea281a918b18ece1fca65005c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/ath/ath9k/hw.c
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r-- | net/mac80211/debugfs.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 483e96ed95c1..cc5b7a6e7e0b 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -97,85 +97,6 @@ static const struct file_operations reset_ops = { | |||
97 | .llseek = noop_llseek, | 97 | .llseek = noop_llseek, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static ssize_t uapsd_queues_read(struct file *file, char __user *user_buf, | ||
101 | size_t count, loff_t *ppos) | ||
102 | { | ||
103 | struct ieee80211_local *local = file->private_data; | ||
104 | return mac80211_format_buffer(user_buf, count, ppos, "0x%x\n", | ||
105 | local->uapsd_queues); | ||
106 | } | ||
107 | |||
108 | static ssize_t uapsd_queues_write(struct file *file, | ||
109 | const char __user *user_buf, | ||
110 | size_t count, loff_t *ppos) | ||
111 | { | ||
112 | struct ieee80211_local *local = file->private_data; | ||
113 | u8 val; | ||
114 | int ret; | ||
115 | |||
116 | ret = kstrtou8_from_user(user_buf, count, 0, &val); | ||
117 | if (ret) | ||
118 | return ret; | ||
119 | |||
120 | if (val & ~IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK) | ||
121 | return -ERANGE; | ||
122 | |||
123 | local->uapsd_queues = val; | ||
124 | |||
125 | return count; | ||
126 | } | ||
127 | |||
128 | static const struct file_operations uapsd_queues_ops = { | ||
129 | .read = uapsd_queues_read, | ||
130 | .write = uapsd_queues_write, | ||
131 | .open = mac80211_open_file_generic, | ||
132 | .llseek = default_llseek, | ||
133 | }; | ||
134 | |||
135 | static ssize_t uapsd_max_sp_len_read(struct file *file, char __user *user_buf, | ||
136 | size_t count, loff_t *ppos) | ||
137 | { | ||
138 | struct ieee80211_local *local = file->private_data; | ||
139 | |||
140 | return mac80211_format_buffer(user_buf, count, ppos, "0x%x\n", | ||
141 | local->uapsd_max_sp_len); | ||
142 | } | ||
143 | |||
144 | static ssize_t uapsd_max_sp_len_write(struct file *file, | ||
145 | const char __user *user_buf, | ||
146 | size_t count, loff_t *ppos) | ||
147 | { | ||
148 | struct ieee80211_local *local = file->private_data; | ||
149 | unsigned long val; | ||
150 | char buf[10]; | ||
151 | size_t len; | ||
152 | int ret; | ||
153 | |||
154 | len = min(count, sizeof(buf) - 1); | ||
155 | if (copy_from_user(buf, user_buf, len)) | ||
156 | return -EFAULT; | ||
157 | buf[len] = '\0'; | ||
158 | |||
159 | ret = kstrtoul(buf, 0, &val); | ||
160 | |||
161 | if (ret) | ||
162 | return -EINVAL; | ||
163 | |||
164 | if (val & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) | ||
165 | return -ERANGE; | ||
166 | |||
167 | local->uapsd_max_sp_len = val; | ||
168 | |||
169 | return count; | ||
170 | } | ||
171 | |||
172 | static const struct file_operations uapsd_max_sp_len_ops = { | ||
173 | .read = uapsd_max_sp_len_read, | ||
174 | .write = uapsd_max_sp_len_write, | ||
175 | .open = mac80211_open_file_generic, | ||
176 | .llseek = default_llseek, | ||
177 | }; | ||
178 | |||
179 | static ssize_t channel_type_read(struct file *file, char __user *user_buf, | 100 | static ssize_t channel_type_read(struct file *file, char __user *user_buf, |
180 | size_t count, loff_t *ppos) | 101 | size_t count, loff_t *ppos) |
181 | { | 102 | { |
@@ -362,8 +283,6 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
362 | DEBUGFS_ADD(wep_iv); | 283 | DEBUGFS_ADD(wep_iv); |
363 | DEBUGFS_ADD(queues); | 284 | DEBUGFS_ADD(queues); |
364 | DEBUGFS_ADD_MODE(reset, 0200); | 285 | DEBUGFS_ADD_MODE(reset, 0200); |
365 | DEBUGFS_ADD(uapsd_queues); | ||
366 | DEBUGFS_ADD(uapsd_max_sp_len); | ||
367 | DEBUGFS_ADD(channel_type); | 286 | DEBUGFS_ADD(channel_type); |
368 | DEBUGFS_ADD(hwflags); | 287 | DEBUGFS_ADD(hwflags); |
369 | DEBUGFS_ADD(user_power); | 288 | DEBUGFS_ADD(user_power); |