diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 94 |
1 files changed, 35 insertions, 59 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 8df5a92a20f1..a762cadb3ab7 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -1088,67 +1088,43 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
1088 | return -ENOMEM; | 1088 | return -ENOMEM; |
1089 | 1089 | ||
1090 | #ifdef CONFIG_ATH_DEBUG | 1090 | #ifdef CONFIG_ATH_DEBUG |
1091 | if (!debugfs_create_file("debug", S_IRUSR | S_IWUSR, | 1091 | debugfs_create_file("debug", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, |
1092 | sc->debug.debugfs_phy, sc, &fops_debug)) | 1092 | sc, &fops_debug); |
1093 | goto err; | ||
1094 | #endif | 1093 | #endif |
1095 | 1094 | debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy, sc, | |
1096 | if (!debugfs_create_file("dma", S_IRUSR, sc->debug.debugfs_phy, | 1095 | &fops_dma); |
1097 | sc, &fops_dma)) | 1096 | debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc, |
1098 | goto err; | 1097 | &fops_interrupt); |
1099 | 1098 | debugfs_create_file("wiphy", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, | |
1100 | if (!debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, | 1099 | sc, &fops_wiphy); |
1101 | sc, &fops_interrupt)) | 1100 | debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc, |
1102 | goto err; | 1101 | &fops_xmit); |
1103 | 1102 | debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc, | |
1104 | if (!debugfs_create_file("wiphy", S_IRUSR | S_IWUSR, | 1103 | &fops_stations); |
1105 | sc->debug.debugfs_phy, sc, &fops_wiphy)) | 1104 | debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc, |
1106 | goto err; | 1105 | &fops_misc); |
1107 | 1106 | debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy, sc, | |
1108 | if (!debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, | 1107 | &fops_recv); |
1109 | sc, &fops_xmit)) | 1108 | debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR, |
1110 | goto err; | 1109 | sc->debug.debugfs_phy, sc, &fops_rx_chainmask); |
1111 | 1110 | debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR, | |
1112 | if (!debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, | 1111 | sc->debug.debugfs_phy, sc, &fops_tx_chainmask); |
1113 | sc, &fops_stations)) | 1112 | debugfs_create_file("regidx", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, |
1114 | goto err; | 1113 | sc, &fops_regidx); |
1115 | 1114 | debugfs_create_file("regval", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, | |
1116 | if (!debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, | 1115 | sc, &fops_regval); |
1117 | sc, &fops_misc)) | 1116 | debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR, |
1118 | goto err; | 1117 | sc->debug.debugfs_phy, |
1119 | 1118 | &ah->config.cwm_ignore_extcca); | |
1120 | if (!debugfs_create_file("recv", S_IRUSR, sc->debug.debugfs_phy, | 1119 | debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy, sc, |
1121 | sc, &fops_recv)) | 1120 | &fops_regdump); |
1122 | goto err; | 1121 | |
1123 | 1122 | debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, | |
1124 | if (!debugfs_create_file("rx_chainmask", S_IRUSR | S_IWUSR, | 1123 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); |
1125 | sc->debug.debugfs_phy, sc, &fops_rx_chainmask)) | 1124 | |
1126 | goto err; | 1125 | debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, |
1127 | 1126 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); | |
1128 | if (!debugfs_create_file("tx_chainmask", S_IRUSR | S_IWUSR, | ||
1129 | sc->debug.debugfs_phy, sc, &fops_tx_chainmask)) | ||
1130 | goto err; | ||
1131 | |||
1132 | if (!debugfs_create_file("regidx", S_IRUSR | S_IWUSR, | ||
1133 | sc->debug.debugfs_phy, sc, &fops_regidx)) | ||
1134 | goto err; | ||
1135 | |||
1136 | if (!debugfs_create_file("regval", S_IRUSR | S_IWUSR, | ||
1137 | sc->debug.debugfs_phy, sc, &fops_regval)) | ||
1138 | goto err; | ||
1139 | |||
1140 | if (!debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR, | ||
1141 | sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca)) | ||
1142 | goto err; | ||
1143 | |||
1144 | if (!debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy, | ||
1145 | sc, &fops_regdump)) | ||
1146 | goto err; | ||
1147 | 1127 | ||
1148 | sc->debug.regidx = 0; | 1128 | sc->debug.regidx = 0; |
1149 | return 0; | 1129 | return 0; |
1150 | err: | ||
1151 | debugfs_remove_recursive(sc->debug.debugfs_phy); | ||
1152 | sc->debug.debugfs_phy = NULL; | ||
1153 | return -ENOMEM; | ||
1154 | } | 1130 | } |