aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/debugfs.c')
-rw-r--r--drivers/net/wireless/libertas/debugfs.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 651a79c8de8a..23250f621761 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -151,13 +151,14 @@ static ssize_t lbs_host_sleep_write(struct file *file,
151 ret = lbs_set_host_sleep(priv, 0); 151 ret = lbs_set_host_sleep(priv, 0);
152 else if (host_sleep == 1) { 152 else if (host_sleep == 1) {
153 if (priv->wol_criteria == EHS_REMOVE_WAKEUP) { 153 if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
154 lbs_pr_info("wake parameters not configured"); 154 netdev_info(priv->dev,
155 "wake parameters not configured\n");
155 ret = -EINVAL; 156 ret = -EINVAL;
156 goto out_unlock; 157 goto out_unlock;
157 } 158 }
158 ret = lbs_set_host_sleep(priv, 1); 159 ret = lbs_set_host_sleep(priv, 1);
159 } else { 160 } else {
160 lbs_pr_err("invalid option\n"); 161 netdev_err(priv->dev, "invalid option\n");
161 ret = -EINVAL; 162 ret = -EINVAL;
162 } 163 }
163 164
@@ -696,6 +697,7 @@ out_unlock:
696 .open = open_file_generic, \ 697 .open = open_file_generic, \
697 .read = (fread), \ 698 .read = (fread), \
698 .write = (fwrite), \ 699 .write = (fwrite), \
700 .llseek = generic_file_llseek, \
699} 701}
700 702
701struct lbs_debugfs_files { 703struct lbs_debugfs_files {
@@ -848,15 +850,14 @@ static struct debug_data items[] = {
848static int num_of_items = ARRAY_SIZE(items); 850static int num_of_items = ARRAY_SIZE(items);
849 851
850/** 852/**
851 * @brief proc read function 853 * lbs_debugfs_read - proc read function
852 * 854 *
853 * @param page pointer to buffer 855 * @file: file to read
854 * @param s read data starting position 856 * @userbuf: pointer to buffer
855 * @param off offset 857 * @count: number of bytes to read
856 * @param cnt counter 858 * @ppos: read data starting position
857 * @param eof end of file flag 859 *
858 * @param data data to output 860 * returns: amount of data read or negative error code
859 * @return number of output data
860 */ 861 */
861static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf, 862static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
862 size_t count, loff_t *ppos) 863 size_t count, loff_t *ppos)
@@ -896,13 +897,14 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
896} 897}
897 898
898/** 899/**
899 * @brief proc write function 900 * lbs_debugfs_write - proc write function
901 *
902 * @f: file pointer
903 * @buf: pointer to data buffer
904 * @cnt: data number to write
905 * @ppos: file position
900 * 906 *
901 * @param f file pointer 907 * returns: amount of data written
902 * @param buf pointer to data buffer
903 * @param cnt data number to write
904 * @param data data to write
905 * @return number of data
906 */ 908 */
907static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf, 909static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
908 size_t cnt, loff_t *ppos) 910 size_t cnt, loff_t *ppos)
@@ -961,14 +963,15 @@ static const struct file_operations lbs_debug_fops = {
961 .open = open_file_generic, 963 .open = open_file_generic,
962 .write = lbs_debugfs_write, 964 .write = lbs_debugfs_write,
963 .read = lbs_debugfs_read, 965 .read = lbs_debugfs_read,
966 .llseek = default_llseek,
964}; 967};
965 968
966/** 969/**
967 * @brief create debug proc file 970 * lbs_debug_init - create debug proc file
971 *
972 * @priv: pointer to &struct lbs_private
968 * 973 *
969 * @param priv pointer struct lbs_private 974 * returns: N/A
970 * @param dev pointer net_device
971 * @return N/A
972 */ 975 */
973static void lbs_debug_init(struct lbs_private *priv) 976static void lbs_debug_init(struct lbs_private *priv)
974{ 977{