hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/wireless/intel/iwlegacy/3945-rs.c
....@@ -1,22 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
34 * Copyright(c) 2005 - 2011 Intel Corporation. All rights reserved.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of version 2 of the GNU General Public License as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along with
15
- * this program; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17
- *
18
- * The full GNU General Public License is included in this distribution in the
19
- * file called LICENSE.
205 *
216 * Contact Information:
227 * Intel Linux Wireless <ilw@linux.intel.com>
....@@ -139,7 +124,7 @@
139124 win->stamp = 0;
140125 }
141126
142
-/**
127
+/*
143128 * il3945_rate_scale_flush_wins - flush out the rate scale wins
144129 *
145130 * Returns the number of wins that have gathered data but were
....@@ -244,7 +229,7 @@
244229 D_RATE("leave\n");
245230 }
246231
247
-/**
232
+/*
248233 * il3945_collect_tx_data - Update the success/failure sliding win
249234 *
250235 * We keep a sliding win of the last 64 packets transmitted
....@@ -389,7 +374,7 @@
389374 }
390375
391376 static void *
392
-il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
377
+il3945_rs_alloc(struct ieee80211_hw *hw)
393378 {
394379 return hw->priv;
395380 }
....@@ -431,7 +416,7 @@
431416 del_timer_sync(&rs_sta->rate_scale_flush);
432417 }
433418
434
-/**
419
+/*
435420 * il3945_rs_tx_status - Update rate control values based on Tx results
436421 *
437422 * NOTE: Uses il_priv->retry_rate for the # of retries attempted by
....@@ -599,7 +584,7 @@
599584 return (high << 8) | low;
600585 }
601586
602
-/**
587
+/*
603588 * il3945_rs_get_rate - find the rate for the requested packet
604589 *
605590 * Returns the ieee80211_rate structure allocated by the driver.
....@@ -645,9 +630,6 @@
645630 D_RATE("Rate scaling information not initialized yet.\n");
646631 il_sta = NULL;
647632 }
648
-
649
- if (rate_control_send_low(sta, il_sta, txrc))
650
- return;
651633
652634 rate_mask = sta->supp_rates[sband->band];
653635
....@@ -781,7 +763,7 @@
781763
782764 switch (scale_action) {
783765 case -1:
784
- /* Decrese rate */
766
+ /* Decrease rate */
785767 if (low != RATE_INVALID)
786768 idx = low;
787769 break;
....@@ -861,17 +843,8 @@
861843 {
862844 struct il3945_rs_sta *lq_sta = il_sta;
863845
864
- lq_sta->rs_sta_dbgfs_stats_table_file =
865
- debugfs_create_file("rate_stats_table", 0600, dir, lq_sta,
866
- &rs_sta_dbgfs_stats_table_ops);
867
-
868
-}
869
-
870
-static void
871
-il3945_remove_debugfs(void *il, void *il_sta)
872
-{
873
- struct il3945_rs_sta *lq_sta = il_sta;
874
- debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file);
846
+ debugfs_create_file("rate_stats_table", 0600, dir, lq_sta,
847
+ &rs_sta_dbgfs_stats_table_ops);
875848 }
876849 #endif
877850
....@@ -898,7 +871,6 @@
898871 .free_sta = il3945_rs_free_sta,
899872 #ifdef CONFIG_MAC80211_DEBUGFS
900873 .add_sta_debugfs = il3945_add_debugfs,
901
- .remove_sta_debugfs = il3945_remove_debugfs,
902874 #endif
903875
904876 };