diff options
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/debugfs.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/debugfs.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 835c902b84c1..7ad4e5328439 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. | 2 | * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. |
3 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. | 3 | * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. |
4 | * | 4 | * |
5 | * Permission to use, copy, modify, and/or distribute this software for any | 5 | * Permission to use, copy, modify, and/or distribute this software for any |
6 | * purpose with or without fee is hereby granted, provided that the above | 6 | * purpose with or without fee is hereby granted, provided that the above |
@@ -162,7 +162,7 @@ static int ring_show(struct seq_file *s, void *data) | |||
162 | 162 | ||
163 | snprintf(name, sizeof(name), "tx_%2d", i); | 163 | snprintf(name, sizeof(name), "tx_%2d", i); |
164 | 164 | ||
165 | if (cid < WIL6210_MAX_CID) | 165 | if (cid < max_assoc_sta) |
166 | seq_printf(s, | 166 | seq_printf(s, |
167 | "\n%pM CID %d TID %d 1x%s BACK([%u] %u TU A%s) [%3d|%3d] idle %s\n", | 167 | "\n%pM CID %d TID %d 1x%s BACK([%u] %u TU A%s) [%3d|%3d] idle %s\n", |
168 | wil->sta[cid].addr, cid, tid, | 168 | wil->sta[cid].addr, cid, tid, |
@@ -792,14 +792,14 @@ static ssize_t wil_write_back(struct file *file, const char __user *buf, | |||
792 | "BACK: del_rx require at least 2 params\n"); | 792 | "BACK: del_rx require at least 2 params\n"); |
793 | return -EINVAL; | 793 | return -EINVAL; |
794 | } | 794 | } |
795 | if (p1 < 0 || p1 >= WIL6210_MAX_CID) { | 795 | if (p1 < 0 || p1 >= max_assoc_sta) { |
796 | wil_err(wil, "BACK: invalid CID %d\n", p1); | 796 | wil_err(wil, "BACK: invalid CID %d\n", p1); |
797 | return -EINVAL; | 797 | return -EINVAL; |
798 | } | 798 | } |
799 | if (rc < 4) | 799 | if (rc < 4) |
800 | p3 = WLAN_REASON_QSTA_LEAVE_QBSS; | 800 | p3 = WLAN_REASON_QSTA_LEAVE_QBSS; |
801 | sta = &wil->sta[p1]; | 801 | sta = &wil->sta[p1]; |
802 | wmi_delba_rx(wil, sta->mid, mk_cidxtid(p1, p2), p3); | 802 | wmi_delba_rx(wil, sta->mid, p1, p2, p3); |
803 | } else { | 803 | } else { |
804 | wil_err(wil, "BACK: Unrecognized command \"%s\"\n", cmd); | 804 | wil_err(wil, "BACK: Unrecognized command \"%s\"\n", cmd); |
805 | return -EINVAL; | 805 | return -EINVAL; |
@@ -1243,7 +1243,7 @@ static int bf_show(struct seq_file *s, void *data) | |||
1243 | 1243 | ||
1244 | memset(&reply, 0, sizeof(reply)); | 1244 | memset(&reply, 0, sizeof(reply)); |
1245 | 1245 | ||
1246 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1246 | for (i = 0; i < max_assoc_sta; i++) { |
1247 | u32 status; | 1247 | u32 status; |
1248 | 1248 | ||
1249 | cmd.cid = i; | 1249 | cmd.cid = i; |
@@ -1340,7 +1340,7 @@ static int link_show(struct seq_file *s, void *data) | |||
1340 | if (!sinfo) | 1340 | if (!sinfo) |
1341 | return -ENOMEM; | 1341 | return -ENOMEM; |
1342 | 1342 | ||
1343 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1343 | for (i = 0; i < max_assoc_sta; i++) { |
1344 | struct wil_sta_info *p = &wil->sta[i]; | 1344 | struct wil_sta_info *p = &wil->sta[i]; |
1345 | char *status = "unknown"; | 1345 | char *status = "unknown"; |
1346 | struct wil6210_vif *vif; | 1346 | struct wil6210_vif *vif; |
@@ -1542,7 +1542,7 @@ __acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock) | |||
1542 | struct wil6210_priv *wil = s->private; | 1542 | struct wil6210_priv *wil = s->private; |
1543 | int i, tid, mcs; | 1543 | int i, tid, mcs; |
1544 | 1544 | ||
1545 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1545 | for (i = 0; i < max_assoc_sta; i++) { |
1546 | struct wil_sta_info *p = &wil->sta[i]; | 1546 | struct wil_sta_info *p = &wil->sta[i]; |
1547 | char *status = "unknown"; | 1547 | char *status = "unknown"; |
1548 | u8 aid = 0; | 1548 | u8 aid = 0; |
@@ -1651,7 +1651,7 @@ __acquires(&p->tid_rx_lock) __releases(&p->tid_rx_lock) | |||
1651 | struct wil6210_priv *wil = s->private; | 1651 | struct wil6210_priv *wil = s->private; |
1652 | int i, bin; | 1652 | int i, bin; |
1653 | 1653 | ||
1654 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1654 | for (i = 0; i < max_assoc_sta; i++) { |
1655 | struct wil_sta_info *p = &wil->sta[i]; | 1655 | struct wil_sta_info *p = &wil->sta[i]; |
1656 | char *status = "unknown"; | 1656 | char *status = "unknown"; |
1657 | u8 aid = 0; | 1657 | u8 aid = 0; |
@@ -1740,7 +1740,7 @@ static ssize_t wil_tx_latency_write(struct file *file, const char __user *buf, | |||
1740 | size_t sz = sizeof(u64) * WIL_NUM_LATENCY_BINS; | 1740 | size_t sz = sizeof(u64) * WIL_NUM_LATENCY_BINS; |
1741 | 1741 | ||
1742 | wil->tx_latency_res = val; | 1742 | wil->tx_latency_res = val; |
1743 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1743 | for (i = 0; i < max_assoc_sta; i++) { |
1744 | struct wil_sta_info *sta = &wil->sta[i]; | 1744 | struct wil_sta_info *sta = &wil->sta[i]; |
1745 | 1745 | ||
1746 | kfree(sta->tx_latency_bins); | 1746 | kfree(sta->tx_latency_bins); |
@@ -1825,7 +1825,7 @@ static void wil_link_stats_debugfs_show_vif(struct wil6210_vif *vif, | |||
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | seq_printf(s, "TSF %lld\n", vif->fw_stats_tsf); | 1827 | seq_printf(s, "TSF %lld\n", vif->fw_stats_tsf); |
1828 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { | 1828 | for (i = 0; i < max_assoc_sta; i++) { |
1829 | if (wil->sta[i].status == wil_sta_unused) | 1829 | if (wil->sta[i].status == wil_sta_unused) |
1830 | continue; | 1830 | continue; |
1831 | if (wil->sta[i].mid != vif->mid) | 1831 | if (wil->sta[i].mid != vif->mid) |
@@ -2386,6 +2386,7 @@ static const struct dbg_off dbg_statics[] = { | |||
2386 | {"led_polarity", 0644, (ulong)&led_polarity, doff_u8}, | 2386 | {"led_polarity", 0644, (ulong)&led_polarity, doff_u8}, |
2387 | {"status_index", 0644, (ulong)&dbg_status_msg_index, doff_u32}, | 2387 | {"status_index", 0644, (ulong)&dbg_status_msg_index, doff_u32}, |
2388 | {"sring_index", 0644, (ulong)&dbg_sring_index, doff_u32}, | 2388 | {"sring_index", 0644, (ulong)&dbg_sring_index, doff_u32}, |
2389 | {"drop_if_ring_full", 0644, (ulong)&drop_if_ring_full, doff_u8}, | ||
2389 | {}, | 2390 | {}, |
2390 | }; | 2391 | }; |
2391 | 2392 | ||
@@ -2439,7 +2440,7 @@ void wil6210_debugfs_remove(struct wil6210_priv *wil) | |||
2439 | wil->debug = NULL; | 2440 | wil->debug = NULL; |
2440 | 2441 | ||
2441 | kfree(wil->dbg_data.data_arr); | 2442 | kfree(wil->dbg_data.data_arr); |
2442 | for (i = 0; i < ARRAY_SIZE(wil->sta); i++) | 2443 | for (i = 0; i < max_assoc_sta; i++) |
2443 | kfree(wil->sta[i].tx_latency_bins); | 2444 | kfree(wil->sta[i].tx_latency_bins); |
2444 | 2445 | ||
2445 | /* free pmc memory without sending command to fw, as it will | 2446 | /* free pmc memory without sending command to fw, as it will |