net/wireless: use generic_file_llseek in debugfs
authorArnd Bergmann <arnd@arndb.de>
Tue, 6 Jul 2010 17:05:31 +0000 (19:05 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 16 Sep 2010 08:33:08 +0000 (10:33 +0200)
The default llseek operation is changing from
default_llseek to no_llseek, so all code relying on
the current behaviour needs to make that explicit.

The wireless driver infrastructure and some of the drivers
make use of generated debugfs files, so they cannot
be converted by our script that automatically determines
the right operation.

All these files use debugfs and they typically rely
on simple_read_from_buffer, so the best llseek operation
here is generic_file_llseek.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
13 files changed:
drivers/misc/iwmc3200top/debugfs.c
drivers/net/wireless/b43/debugfs.c
drivers/net/wireless/b43legacy/debugfs.c
drivers/net/wireless/iwlwifi/iwl-debugfs.c
drivers/net/wireless/libertas/debugfs.c
drivers/net/wireless/rt2x00/rt2x00debug.c
drivers/net/wireless/wl12xx/wl1251_debugfs.c
drivers/net/wireless/wl12xx/wl1271_debugfs.c
net/mac80211/debugfs.c
net/mac80211/debugfs_key.c
net/mac80211/debugfs_netdev.c
net/mac80211/debugfs_sta.c
net/wireless/debugfs.c

index e9eda471f6e0fd9ee4e2781e8d9176761a752591..62fbaec482075ec53cb27d1db4eade9fc01a6142 100644 (file)
@@ -71,6 +71,7 @@ ssize_t iwmct_dbgfs_##name##_write(struct file *file,                 \
        static const struct file_operations iwmct_dbgfs_##name##_ops = {  \
                .read = iwmct_dbgfs_##name##_read,                      \
                .open = iwmct_dbgfs_open_file_generic,                  \
+               .llseek = generic_file_llseek,                          \
        };
 
 #define DEBUGFS_WRITE_FILE_OPS(name)                                   \
@@ -78,6 +79,7 @@ ssize_t iwmct_dbgfs_##name##_write(struct file *file,                 \
        static const struct file_operations iwmct_dbgfs_##name##_ops = {  \
                .write = iwmct_dbgfs_##name##_write,                    \
                .open = iwmct_dbgfs_open_file_generic,                  \
+               .llseek = generic_file_llseek,                          \
        };
 
 #define DEBUGFS_READ_WRITE_FILE_OPS(name)                              \
@@ -87,6 +89,7 @@ ssize_t iwmct_dbgfs_##name##_write(struct file *file,                 \
                .write = iwmct_dbgfs_##name##_write,                    \
                .read = iwmct_dbgfs_##name##_read,                      \
                .open = iwmct_dbgfs_open_file_generic,                  \
+               .llseek = generic_file_llseek,                          \
        };
 
 
index 80b19a44a407ea40bd79a2ed157ea463aad846a2..59f59fa40334f75715259f6456b32b9fd3b4ebce 100644 (file)
@@ -627,6 +627,7 @@ out_unlock:
                        .open   = b43_debugfs_open,             \
                        .read   = b43_debugfs_read,             \
                        .write  = b43_debugfs_write,            \
+                       .llseek = generic_file_llseek,          \
                },                                              \
                .file_struct_offset = offsetof(struct b43_dfsentry, \
                                               file_##name),    \
index 1f85ac569fec0065868fb4341971dfec9c83480f..f232618f2cd1097b462b0c88a634becbde71c93a 100644 (file)
@@ -334,6 +334,7 @@ out_unlock:
                        .open   = b43legacy_debugfs_open,               \
                        .read   = b43legacy_debugfs_read,               \
                        .write  = b43legacy_debugfs_write,              \
+                       .llseek = generic_file_llseek,                  \
                },                                              \
                .file_struct_offset = offsetof(struct b43legacy_dfsentry, \
                                               file_##name),    \
index e96a1bb12783db78efc0d07a2794599525f9f830..a32d5d3376497bdcd3e5a82386785bb31d9caf5f 100644 (file)
@@ -87,6 +87,7 @@ static int iwl_dbgfs_open_file_generic(struct inode *inode, struct file *file)
 static const struct file_operations iwl_dbgfs_##name##_ops = {          \
        .read = iwl_dbgfs_##name##_read,                                \
        .open = iwl_dbgfs_open_file_generic,                            \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_WRITE_FILE_OPS(name)                                    \
@@ -94,6 +95,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = {          \
 static const struct file_operations iwl_dbgfs_##name##_ops = {          \
        .write = iwl_dbgfs_##name##_write,                              \
        .open = iwl_dbgfs_open_file_generic,                            \
+       .llseek = generic_file_llseek,                                  \
 };
 
 
@@ -104,6 +106,7 @@ static const struct file_operations iwl_dbgfs_##name##_ops = {          \
        .write = iwl_dbgfs_##name##_write,                              \
        .read = iwl_dbgfs_##name##_read,                                \
        .open = iwl_dbgfs_open_file_generic,                            \
+       .llseek = generic_file_llseek,                                  \
 };
 
 static ssize_t iwl_dbgfs_tx_statistics_read(struct file *file,
index 651a79c8de8a0d5cb59372a37720fddbc5dfd70c..74e94cc10e01dd87f12b9d229a07b0f5bb3661c2 100644 (file)
@@ -696,6 +696,7 @@ out_unlock:
        .open = open_file_generic, \
        .read = (fread), \
        .write = (fwrite), \
+       .llseek = generic_file_llseek, \
 }
 
 struct lbs_debugfs_files {
index b0498e7e7aae95a733eef24bbb139ee0486c690b..7d6f19a2805e138d4ac2ed7d4b90da44c2b2d252 100644 (file)
@@ -509,6 +509,7 @@ static const struct file_operations rt2x00debug_fop_##__name = {\
        .write          = rt2x00debug_write_##__name,           \
        .open           = rt2x00debug_file_open,                \
        .release        = rt2x00debug_file_release,             \
+       .llseek         = generic_file_llseek,                  \
 };
 
 RT2X00DEBUGFS_OPS(csr, "0x%.8x\n", u32);
