Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 4 | * redistributing this file, you may do so under either license. |
| 5 | * |
| 6 | * GPL LICENSE SUMMARY |
| 7 | * |
Emmanuel Grumbach | 51368bf | 2013-12-30 13:15:54 +0200 | [diff] [blame] | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
Matti Gottlieb | 25870cb | 2015-05-04 09:34:37 +0300 | [diff] [blame] | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of version 2 of the GNU General Public License as |
| 13 | * published by the Free Software Foundation. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, but |
| 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | * General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, |
| 23 | * USA |
| 24 | * |
| 25 | * The full GNU General Public License is included in this distribution |
| 26 | * in the file called COPYING. |
| 27 | * |
| 28 | * Contact Information: |
| 29 | * Intel Linux Wireless <ilw@linux.intel.com> |
| 30 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
| 31 | * |
| 32 | * BSD LICENSE |
| 33 | * |
Emmanuel Grumbach | 51368bf | 2013-12-30 13:15:54 +0200 | [diff] [blame] | 34 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
Matti Gottlieb | 25870cb | 2015-05-04 09:34:37 +0300 | [diff] [blame] | 35 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 36 | * All rights reserved. |
| 37 | * |
| 38 | * Redistribution and use in source and binary forms, with or without |
| 39 | * modification, are permitted provided that the following conditions |
| 40 | * are met: |
| 41 | * |
| 42 | * * Redistributions of source code must retain the above copyright |
| 43 | * notice, this list of conditions and the following disclaimer. |
| 44 | * * Redistributions in binary form must reproduce the above copyright |
| 45 | * notice, this list of conditions and the following disclaimer in |
| 46 | * the documentation and/or other materials provided with the |
| 47 | * distribution. |
| 48 | * * Neither the name Intel Corporation nor the names of its |
| 49 | * contributors may be used to endorse or promote products derived |
| 50 | * from this software without specific prior written permission. |
| 51 | * |
| 52 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 53 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 54 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 55 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 56 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 57 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 58 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 59 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 60 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 61 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 62 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 63 | * |
| 64 | *****************************************************************************/ |
| 65 | #include "mvm.h" |
| 66 | #include "debugfs.h" |
| 67 | |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 68 | static void iwl_dbgfs_update_pm(struct iwl_mvm *mvm, |
| 69 | struct ieee80211_vif *vif, |
| 70 | enum iwl_dbgfs_pm_mask param, int val) |
| 71 | { |
| 72 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 73 | struct iwl_dbgfs_pm *dbgfs_pm = &mvmvif->dbgfs_pm; |
| 74 | |
| 75 | dbgfs_pm->mask |= param; |
| 76 | |
| 77 | switch (param) { |
| 78 | case MVM_DEBUGFS_PM_KEEP_ALIVE: { |
Emmanuel Grumbach | 717e239 | 2014-07-31 14:39:40 +0300 | [diff] [blame] | 79 | int dtimper = vif->bss_conf.dtim_period ?: 1; |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 80 | int dtimper_msec = dtimper * vif->bss_conf.beacon_int; |
| 81 | |
| 82 | IWL_DEBUG_POWER(mvm, "debugfs: set keep_alive= %d sec\n", val); |
| 83 | if (val * MSEC_PER_SEC < 3 * dtimper_msec) |
| 84 | IWL_WARN(mvm, |
| 85 | "debugfs: keep alive period (%ld msec) is less than minimum required (%d msec)\n", |
| 86 | val * MSEC_PER_SEC, 3 * dtimper_msec); |
| 87 | dbgfs_pm->keep_alive_seconds = val; |
| 88 | break; |
| 89 | } |
| 90 | case MVM_DEBUGFS_PM_SKIP_OVER_DTIM: |
| 91 | IWL_DEBUG_POWER(mvm, "skip_over_dtim %s\n", |
| 92 | val ? "enabled" : "disabled"); |
| 93 | dbgfs_pm->skip_over_dtim = val; |
| 94 | break; |
| 95 | case MVM_DEBUGFS_PM_SKIP_DTIM_PERIODS: |
| 96 | IWL_DEBUG_POWER(mvm, "skip_dtim_periods=%d\n", val); |
| 97 | dbgfs_pm->skip_dtim_periods = val; |
| 98 | break; |
| 99 | case MVM_DEBUGFS_PM_RX_DATA_TIMEOUT: |
| 100 | IWL_DEBUG_POWER(mvm, "rx_data_timeout=%d\n", val); |
| 101 | dbgfs_pm->rx_data_timeout = val; |
| 102 | break; |
| 103 | case MVM_DEBUGFS_PM_TX_DATA_TIMEOUT: |
| 104 | IWL_DEBUG_POWER(mvm, "tx_data_timeout=%d\n", val); |
| 105 | dbgfs_pm->tx_data_timeout = val; |
| 106 | break; |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 107 | case MVM_DEBUGFS_PM_LPRX_ENA: |
| 108 | IWL_DEBUG_POWER(mvm, "lprx %s\n", val ? "enabled" : "disabled"); |
| 109 | dbgfs_pm->lprx_ena = val; |
| 110 | break; |
| 111 | case MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD: |
| 112 | IWL_DEBUG_POWER(mvm, "lprx_rssi_threshold=%d\n", val); |
| 113 | dbgfs_pm->lprx_rssi_threshold = val; |
| 114 | break; |
| 115 | case MVM_DEBUGFS_PM_SNOOZE_ENABLE: |
| 116 | IWL_DEBUG_POWER(mvm, "snooze_enable=%d\n", val); |
| 117 | dbgfs_pm->snooze_ena = val; |
| 118 | break; |
| 119 | case MVM_DEBUGFS_PM_UAPSD_MISBEHAVING: |
| 120 | IWL_DEBUG_POWER(mvm, "uapsd_misbehaving_enable=%d\n", val); |
| 121 | dbgfs_pm->uapsd_misbehaving = val; |
| 122 | break; |
Eliad Peller | 84fd760 | 2014-07-30 15:42:19 +0300 | [diff] [blame] | 123 | case MVM_DEBUGFS_PM_USE_PS_POLL: |
| 124 | IWL_DEBUG_POWER(mvm, "use_ps_poll=%d\n", val); |
| 125 | dbgfs_pm->use_ps_poll = val; |
| 126 | break; |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 127 | } |
| 128 | } |
| 129 | |
| 130 | static ssize_t iwl_dbgfs_pm_params_write(struct ieee80211_vif *vif, char *buf, |
| 131 | size_t count, loff_t *ppos) |
| 132 | { |
| 133 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 134 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 135 | enum iwl_dbgfs_pm_mask param; |
| 136 | int val, ret; |
| 137 | |
| 138 | if (!strncmp("keep_alive=", buf, 11)) { |
| 139 | if (sscanf(buf + 11, "%d", &val) != 1) |
| 140 | return -EINVAL; |
| 141 | param = MVM_DEBUGFS_PM_KEEP_ALIVE; |
| 142 | } else if (!strncmp("skip_over_dtim=", buf, 15)) { |
| 143 | if (sscanf(buf + 15, "%d", &val) != 1) |
| 144 | return -EINVAL; |
| 145 | param = MVM_DEBUGFS_PM_SKIP_OVER_DTIM; |
| 146 | } else if (!strncmp("skip_dtim_periods=", buf, 18)) { |
| 147 | if (sscanf(buf + 18, "%d", &val) != 1) |
| 148 | return -EINVAL; |
| 149 | param = MVM_DEBUGFS_PM_SKIP_DTIM_PERIODS; |
| 150 | } else if (!strncmp("rx_data_timeout=", buf, 16)) { |
| 151 | if (sscanf(buf + 16, "%d", &val) != 1) |
| 152 | return -EINVAL; |
| 153 | param = MVM_DEBUGFS_PM_RX_DATA_TIMEOUT; |
| 154 | } else if (!strncmp("tx_data_timeout=", buf, 16)) { |
| 155 | if (sscanf(buf + 16, "%d", &val) != 1) |
| 156 | return -EINVAL; |
| 157 | param = MVM_DEBUGFS_PM_TX_DATA_TIMEOUT; |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 158 | } else if (!strncmp("lprx=", buf, 5)) { |
| 159 | if (sscanf(buf + 5, "%d", &val) != 1) |
| 160 | return -EINVAL; |
| 161 | param = MVM_DEBUGFS_PM_LPRX_ENA; |
| 162 | } else if (!strncmp("lprx_rssi_threshold=", buf, 20)) { |
| 163 | if (sscanf(buf + 20, "%d", &val) != 1) |
| 164 | return -EINVAL; |
| 165 | if (val > POWER_LPRX_RSSI_THRESHOLD_MAX || val < |
| 166 | POWER_LPRX_RSSI_THRESHOLD_MIN) |
| 167 | return -EINVAL; |
| 168 | param = MVM_DEBUGFS_PM_LPRX_RSSI_THRESHOLD; |
| 169 | } else if (!strncmp("snooze_enable=", buf, 14)) { |
| 170 | if (sscanf(buf + 14, "%d", &val) != 1) |
| 171 | return -EINVAL; |
| 172 | param = MVM_DEBUGFS_PM_SNOOZE_ENABLE; |
| 173 | } else if (!strncmp("uapsd_misbehaving=", buf, 18)) { |
| 174 | if (sscanf(buf + 18, "%d", &val) != 1) |
| 175 | return -EINVAL; |
| 176 | param = MVM_DEBUGFS_PM_UAPSD_MISBEHAVING; |
Eliad Peller | 84fd760 | 2014-07-30 15:42:19 +0300 | [diff] [blame] | 177 | } else if (!strncmp("use_ps_poll=", buf, 12)) { |
| 178 | if (sscanf(buf + 12, "%d", &val) != 1) |
| 179 | return -EINVAL; |
| 180 | param = MVM_DEBUGFS_PM_USE_PS_POLL; |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 181 | } else { |
| 182 | return -EINVAL; |
| 183 | } |
| 184 | |
| 185 | mutex_lock(&mvm->mutex); |
| 186 | iwl_dbgfs_update_pm(mvm, vif, param, val); |
Arik Nemtsov | 999609f | 2014-05-15 17:31:51 +0300 | [diff] [blame] | 187 | ret = iwl_mvm_power_update_mac(mvm); |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 188 | mutex_unlock(&mvm->mutex); |
| 189 | |
| 190 | return ret ?: count; |
| 191 | } |
| 192 | |
Matti Gottlieb | 25870cb | 2015-05-04 09:34:37 +0300 | [diff] [blame] | 193 | static ssize_t iwl_dbgfs_tx_pwr_lmt_read(struct file *file, |
| 194 | char __user *user_buf, |
| 195 | size_t count, loff_t *ppos) |
| 196 | { |
| 197 | struct ieee80211_vif *vif = file->private_data; |
| 198 | char buf[64]; |
| 199 | int bufsz = sizeof(buf); |
| 200 | int pos; |
| 201 | |
| 202 | pos = scnprintf(buf, bufsz, "bss limit = %d\n", |
| 203 | vif->bss_conf.txpower); |
| 204 | |
| 205 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
| 206 | } |
| 207 | |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 208 | static ssize_t iwl_dbgfs_pm_params_read(struct file *file, |
| 209 | char __user *user_buf, |
| 210 | size_t count, loff_t *ppos) |
| 211 | { |
| 212 | struct ieee80211_vif *vif = file->private_data; |
| 213 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 214 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 215 | char buf[512]; |
| 216 | int bufsz = sizeof(buf); |
| 217 | int pos; |
| 218 | |
Emmanuel Grumbach | c1cb92f | 2014-01-28 10:17:18 +0200 | [diff] [blame] | 219 | pos = iwl_mvm_power_mac_dbgfs_read(mvm, vif, buf, bufsz); |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 220 | |
| 221 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
| 222 | } |
| 223 | |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 224 | static ssize_t iwl_dbgfs_mac_params_read(struct file *file, |
| 225 | char __user *user_buf, |
| 226 | size_t count, loff_t *ppos) |
| 227 | { |
| 228 | struct ieee80211_vif *vif = file->private_data; |
| 229 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
Johannes Berg | 7f09d70 | 2013-11-12 17:16:38 +0100 | [diff] [blame] | 230 | struct iwl_mvm *mvm = mvmvif->mvm; |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 231 | u8 ap_sta_id; |
| 232 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 233 | char buf[512]; |
| 234 | int bufsz = sizeof(buf); |
| 235 | int pos = 0; |
| 236 | int i; |
| 237 | |
| 238 | mutex_lock(&mvm->mutex); |
| 239 | |
| 240 | ap_sta_id = mvmvif->ap_sta_id; |
| 241 | |
Emmanuel Grumbach | 2284b95 | 2014-01-15 16:57:03 +0200 | [diff] [blame] | 242 | switch (ieee80211_vif_type_p2p(vif)) { |
| 243 | case NL80211_IFTYPE_ADHOC: |
| 244 | pos += scnprintf(buf+pos, bufsz-pos, "type: ibss\n"); |
| 245 | break; |
| 246 | case NL80211_IFTYPE_STATION: |
| 247 | pos += scnprintf(buf+pos, bufsz-pos, "type: bss\n"); |
| 248 | break; |
| 249 | case NL80211_IFTYPE_AP: |
| 250 | pos += scnprintf(buf+pos, bufsz-pos, "type: ap\n"); |
| 251 | break; |
| 252 | case NL80211_IFTYPE_P2P_CLIENT: |
| 253 | pos += scnprintf(buf+pos, bufsz-pos, "type: p2p client\n"); |
| 254 | break; |
| 255 | case NL80211_IFTYPE_P2P_GO: |
| 256 | pos += scnprintf(buf+pos, bufsz-pos, "type: p2p go\n"); |
| 257 | break; |
| 258 | case NL80211_IFTYPE_P2P_DEVICE: |
| 259 | pos += scnprintf(buf+pos, bufsz-pos, "type: p2p dev\n"); |
| 260 | break; |
| 261 | default: |
| 262 | break; |
| 263 | } |
| 264 | |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 265 | pos += scnprintf(buf+pos, bufsz-pos, "mac id/color: %d / %d\n", |
| 266 | mvmvif->id, mvmvif->color); |
| 267 | pos += scnprintf(buf+pos, bufsz-pos, "bssid: %pM\n", |
| 268 | vif->bss_conf.bssid); |
| 269 | pos += scnprintf(buf+pos, bufsz-pos, "QoS:\n"); |
| 270 | for (i = 0; i < ARRAY_SIZE(mvmvif->queue_params); i++) |
| 271 | pos += scnprintf(buf+pos, bufsz-pos, |
| 272 | "\t%d: txop:%d - cw_min:%d - cw_max = %d - aifs = %d upasd = %d\n", |
| 273 | i, mvmvif->queue_params[i].txop, |
| 274 | mvmvif->queue_params[i].cw_min, |
| 275 | mvmvif->queue_params[i].cw_max, |
| 276 | mvmvif->queue_params[i].aifs, |
| 277 | mvmvif->queue_params[i].uapsd); |
| 278 | |
| 279 | if (vif->type == NL80211_IFTYPE_STATION && |
| 280 | ap_sta_id != IWL_MVM_STATION_COUNT) { |
| 281 | struct ieee80211_sta *sta; |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 282 | |
| 283 | sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[ap_sta_id], |
| 284 | lockdep_is_held(&mvm->mutex)); |
Johannes Berg | 1ddbbb0 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 285 | if (!IS_ERR_OR_NULL(sta)) { |
Johannes Berg | 9d8ce6a | 2014-12-23 16:02:40 +0100 | [diff] [blame] | 286 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
Johannes Berg | 1ddbbb0 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 287 | |
| 288 | pos += scnprintf(buf+pos, bufsz-pos, |
Emmanuel Grumbach | 1fa477c | 2014-05-20 13:54:27 +0300 | [diff] [blame] | 289 | "ap_sta_id %d - reduced Tx power %d\n", |
Johannes Berg | 1ddbbb0 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 290 | ap_sta_id, |
Emmanuel Grumbach | 1fa477c | 2014-05-20 13:54:27 +0300 | [diff] [blame] | 291 | mvm_sta->bt_reduced_txpower); |
Johannes Berg | 1ddbbb0 | 2013-12-04 22:39:17 +0100 | [diff] [blame] | 292 | } |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | rcu_read_lock(); |
| 296 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 297 | if (chanctx_conf) |
| 298 | pos += scnprintf(buf+pos, bufsz-pos, |
| 299 | "idle rx chains %d, active rx chains: %d\n", |
| 300 | chanctx_conf->rx_chains_static, |
| 301 | chanctx_conf->rx_chains_dynamic); |
| 302 | rcu_read_unlock(); |
| 303 | |
| 304 | mutex_unlock(&mvm->mutex); |
| 305 | |
| 306 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
| 307 | } |
| 308 | |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 309 | static void iwl_dbgfs_update_bf(struct ieee80211_vif *vif, |
| 310 | enum iwl_dbgfs_bf_mask param, int value) |
| 311 | { |
| 312 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 313 | struct iwl_dbgfs_bf *dbgfs_bf = &mvmvif->dbgfs_bf; |
| 314 | |
| 315 | dbgfs_bf->mask |= param; |
| 316 | |
| 317 | switch (param) { |
| 318 | case MVM_DEBUGFS_BF_ENERGY_DELTA: |
| 319 | dbgfs_bf->bf_energy_delta = value; |
| 320 | break; |
| 321 | case MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA: |
| 322 | dbgfs_bf->bf_roaming_energy_delta = value; |
| 323 | break; |
| 324 | case MVM_DEBUGFS_BF_ROAMING_STATE: |
| 325 | dbgfs_bf->bf_roaming_state = value; |
| 326 | break; |
| 327 | case MVM_DEBUGFS_BF_TEMP_THRESHOLD: |
| 328 | dbgfs_bf->bf_temp_threshold = value; |
| 329 | break; |
| 330 | case MVM_DEBUGFS_BF_TEMP_FAST_FILTER: |
| 331 | dbgfs_bf->bf_temp_fast_filter = value; |
| 332 | break; |
| 333 | case MVM_DEBUGFS_BF_TEMP_SLOW_FILTER: |
| 334 | dbgfs_bf->bf_temp_slow_filter = value; |
| 335 | break; |
| 336 | case MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER: |
| 337 | dbgfs_bf->bf_enable_beacon_filter = value; |
| 338 | break; |
| 339 | case MVM_DEBUGFS_BF_DEBUG_FLAG: |
| 340 | dbgfs_bf->bf_debug_flag = value; |
| 341 | break; |
| 342 | case MVM_DEBUGFS_BF_ESCAPE_TIMER: |
| 343 | dbgfs_bf->bf_escape_timer = value; |
| 344 | break; |
| 345 | case MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT: |
| 346 | dbgfs_bf->ba_enable_beacon_abort = value; |
| 347 | break; |
| 348 | case MVM_DEBUGFS_BA_ESCAPE_TIMER: |
| 349 | dbgfs_bf->ba_escape_timer = value; |
| 350 | break; |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | static ssize_t iwl_dbgfs_bf_params_write(struct ieee80211_vif *vif, char *buf, |
| 355 | size_t count, loff_t *ppos) |
| 356 | { |
| 357 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 358 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 359 | enum iwl_dbgfs_bf_mask param; |
| 360 | int value, ret = 0; |
| 361 | |
| 362 | if (!strncmp("bf_energy_delta=", buf, 16)) { |
| 363 | if (sscanf(buf+16, "%d", &value) != 1) |
| 364 | return -EINVAL; |
| 365 | if (value < IWL_BF_ENERGY_DELTA_MIN || |
| 366 | value > IWL_BF_ENERGY_DELTA_MAX) |
| 367 | return -EINVAL; |
| 368 | param = MVM_DEBUGFS_BF_ENERGY_DELTA; |
| 369 | } else if (!strncmp("bf_roaming_energy_delta=", buf, 24)) { |
| 370 | if (sscanf(buf+24, "%d", &value) != 1) |
| 371 | return -EINVAL; |
| 372 | if (value < IWL_BF_ROAMING_ENERGY_DELTA_MIN || |
| 373 | value > IWL_BF_ROAMING_ENERGY_DELTA_MAX) |
| 374 | return -EINVAL; |
| 375 | param = MVM_DEBUGFS_BF_ROAMING_ENERGY_DELTA; |
| 376 | } else if (!strncmp("bf_roaming_state=", buf, 17)) { |
| 377 | if (sscanf(buf+17, "%d", &value) != 1) |
| 378 | return -EINVAL; |
| 379 | if (value < IWL_BF_ROAMING_STATE_MIN || |
| 380 | value > IWL_BF_ROAMING_STATE_MAX) |
| 381 | return -EINVAL; |
| 382 | param = MVM_DEBUGFS_BF_ROAMING_STATE; |
| 383 | } else if (!strncmp("bf_temp_threshold=", buf, 18)) { |
| 384 | if (sscanf(buf+18, "%d", &value) != 1) |
| 385 | return -EINVAL; |
| 386 | if (value < IWL_BF_TEMP_THRESHOLD_MIN || |
| 387 | value > IWL_BF_TEMP_THRESHOLD_MAX) |
| 388 | return -EINVAL; |
| 389 | param = MVM_DEBUGFS_BF_TEMP_THRESHOLD; |
| 390 | } else if (!strncmp("bf_temp_fast_filter=", buf, 20)) { |
| 391 | if (sscanf(buf+20, "%d", &value) != 1) |
| 392 | return -EINVAL; |
| 393 | if (value < IWL_BF_TEMP_FAST_FILTER_MIN || |
| 394 | value > IWL_BF_TEMP_FAST_FILTER_MAX) |
| 395 | return -EINVAL; |
| 396 | param = MVM_DEBUGFS_BF_TEMP_FAST_FILTER; |
| 397 | } else if (!strncmp("bf_temp_slow_filter=", buf, 20)) { |
| 398 | if (sscanf(buf+20, "%d", &value) != 1) |
| 399 | return -EINVAL; |
| 400 | if (value < IWL_BF_TEMP_SLOW_FILTER_MIN || |
| 401 | value > IWL_BF_TEMP_SLOW_FILTER_MAX) |
| 402 | return -EINVAL; |
| 403 | param = MVM_DEBUGFS_BF_TEMP_SLOW_FILTER; |
| 404 | } else if (!strncmp("bf_enable_beacon_filter=", buf, 24)) { |
| 405 | if (sscanf(buf+24, "%d", &value) != 1) |
| 406 | return -EINVAL; |
| 407 | if (value < 0 || value > 1) |
| 408 | return -EINVAL; |
| 409 | param = MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER; |
| 410 | } else if (!strncmp("bf_debug_flag=", buf, 14)) { |
| 411 | if (sscanf(buf+14, "%d", &value) != 1) |
| 412 | return -EINVAL; |
| 413 | if (value < 0 || value > 1) |
| 414 | return -EINVAL; |
| 415 | param = MVM_DEBUGFS_BF_DEBUG_FLAG; |
| 416 | } else if (!strncmp("bf_escape_timer=", buf, 16)) { |
| 417 | if (sscanf(buf+16, "%d", &value) != 1) |
| 418 | return -EINVAL; |
| 419 | if (value < IWL_BF_ESCAPE_TIMER_MIN || |
| 420 | value > IWL_BF_ESCAPE_TIMER_MAX) |
| 421 | return -EINVAL; |
| 422 | param = MVM_DEBUGFS_BF_ESCAPE_TIMER; |
| 423 | } else if (!strncmp("ba_escape_timer=", buf, 16)) { |
| 424 | if (sscanf(buf+16, "%d", &value) != 1) |
| 425 | return -EINVAL; |
| 426 | if (value < IWL_BA_ESCAPE_TIMER_MIN || |
| 427 | value > IWL_BA_ESCAPE_TIMER_MAX) |
| 428 | return -EINVAL; |
| 429 | param = MVM_DEBUGFS_BA_ESCAPE_TIMER; |
| 430 | } else if (!strncmp("ba_enable_beacon_abort=", buf, 23)) { |
| 431 | if (sscanf(buf+23, "%d", &value) != 1) |
| 432 | return -EINVAL; |
| 433 | if (value < 0 || value > 1) |
| 434 | return -EINVAL; |
| 435 | param = MVM_DEBUGFS_BA_ENABLE_BEACON_ABORT; |
| 436 | } else { |
| 437 | return -EINVAL; |
| 438 | } |
| 439 | |
| 440 | mutex_lock(&mvm->mutex); |
| 441 | iwl_dbgfs_update_bf(vif, param, value); |
| 442 | if (param == MVM_DEBUGFS_BF_ENABLE_BEACON_FILTER && !value) |
Emmanuel Grumbach | a102292 | 2014-05-12 11:36:41 +0300 | [diff] [blame] | 443 | ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 444 | else |
Emmanuel Grumbach | a102292 | 2014-05-12 11:36:41 +0300 | [diff] [blame] | 445 | ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 446 | mutex_unlock(&mvm->mutex); |
| 447 | |
| 448 | return ret ?: count; |
| 449 | } |
| 450 | |
| 451 | static ssize_t iwl_dbgfs_bf_params_read(struct file *file, |
| 452 | char __user *user_buf, |
| 453 | size_t count, loff_t *ppos) |
| 454 | { |
| 455 | struct ieee80211_vif *vif = file->private_data; |
| 456 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 457 | char buf[256]; |
| 458 | int pos = 0; |
| 459 | const size_t bufsz = sizeof(buf); |
| 460 | struct iwl_beacon_filter_cmd cmd = { |
| 461 | IWL_BF_CMD_CONFIG_DEFAULTS, |
| 462 | .bf_enable_beacon_filter = |
| 463 | cpu_to_le32(IWL_BF_ENABLE_BEACON_FILTER_DEFAULT), |
| 464 | .ba_enable_beacon_abort = |
| 465 | cpu_to_le32(IWL_BA_ENABLE_BEACON_ABORT_DEFAULT), |
| 466 | }; |
| 467 | |
| 468 | iwl_mvm_beacon_filter_debugfs_parameters(vif, &cmd); |
| 469 | if (mvmvif->bf_data.bf_enabled) |
| 470 | cmd.bf_enable_beacon_filter = cpu_to_le32(1); |
| 471 | else |
| 472 | cmd.bf_enable_beacon_filter = 0; |
| 473 | |
| 474 | pos += scnprintf(buf+pos, bufsz-pos, "bf_energy_delta = %d\n", |
| 475 | le32_to_cpu(cmd.bf_energy_delta)); |
| 476 | pos += scnprintf(buf+pos, bufsz-pos, "bf_roaming_energy_delta = %d\n", |
| 477 | le32_to_cpu(cmd.bf_roaming_energy_delta)); |
| 478 | pos += scnprintf(buf+pos, bufsz-pos, "bf_roaming_state = %d\n", |
| 479 | le32_to_cpu(cmd.bf_roaming_state)); |
| 480 | pos += scnprintf(buf+pos, bufsz-pos, "bf_temp_threshold = %d\n", |
| 481 | le32_to_cpu(cmd.bf_temp_threshold)); |
| 482 | pos += scnprintf(buf+pos, bufsz-pos, "bf_temp_fast_filter = %d\n", |
| 483 | le32_to_cpu(cmd.bf_temp_fast_filter)); |
| 484 | pos += scnprintf(buf+pos, bufsz-pos, "bf_temp_slow_filter = %d\n", |
| 485 | le32_to_cpu(cmd.bf_temp_slow_filter)); |
| 486 | pos += scnprintf(buf+pos, bufsz-pos, "bf_enable_beacon_filter = %d\n", |
| 487 | le32_to_cpu(cmd.bf_enable_beacon_filter)); |
| 488 | pos += scnprintf(buf+pos, bufsz-pos, "bf_debug_flag = %d\n", |
| 489 | le32_to_cpu(cmd.bf_debug_flag)); |
| 490 | pos += scnprintf(buf+pos, bufsz-pos, "bf_escape_timer = %d\n", |
| 491 | le32_to_cpu(cmd.bf_escape_timer)); |
| 492 | pos += scnprintf(buf+pos, bufsz-pos, "ba_escape_timer = %d\n", |
| 493 | le32_to_cpu(cmd.ba_escape_timer)); |
| 494 | pos += scnprintf(buf+pos, bufsz-pos, "ba_enable_beacon_abort = %d\n", |
| 495 | le32_to_cpu(cmd.ba_enable_beacon_abort)); |
| 496 | |
| 497 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
| 498 | } |
| 499 | |
Johannes Berg | a21d7bc | 2013-11-12 17:30:52 +0100 | [diff] [blame] | 500 | static ssize_t iwl_dbgfs_low_latency_write(struct ieee80211_vif *vif, char *buf, |
| 501 | size_t count, loff_t *ppos) |
| 502 | { |
| 503 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 504 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 505 | u8 value; |
| 506 | int ret; |
| 507 | |
| 508 | ret = kstrtou8(buf, 0, &value); |
| 509 | if (ret) |
| 510 | return ret; |
| 511 | if (value > 1) |
| 512 | return -EINVAL; |
| 513 | |
| 514 | mutex_lock(&mvm->mutex); |
| 515 | iwl_mvm_update_low_latency(mvm, vif, value); |
| 516 | mutex_unlock(&mvm->mutex); |
| 517 | |
| 518 | return count; |
| 519 | } |
| 520 | |
| 521 | static ssize_t iwl_dbgfs_low_latency_read(struct file *file, |
| 522 | char __user *user_buf, |
| 523 | size_t count, loff_t *ppos) |
| 524 | { |
| 525 | struct ieee80211_vif *vif = file->private_data; |
| 526 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 527 | char buf[3]; |
| 528 | |
| 529 | buf[0] = mvmvif->low_latency ? '1' : '0'; |
| 530 | buf[1] = '\n'; |
| 531 | buf[2] = '\0'; |
| 532 | return simple_read_from_buffer(user_buf, count, ppos, buf, sizeof(buf)); |
| 533 | } |
| 534 | |
Johannes Berg | e39c1b5 | 2015-01-09 14:15:32 +0100 | [diff] [blame] | 535 | static ssize_t iwl_dbgfs_uapsd_misbehaving_read(struct file *file, |
| 536 | char __user *user_buf, |
| 537 | size_t count, loff_t *ppos) |
| 538 | { |
| 539 | struct ieee80211_vif *vif = file->private_data; |
| 540 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 541 | char buf[20]; |
| 542 | int len; |
| 543 | |
| 544 | len = sprintf(buf, "%pM\n", mvmvif->uapsd_misbehaving_bssid); |
| 545 | return simple_read_from_buffer(user_buf, count, ppos, buf, len); |
| 546 | } |
| 547 | |
| 548 | static ssize_t iwl_dbgfs_uapsd_misbehaving_write(struct ieee80211_vif *vif, |
| 549 | char *buf, size_t count, |
| 550 | loff_t *ppos) |
| 551 | { |
| 552 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 553 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 554 | bool ret; |
| 555 | |
| 556 | mutex_lock(&mvm->mutex); |
| 557 | ret = mac_pton(buf, mvmvif->uapsd_misbehaving_bssid); |
| 558 | mutex_unlock(&mvm->mutex); |
| 559 | |
| 560 | return ret ? count : -EINVAL; |
| 561 | } |
| 562 | |
Emmanuel Grumbach | ddf89ab | 2015-02-08 10:56:43 +0200 | [diff] [blame] | 563 | static ssize_t iwl_dbgfs_rx_phyinfo_write(struct ieee80211_vif *vif, char *buf, |
| 564 | size_t count, loff_t *ppos) |
| 565 | { |
| 566 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 567 | struct iwl_mvm *mvm = mvmvif->mvm; |
| 568 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 569 | struct iwl_mvm_phy_ctxt *phy_ctxt; |
| 570 | u16 value; |
| 571 | int ret; |
| 572 | |
| 573 | ret = kstrtou16(buf, 0, &value); |
| 574 | if (ret) |
| 575 | return ret; |
| 576 | |
| 577 | mutex_lock(&mvm->mutex); |
| 578 | rcu_read_lock(); |
| 579 | |
| 580 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 581 | /* make sure the channel context is assigned */ |
| 582 | if (!chanctx_conf) { |
| 583 | rcu_read_unlock(); |
| 584 | mutex_unlock(&mvm->mutex); |
| 585 | return -EINVAL; |
| 586 | } |
| 587 | |
| 588 | phy_ctxt = &mvm->phy_ctxts[*(u16 *)chanctx_conf->drv_priv]; |
| 589 | rcu_read_unlock(); |
| 590 | |
| 591 | mvm->dbgfs_rx_phyinfo = value; |
| 592 | |
| 593 | ret = iwl_mvm_phy_ctxt_changed(mvm, phy_ctxt, &chanctx_conf->min_def, |
| 594 | chanctx_conf->rx_chains_static, |
| 595 | chanctx_conf->rx_chains_dynamic); |
| 596 | mutex_unlock(&mvm->mutex); |
| 597 | |
| 598 | return ret ?: count; |
| 599 | } |
| 600 | |
| 601 | static ssize_t iwl_dbgfs_rx_phyinfo_read(struct file *file, |
| 602 | char __user *user_buf, |
| 603 | size_t count, loff_t *ppos) |
| 604 | { |
| 605 | struct ieee80211_vif *vif = file->private_data; |
| 606 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 607 | char buf[8]; |
| 608 | |
| 609 | snprintf(buf, sizeof(buf), "0x%04x\n", mvmvif->mvm->dbgfs_rx_phyinfo); |
| 610 | |
| 611 | return simple_read_from_buffer(user_buf, count, ppos, buf, sizeof(buf)); |
| 612 | } |
| 613 | |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 614 | #define MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz) \ |
| 615 | _MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct ieee80211_vif) |
| 616 | #define MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \ |
| 617 | _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz, struct ieee80211_vif) |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 618 | #define MVM_DEBUGFS_ADD_FILE_VIF(name, parent, mode) do { \ |
| 619 | if (!debugfs_create_file(#name, mode, parent, vif, \ |
| 620 | &iwl_dbgfs_##name##_ops)) \ |
| 621 | goto err; \ |
| 622 | } while (0) |
| 623 | |
| 624 | MVM_DEBUGFS_READ_FILE_OPS(mac_params); |
Matti Gottlieb | 25870cb | 2015-05-04 09:34:37 +0300 | [diff] [blame] | 625 | MVM_DEBUGFS_READ_FILE_OPS(tx_pwr_lmt); |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 626 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(pm_params, 32); |
| 627 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(bf_params, 256); |
Johannes Berg | a21d7bc | 2013-11-12 17:30:52 +0100 | [diff] [blame] | 628 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(low_latency, 10); |
Johannes Berg | e39c1b5 | 2015-01-09 14:15:32 +0100 | [diff] [blame] | 629 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(uapsd_misbehaving, 20); |
Emmanuel Grumbach | ddf89ab | 2015-02-08 10:56:43 +0200 | [diff] [blame] | 630 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(rx_phyinfo, 10); |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 631 | |
| 632 | void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
| 633 | { |
| 634 | struct dentry *dbgfs_dir = vif->debugfs_dir; |
| 635 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 636 | char buf[100]; |
| 637 | |
| 638 | /* |
| 639 | * Check if debugfs directory already exist before creating it. |
| 640 | * This may happen when, for example, resetting hw or suspend-resume |
| 641 | */ |
| 642 | if (!dbgfs_dir || mvmvif->dbgfs_dir) |
| 643 | return; |
| 644 | |
| 645 | mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 646 | |
| 647 | if (!mvmvif->dbgfs_dir) { |
| 648 | IWL_ERR(mvm, "Failed to create debugfs directory under %s\n", |
| 649 | dbgfs_dir->d_name.name); |
| 650 | return; |
| 651 | } |
| 652 | |
Emmanuel Grumbach | ad2549d | 2014-03-30 09:50:54 +0300 | [diff] [blame] | 653 | if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 654 | ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) || |
| 655 | (vif->type == NL80211_IFTYPE_STATION && vif->p2p && |
Alexander Bondar | 7303dd7f | 2014-02-03 21:57:28 +0200 | [diff] [blame] | 656 | mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM))) |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 657 | MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, S_IWUSR | |
| 658 | S_IRUSR); |
| 659 | |
Matti Gottlieb | 25870cb | 2015-05-04 09:34:37 +0300 | [diff] [blame] | 660 | MVM_DEBUGFS_ADD_FILE_VIF(tx_pwr_lmt, mvmvif->dbgfs_dir, S_IRUSR); |
Emmanuel Grumbach | 32a65c3 | 2014-01-12 11:19:13 +0200 | [diff] [blame] | 661 | MVM_DEBUGFS_ADD_FILE_VIF(mac_params, mvmvif->dbgfs_dir, S_IRUSR); |
Johannes Berg | a21d7bc | 2013-11-12 17:30:52 +0100 | [diff] [blame] | 662 | MVM_DEBUGFS_ADD_FILE_VIF(low_latency, mvmvif->dbgfs_dir, |
| 663 | S_IRUSR | S_IWUSR); |
Johannes Berg | e39c1b5 | 2015-01-09 14:15:32 +0100 | [diff] [blame] | 664 | MVM_DEBUGFS_ADD_FILE_VIF(uapsd_misbehaving, mvmvif->dbgfs_dir, |
| 665 | S_IRUSR | S_IWUSR); |
Emmanuel Grumbach | ddf89ab | 2015-02-08 10:56:43 +0200 | [diff] [blame] | 666 | MVM_DEBUGFS_ADD_FILE_VIF(rx_phyinfo, mvmvif->dbgfs_dir, |
| 667 | S_IRUSR | S_IWUSR); |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 668 | |
Alexander Bondar | e45a941 | 2013-12-04 10:13:24 +0200 | [diff] [blame] | 669 | if (vif->type == NL80211_IFTYPE_STATION && !vif->p2p && |
| 670 | mvmvif == mvm->bf_allowed_vif) |
| 671 | MVM_DEBUGFS_ADD_FILE_VIF(bf_params, mvmvif->dbgfs_dir, |
| 672 | S_IRUSR | S_IWUSR); |
| 673 | |
Johannes Berg | 820a1a5 | 2013-11-12 16:58:41 +0100 | [diff] [blame] | 674 | /* |
| 675 | * Create symlink for convenience pointing to interface specific |
| 676 | * debugfs entries for the driver. For example, under |
| 677 | * /sys/kernel/debug/iwlwifi/0000\:02\:00.0/iwlmvm/ |
| 678 | * find |
| 679 | * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/ |
| 680 | */ |
| 681 | snprintf(buf, 100, "../../../%s/%s/%s/%s", |
| 682 | dbgfs_dir->d_parent->d_parent->d_name.name, |
| 683 | dbgfs_dir->d_parent->d_name.name, |
| 684 | dbgfs_dir->d_name.name, |
| 685 | mvmvif->dbgfs_dir->d_name.name); |
| 686 | |
| 687 | mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name, |
| 688 | mvm->debugfs_dir, buf); |
| 689 | if (!mvmvif->dbgfs_slink) |
| 690 | IWL_ERR(mvm, "Can't create debugfs symbolic link under %s\n", |
| 691 | dbgfs_dir->d_name.name); |
| 692 | return; |
| 693 | err: |
| 694 | IWL_ERR(mvm, "Can't create debugfs entity\n"); |
| 695 | } |
| 696 | |
| 697 | void iwl_mvm_vif_dbgfs_clean(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
| 698 | { |
| 699 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
| 700 | |
| 701 | debugfs_remove(mvmvif->dbgfs_slink); |
| 702 | mvmvif->dbgfs_slink = NULL; |
| 703 | |
| 704 | debugfs_remove_recursive(mvmvif->dbgfs_dir); |
| 705 | mvmvif->dbgfs_dir = NULL; |
| 706 | } |