+static ssize_t dump_nvs_read(struct file *file, char __user *userbuf,
+ size_t count, loff_t *ppos)
+{
+ struct wl1251 *wl = file->private_data;
+
+ if (wl->eeprom_dump == NULL)
+ return -EINVAL;
+
+ return simple_read_from_buffer(userbuf, count, ppos,
+ wl->eeprom_dump, 752);
+}
+
+static ssize_t dump_full_read(struct file *file, char __user *userbuf,
+ size_t count, loff_t *ppos)
+{
+ struct wl1251 *wl = file->private_data;
+
+ if (wl->eeprom_dump == NULL)
+ return -EINVAL;
+
+ return simple_read_from_buffer(userbuf, count, ppos,
+ wl->eeprom_dump, 1024);
+}
+
+static const struct file_operations dump_nvs_ops = {
+ .read = dump_nvs_read,
+ .open = wl1251_open_file_generic,
+ .llseek = generic_file_llseek,
+};
+
+static const struct file_operations dump_full_ops = {
+ .read = dump_full_read,
+ .open = wl1251_open_file_generic,
+ .llseek = generic_file_llseek,
+};
+