wil6210: remove reset file from debugfs
authorKarthick Gopalasubramanian <kargop@codeaurora.org>
Thu, 23 Aug 2018 11:47:05 +0000 (14:47 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 Aug 2018 13:47:56 +0000 (16:47 +0300)
Reset file is not used and may cause race conditions
with operational driver if used.

Signed-off-by: Karthick Gopalasubramanian <kargop@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/debugfs.c

index 51c3330bc316f8c47ff005a55e16a46ec234ef10..4057f068594736e67a1b8e4a3b15073106e82034 100644 (file)
@@ -725,32 +725,6 @@ struct dentry *wil_debugfs_create_ioblob(const char *name,
        return debugfs_create_file(name, mode, parent, wil_blob, &fops_ioblob);
 }
 
-/*---reset---*/
-static ssize_t wil_write_file_reset(struct file *file, const char __user *buf,
-                                   size_t len, loff_t *ppos)
-{
-       struct wil6210_priv *wil = file->private_data;
-       struct net_device *ndev = wil->main_ndev;
-
-       /**
-        * BUG:
-        * this code does NOT sync device state with the rest of system
-        * use with care, debug only!!!
-        */
-       rtnl_lock();
-       dev_close(ndev);
-       ndev->flags &= ~IFF_UP;
-       rtnl_unlock();
-       wil_reset(wil, true);
-
-       return len;
-}
-
-static const struct file_operations fops_reset = {
-       .write = wil_write_file_reset,
-       .open  = simple_open,
-};
-
 /*---write channel 1..4 to rxon for it, 0 to rxoff---*/
 static ssize_t wil_write_file_rxon(struct file *file, const char __user *buf,
                                   size_t len, loff_t *ppos)
@@ -2451,7 +2425,6 @@ static const struct {
        {"desc",        0444,           &fops_txdesc},
        {"bf",          0444,           &fops_bf},
        {"mem_val",     0644,           &fops_memread},
-       {"reset",       0244,           &fops_reset},
        {"rxon",        0244,           &fops_rxon},
        {"tx_mgmt",     0244,           &fops_txmgmt},
        {"wmi_send", 0244,              &fops_wmi},