diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-05-11 04:04:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-13 15:56:38 -0400 |
commit | 29bf801e04514929aeec768d237c62ae37564041 (patch) | |
tree | 4a5a8fdff64b4148c085ad80698606cf0d107f76 /drivers/net/wireless/ath/ath9k/debug.c | |
parent | 7e9bed7125760748648be539240d1191227b7bb7 (diff) |
ath9k: move base_eeprom debug code to ath9k_cmn_debug_base_eeprom
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 1825a49e7c74..361f07937a7a 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -1268,34 +1268,6 @@ static const struct file_operations fops_dump_nfcal = { | |||
1268 | .llseek = default_llseek, | 1268 | .llseek = default_llseek, |
1269 | }; | 1269 | }; |
1270 | 1270 | ||
1271 | static ssize_t read_file_base_eeprom(struct file *file, char __user *user_buf, | ||
1272 | size_t count, loff_t *ppos) | ||
1273 | { | ||
1274 | struct ath_softc *sc = file->private_data; | ||
1275 | struct ath_hw *ah = sc->sc_ah; | ||
1276 | u32 len = 0, size = 1500; | ||
1277 | ssize_t retval = 0; | ||
1278 | char *buf; | ||
1279 | |||
1280 | buf = kzalloc(size, GFP_KERNEL); | ||
1281 | if (!buf) | ||
1282 | return -ENOMEM; | ||
1283 | |||
1284 | len = ah->eep_ops->dump_eeprom(ah, true, buf, len, size); | ||
1285 | |||
1286 | retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); | ||
1287 | kfree(buf); | ||
1288 | |||
1289 | return retval; | ||
1290 | } | ||
1291 | |||
1292 | static const struct file_operations fops_base_eeprom = { | ||
1293 | .read = read_file_base_eeprom, | ||
1294 | .open = simple_open, | ||
1295 | .owner = THIS_MODULE, | ||
1296 | .llseek = default_llseek, | ||
1297 | }; | ||
1298 | |||
1299 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT | 1271 | #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT |
1300 | static ssize_t read_file_btcoex(struct file *file, char __user *user_buf, | 1272 | static ssize_t read_file_btcoex(struct file *file, char __user *user_buf, |
1301 | size_t count, loff_t *ppos) | 1273 | size_t count, loff_t *ppos) |
@@ -1519,9 +1491,8 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
1519 | &fops_regdump); | 1491 | &fops_regdump); |
1520 | debugfs_create_file("dump_nfcal", S_IRUSR, sc->debug.debugfs_phy, sc, | 1492 | debugfs_create_file("dump_nfcal", S_IRUSR, sc->debug.debugfs_phy, sc, |
1521 | &fops_dump_nfcal); | 1493 | &fops_dump_nfcal); |
1522 | debugfs_create_file("base_eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, | ||
1523 | &fops_base_eeprom); | ||
1524 | 1494 | ||
1495 | ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah); | ||
1525 | ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah); | 1496 | ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah); |
1526 | 1497 | ||
1527 | debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, | 1498 | debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, |