Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b35e28e authored by Karthick Gopalasubramanian's avatar Karthick Gopalasubramanian Committed by Maya Erez
Browse files

wil6210: remove reset file from debugfs



Reset file is not used and may cause race conditions
with operational driver if used.

Change-Id: Iaca10f63fd959bddd53b43762a1e1558dd5b8db0
Signed-off-by: default avatarKarthick Gopalasubramanian <kargop@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Git-commit: 32dcfe8316cdbd885542967c0c85f5b9de78874b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 78033016
Loading
Loading
Loading
Loading
+0 −27
Original line number Original line Diff line number Diff line
@@ -726,32 +726,6 @@ struct dentry *wil_debugfs_create_ioblob(const char *name,
	return debugfs_create_file(name, mode, parent, wil_blob, &fops_ioblob);
	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---*/
/*---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,
static ssize_t wil_write_file_rxon(struct file *file, const char __user *buf,
				   size_t len, loff_t *ppos)
				   size_t len, loff_t *ppos)
@@ -2491,7 +2465,6 @@ static const struct {
	{"bf",		0444,		&fops_bf},
	{"bf",		0444,		&fops_bf},
	{"ssid",	0644,		&fops_ssid},
	{"ssid",	0644,		&fops_ssid},
	{"mem_val",	0644,		&fops_memread},
	{"mem_val",	0644,		&fops_memread},
	{"reset",	0244,		&fops_reset},
	{"rxon",	0244,		&fops_rxon},
	{"rxon",	0244,		&fops_rxon},
	{"tx_mgmt",	0244,		&fops_txmgmt},
	{"tx_mgmt",	0244,		&fops_txmgmt},
	{"wmi_send", 0244,		&fops_wmi},
	{"wmi_send", 0244,		&fops_wmi},