diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/debugfs.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/debugfs.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c index d26a78b6b3c4..a870b5885c09 100644 --- a/drivers/net/wireless/mwifiex/debugfs.c +++ b/drivers/net/wireless/mwifiex/debugfs.c | |||
@@ -140,18 +140,6 @@ static struct mwifiex_debug_data items[] = { | |||
140 | static int num_of_items = ARRAY_SIZE(items); | 140 | static int num_of_items = ARRAY_SIZE(items); |
141 | 141 | ||
142 | /* | 142 | /* |
143 | * Generic proc file open handler. | ||
144 | * | ||
145 | * This function is called every time a file is accessed for read or write. | ||
146 | */ | ||
147 | static int | ||
148 | mwifiex_open_generic(struct inode *inode, struct file *file) | ||
149 | { | ||
150 | file->private_data = inode->i_private; | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | /* | ||
155 | * Proc info file read handler. | 143 | * Proc info file read handler. |
156 | * | 144 | * |
157 | * This function is called when the 'info' file is opened for reading. | 145 | * This function is called when the 'info' file is opened for reading. |
@@ -224,7 +212,7 @@ mwifiex_info_read(struct file *file, char __user *ubuf, | |||
224 | p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); | 212 | p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); |
225 | p += sprintf(p, "bssid=\"%pM\"\n", info.bssid); | 213 | p += sprintf(p, "bssid=\"%pM\"\n", info.bssid); |
226 | p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); | 214 | p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); |
227 | p += sprintf(p, "region_code = \"%02x\"\n", info.region_code); | 215 | p += sprintf(p, "country_code = \"%s\"\n", info.country_code); |
228 | 216 | ||
229 | netdev_for_each_mc_addr(ha, netdev) | 217 | netdev_for_each_mc_addr(ha, netdev) |
230 | p += sprintf(p, "multicast_address[%d]=\"%pM\"\n", | 218 | p += sprintf(p, "multicast_address[%d]=\"%pM\"\n", |
@@ -676,19 +664,19 @@ done: | |||
676 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ | 664 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ |
677 | .read = mwifiex_##name##_read, \ | 665 | .read = mwifiex_##name##_read, \ |
678 | .write = mwifiex_##name##_write, \ | 666 | .write = mwifiex_##name##_write, \ |
679 | .open = mwifiex_open_generic, \ | 667 | .open = simple_open, \ |
680 | }; | 668 | }; |
681 | 669 | ||
682 | #define MWIFIEX_DFS_FILE_READ_OPS(name) \ | 670 | #define MWIFIEX_DFS_FILE_READ_OPS(name) \ |
683 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ | 671 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ |
684 | .read = mwifiex_##name##_read, \ | 672 | .read = mwifiex_##name##_read, \ |
685 | .open = mwifiex_open_generic, \ | 673 | .open = simple_open, \ |
686 | }; | 674 | }; |
687 | 675 | ||
688 | #define MWIFIEX_DFS_FILE_WRITE_OPS(name) \ | 676 | #define MWIFIEX_DFS_FILE_WRITE_OPS(name) \ |
689 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ | 677 | static const struct file_operations mwifiex_dfs_##name##_fops = { \ |
690 | .write = mwifiex_##name##_write, \ | 678 | .write = mwifiex_##name##_write, \ |
691 | .open = mwifiex_open_generic, \ | 679 | .open = simple_open, \ |
692 | }; | 680 | }; |
693 | 681 | ||
694 | 682 | ||