diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2017-08-31 05:57:33 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-10-06 07:57:21 -0400 |
commit | d7b9bb69c9b3accbd199b51b28d95d08f37049cd (patch) | |
tree | 9e815cc7e5cc27c370960b8ddaba2f5d98e5a127 /drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | |
parent | 72cbb73e8ad34b2d4409156546678763e91c71b6 (diff) |
iwlwifi: mvm: remove support for Link Quality Measurements
This was never used by any product. Remove it.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index 71a01df96f8b..4228fac77f41 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | |||
@@ -1455,80 +1455,6 @@ static const char * const chanwidths[] = { | |||
1455 | [NL80211_CHAN_WIDTH_160] = "vht160", | 1455 | [NL80211_CHAN_WIDTH_160] = "vht160", |
1456 | }; | 1456 | }; |
1457 | 1457 | ||
1458 | static bool iwl_mvm_lqm_notif_wait(struct iwl_notif_wait_data *notif_wait, | ||
1459 | struct iwl_rx_packet *pkt, void *data) | ||
1460 | { | ||
1461 | struct ieee80211_vif *vif = data; | ||
1462 | struct iwl_mvm *mvm = | ||
1463 | container_of(notif_wait, struct iwl_mvm, notif_wait); | ||
1464 | struct iwl_link_qual_msrmnt_notif *report = (void *)pkt->data; | ||
1465 | u32 num_of_stations = le32_to_cpu(report->number_of_stations); | ||
1466 | int i; | ||
1467 | |||
1468 | IWL_INFO(mvm, "LQM report:\n"); | ||
1469 | IWL_INFO(mvm, "\tstatus: %d\n", report->status); | ||
1470 | IWL_INFO(mvm, "\tmacID: %d\n", le32_to_cpu(report->mac_id)); | ||
1471 | IWL_INFO(mvm, "\ttx_frame_dropped: %d\n", | ||
1472 | le32_to_cpu(report->tx_frame_dropped)); | ||
1473 | IWL_INFO(mvm, "\ttime_in_measurement_window: %d us\n", | ||
1474 | le32_to_cpu(report->time_in_measurement_window)); | ||
1475 | IWL_INFO(mvm, "\ttotal_air_time_other_stations: %d\n", | ||
1476 | le32_to_cpu(report->total_air_time_other_stations)); | ||
1477 | IWL_INFO(mvm, "\tchannel_freq: %d\n", | ||
1478 | vif->bss_conf.chandef.center_freq1); | ||
1479 | IWL_INFO(mvm, "\tchannel_width: %s\n", | ||
1480 | chanwidths[vif->bss_conf.chandef.width]); | ||
1481 | IWL_INFO(mvm, "\tnumber_of_stations: %d\n", num_of_stations); | ||
1482 | for (i = 0; i < num_of_stations; i++) | ||
1483 | IWL_INFO(mvm, "\t\tsta[%d]: %d\n", i, | ||
1484 | report->frequent_stations_air_time[i]); | ||
1485 | |||
1486 | return true; | ||
1487 | } | ||
1488 | |||
1489 | static ssize_t iwl_dbgfs_lqm_send_cmd_write(struct ieee80211_vif *vif, | ||
1490 | char *buf, size_t count, | ||
1491 | loff_t *ppos) | ||
1492 | { | ||
1493 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
1494 | struct iwl_mvm *mvm = mvmvif->mvm; | ||
1495 | struct iwl_notification_wait wait_lqm_notif; | ||
1496 | static u16 lqm_notif[] = { | ||
1497 | WIDE_ID(MAC_CONF_GROUP, | ||
1498 | LINK_QUALITY_MEASUREMENT_COMPLETE_NOTIF) | ||
1499 | }; | ||
1500 | int err; | ||
1501 | u32 duration; | ||
1502 | u32 timeout; | ||
1503 | |||
1504 | if (sscanf(buf, "%d,%d", &duration, &timeout) != 2) | ||
1505 | return -EINVAL; | ||
1506 | |||
1507 | iwl_init_notification_wait(&mvm->notif_wait, &wait_lqm_notif, | ||
1508 | lqm_notif, ARRAY_SIZE(lqm_notif), | ||
1509 | iwl_mvm_lqm_notif_wait, vif); | ||
1510 | mutex_lock(&mvm->mutex); | ||
1511 | err = iwl_mvm_send_lqm_cmd(vif, LQM_CMD_OPERATION_START_MEASUREMENT, | ||
1512 | duration, timeout); | ||
1513 | mutex_unlock(&mvm->mutex); | ||
1514 | |||
1515 | if (err) { | ||
1516 | IWL_ERR(mvm, "Failed to send lqm cmdf(err=%d)\n", err); | ||
1517 | iwl_remove_notification(&mvm->notif_wait, &wait_lqm_notif); | ||
1518 | return err; | ||
1519 | } | ||
1520 | |||
1521 | /* wait for 2 * timeout (safety guard) and convert to jiffies*/ | ||
1522 | timeout = msecs_to_jiffies((timeout * 2) / 1000); | ||
1523 | |||
1524 | err = iwl_wait_notification(&mvm->notif_wait, &wait_lqm_notif, | ||
1525 | timeout); | ||
1526 | if (err) | ||
1527 | IWL_ERR(mvm, "Getting lqm notif timed out\n"); | ||
1528 | |||
1529 | return count; | ||
1530 | } | ||
1531 | |||
1532 | #define MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz) \ | 1458 | #define MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz) \ |
1533 | _MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct ieee80211_vif) | 1459 | _MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct ieee80211_vif) |
1534 | #define MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \ | 1460 | #define MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \ |
@@ -1553,7 +1479,6 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(tof_range_abort, 32); | |||
1553 | MVM_DEBUGFS_READ_FILE_OPS(tof_range_response); | 1479 | MVM_DEBUGFS_READ_FILE_OPS(tof_range_response); |
1554 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(tof_responder_params, 32); | 1480 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(tof_responder_params, 32); |
1555 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(quota_min, 32); | 1481 | MVM_DEBUGFS_READ_WRITE_FILE_OPS(quota_min, 32); |
1556 | MVM_DEBUGFS_WRITE_FILE_OPS(lqm_send_cmd, 64); | ||
1557 | MVM_DEBUGFS_READ_FILE_OPS(os_device_timediff); | 1482 | MVM_DEBUGFS_READ_FILE_OPS(os_device_timediff); |
1558 | 1483 | ||
1559 | 1484 | ||
@@ -1594,7 +1519,6 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1594 | S_IRUSR | S_IWUSR); | 1519 | S_IRUSR | S_IWUSR); |
1595 | MVM_DEBUGFS_ADD_FILE_VIF(quota_min, mvmvif->dbgfs_dir, | 1520 | MVM_DEBUGFS_ADD_FILE_VIF(quota_min, mvmvif->dbgfs_dir, |
1596 | S_IRUSR | S_IWUSR); | 1521 | S_IRUSR | S_IWUSR); |
1597 | MVM_DEBUGFS_ADD_FILE_VIF(lqm_send_cmd, mvmvif->dbgfs_dir, S_IWUSR); | ||
1598 | MVM_DEBUGFS_ADD_FILE_VIF(os_device_timediff, | 1522 | MVM_DEBUGFS_ADD_FILE_VIF(os_device_timediff, |
1599 | mvmvif->dbgfs_dir, S_IRUSR); | 1523 | mvmvif->dbgfs_dir, S_IRUSR); |
1600 | 1524 | ||