|
2 | 2 | /******************************************************************************
|
3 | 3 | *
|
4 | 4 | * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
|
5 |
| - * Copyright (C) 2019 - 2020, 2022 Intel Corporation |
| 5 | + * Copyright (C) 2019 - 2020, 2022 - 2023 Intel Corporation |
6 | 6 | *****************************************************************************/
|
7 | 7 | #include <linux/kernel.h>
|
8 | 8 | #include <linux/skbuff.h>
|
@@ -125,7 +125,7 @@ static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
|
125 | 125 | return idx;
|
126 | 126 | }
|
127 | 127 |
|
128 |
| - return -1; |
| 128 | + return IWL_RATE_INVALID; |
129 | 129 | }
|
130 | 130 |
|
131 | 131 | static void rs_rate_scale_perform(struct iwl_priv *priv,
|
@@ -3146,7 +3146,10 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,
|
3146 | 3146 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) {
|
3147 | 3147 | index = iwl_hwrate_to_plcp_idx(
|
3148 | 3148 | le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags));
|
3149 |
| - if (is_legacy(tbl->lq_type)) { |
| 3149 | + if (index == IWL_RATE_INVALID) { |
| 3150 | + desc += sprintf(buff + desc, " rate[%d] 0x%X invalid rate\n", |
| 3151 | + i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags)); |
| 3152 | + } else if (is_legacy(tbl->lq_type)) { |
3150 | 3153 | desc += sprintf(buff+desc, " rate[%d] 0x%X %smbps\n",
|
3151 | 3154 | i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags),
|
3152 | 3155 | iwl_rate_mcs[index].mbps);
|
|
0 commit comments