summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/debugfs.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-04-18 13:15:27 +0200
committerLuciano Coelho <coelho@ti.com>2011-05-02 09:31:23 +0200
commit2dc5a5c2c656b9029a0e635bb3a1cbcfbcb4ca5c (patch)
tree4f362dc0399bb0d9be27ef05483edf13b10a0489 /drivers/net/wireless/wl12xx/debugfs.c
parentwl12xx: AP-mode - reconfigure templates after basic rates change (diff)
downloadlinux-2dc5a5c2c656b9029a0e635bb3a1cbcfbcb4ca5c.tar.xz
linux-2dc5a5c2c656b9029a0e635bb3a1cbcfbcb4ca5c.zip
wl12xx: add debugfs entry for starting recovery
This entry is useful for debugging the driver state machine during recovery. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/debugfs.c')
-rw-r--r--drivers/net/wireless/wl12xx/debugfs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c
index b17cff6cd756..a2b55e556714 100644
--- a/drivers/net/wireless/wl12xx/debugfs.c
+++ b/drivers/net/wireless/wl12xx/debugfs.c
@@ -291,6 +291,25 @@ static const struct file_operations gpio_power_ops = {
.llseek = default_llseek,
};
+static ssize_t start_recovery_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct wl1271 *wl = file->private_data;
+
+ mutex_lock(&wl->mutex);
+ ieee80211_queue_work(wl->hw, &wl->recovery_work);
+ mutex_unlock(&wl->mutex);
+
+ return count;
+}
+
+static const struct file_operations start_recovery_ops = {
+ .write = start_recovery_write,
+ .open = wl1271_open_file_generic,
+ .llseek = default_llseek,
+};
+
static ssize_t dtim_interval_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
@@ -529,6 +548,7 @@ static int wl1271_debugfs_add_files(struct wl1271 *wl,
DEBUGFS_ADD(excessive_retries, rootdir);
DEBUGFS_ADD(gpio_power, rootdir);
+ DEBUGFS_ADD(start_recovery, rootdir);
DEBUGFS_ADD(dtim_interval, rootdir);
DEBUGFS_ADD(beacon_interval, rootdir);