index 5e4465ac08fadbbb435db0ad890edc4d610e2ae6..a4ae7c4d94b5d3fbe6d2d9edc5d1cac5f67553f6 100644 (file)
@@ -50,6 +50,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf,  \
 static const struct file_operations name## _ops = {                    \
        .read = name## _read,                                           \
        .open = wl1251_open_file_generic,                               \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_ADD(name, parent)                                      \
@@ -86,6 +87,7 @@ static ssize_t sub## _ ##name## _read(struct file *file,              \
 static const struct file_operations sub## _ ##name## _ops = {          \
        .read = sub## _ ##name## _read,                                 \
        .open = wl1251_open_file_generic,                               \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_FWSTATS_ADD(sub, name)                         \
index c239ef4d0b8dedf5932eac4c041073e05a90e782..6e25303a8e7ff78fc3e6242fd55e394286de0a26 100644 (file)
@@ -51,6 +51,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf,  \
 static const struct file_operations name## _ops = {                    \
        .read = name## _read,                                           \
        .open = wl1271_open_file_generic,                               \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_ADD(name, parent)                                      \
@@ -87,6 +88,7 @@ static ssize_t sub## _ ##name## _read(struct file *file,              \
 static const struct file_operations sub## _ ##name## _ops = {          \
        .read = sub## _ ##name## _read,                                 \
        .open = wl1271_open_file_generic,                               \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_FWSTATS_ADD(sub, name)                         \
index a694c593ff6ac1e17479ae07d26ad1fd02f258ba..4a4d35c750c6c589a3b4a5046fca850eca81cf73 100644 (file)
@@ -36,6 +36,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf,  \
 static const struct file_operations name## _ops = {                    \
        .read = name## _read,                                           \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_ADD(name)                                              \
@@ -346,6 +347,7 @@ static ssize_t stats_ ##name## _read(struct file *file,                     \
 static const struct file_operations stats_ ##name## _ops = {           \
        .read = stats_ ##name## _read,                                  \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 };
 
 #define DEBUGFS_STATS_ADD(name, field)                                 \
index fa5e76e658ef058b5fb87c4d4647c5025a3e4d71..7cd8dd9fc240ee027795a550d89ede7f0d66f3b4 100644 (file)
@@ -32,6 +32,7 @@ static ssize_t key_##name##_read(struct file *file,                   \
 static const struct file_operations key_ ##name## _ops = {             \
        .read = key_##name##_read,                                      \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 }
 
 #define KEY_FILE(name, format)                                         \
@@ -46,6 +47,7 @@ static const struct file_operations key_ ##name## _ops = {            \
 static const struct file_operations key_ ##name## _ops = {             \
        .read = key_conf_##name##_read,                                 \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 }
 
 #define KEY_CONF_FILE(name, format)                                    \
index 20b2998fa0ed07b68b410f77a82d0f159603d79e..8ad33eef7dda460155901f611f082af4060c34ca 100644 (file)
@@ -121,6 +121,7 @@ static const struct file_operations name##_ops = {                  \
        .read = ieee80211_if_read_##name,                               \
        .write = (_write),                                              \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 }
 
 #define __IEEE80211_IF_FILE_W(name)                                    \
index 76839d4dfaacabe15c30f886478367ad2b524585..6a8fdc372c43e2ff236da5423a58ab5f74dd8e8a 100644 (file)
@@ -36,6 +36,7 @@ static ssize_t sta_ ##name## _read(struct file *file,                 \
 static const struct file_operations sta_ ##name## _ops = {             \
        .read = sta_##name##_read,                                      \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 }
 
 #define STA_OPS_RW(name)                                               \
@@ -43,6 +44,7 @@ static const struct file_operations sta_ ##name## _ops = {            \
        .read = sta_##name##_read,                                      \
        .write = sta_##name##_write,                                    \
        .open = mac80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 }
 
 #define STA_FILE(name, field, format)                                  \
index a4991a3efec0249ac5dea20424628388652072fa..3f9a57e96508224404354031339c0384f1ace106 100644 (file)
@@ -34,6 +34,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf,  \
 static const struct file_operations name## _ops = {                    \
        .read = name## _read,                                           \
        .open = cfg80211_open_file_generic,                             \
+       .llseek = generic_file_llseek,                                  \
 };
 
 DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d",