aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2015-02-27 09:26:57 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-26 03:14:05 -0400
commitcb2513bb71cfaedfb9af37c27744b0e5cef15aa3 (patch)
treed1017a324eceabfe62cd1486886be2daf0b67fd5 /drivers/net/wireless
parent2250fd94c8887bdf0fb583a8f35bf555a0fff81c (diff)
iwlwifi: mvm: use debugfs_create_bool() for enable_scan_iteration_notif
There is no need to implement the enable_scan_iteration_notif handling explicitly and there's no reason not to export the current value. So use debugfs_create_bool() instead. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/debugfs.c28
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h2
2 files changed, 6 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 8c5229892e57..01b97a0c88dc 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -1473,26 +1473,6 @@ out:
1473 return count; 1473 return count;
1474} 1474}
1475 1475
1476static ssize_t iwl_dbgfs_enable_scan_iteration_notif_write(struct iwl_mvm *mvm,
1477 char *buf,
1478 size_t count,
1479 loff_t *ppos)
1480{
1481 int val;
1482
1483 mutex_lock(&mvm->mutex);
1484
1485 if (kstrtoint(buf, 10, &val)) {
1486 mutex_unlock(&mvm->mutex);
1487 return -EINVAL;
1488 }
1489
1490 mvm->scan_iter_notif_enabled = val;
1491 mutex_unlock(&mvm->mutex);
1492
1493 return count;
1494}
1495
1496MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64); 1476MVM_DEBUGFS_READ_WRITE_FILE_OPS(prph_reg, 64);
1497 1477
1498/* Device wide debugfs entries */ 1478/* Device wide debugfs entries */
@@ -1515,7 +1495,6 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8);
1515MVM_DEBUGFS_READ_WRITE_FILE_OPS(d0i3_refs, 8); 1495MVM_DEBUGFS_READ_WRITE_FILE_OPS(d0i3_refs, 8);
1516MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8); 1496MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8);
1517MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 8); 1497MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 8);
1518MVM_DEBUGFS_WRITE_FILE_OPS(enable_scan_iteration_notif, 8);
1519 1498
1520#ifdef CONFIG_IWLWIFI_BCAST_FILTERING 1499#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
1521MVM_DEBUGFS_READ_WRITE_FILE_OPS(bcast_filters, 256); 1500MVM_DEBUGFS_READ_WRITE_FILE_OPS(bcast_filters, 256);
@@ -1559,8 +1538,11 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
1559 MVM_DEBUGFS_ADD_FILE(d0i3_refs, mvm->debugfs_dir, S_IRUSR | S_IWUSR); 1538 MVM_DEBUGFS_ADD_FILE(d0i3_refs, mvm->debugfs_dir, S_IRUSR | S_IWUSR);
1560 MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, S_IRUSR | S_IWUSR); 1539 MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, S_IRUSR | S_IWUSR);
1561 MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, S_IWUSR); 1540 MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, S_IWUSR);
1562 MVM_DEBUGFS_ADD_FILE(enable_scan_iteration_notif, mvm->debugfs_dir, 1541 if (!debugfs_create_bool("enable_scan_iteration_notif",
1563 S_IWUSR); 1542 S_IRUSR | S_IWUSR,
1543 mvm->debugfs_dir,
1544 &mvm->scan_iter_notif_enabled))
1545 goto err;
1564 1546
1565#ifdef CONFIG_IWLWIFI_BCAST_FILTERING 1547#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
1566 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BCAST_FILTERING) { 1548 if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BCAST_FILTERING) {
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 02c02e2b097f..91c74d4f0754 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -688,7 +688,7 @@ struct iwl_mvm {
688 bool disable_power_off; 688 bool disable_power_off;
689 bool disable_power_off_d3; 689 bool disable_power_off_d3;
690 690
691 bool scan_iter_notif_enabled; 691 u32 scan_iter_notif_enabled; /* must be u32 for debugfs_create_bool */
692 692
693 struct debugfs_blob_wrapper nvm_hw_blob; 693 struct debugfs_blob_wrapper nvm_hw_blob;
694 struct debugfs_blob_wrapper nvm_sw_blob; 694 struct debugfs_blob_wrapper nvm_sw_blob;