hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
34 * Copyright(c) 2005 - 2014 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.
5
+ * Copyright (C) 2019 - 2020 Intel Corporation
206 *
217 * Contact Information:
228 * Intel Linux Wireless <linuxwifi@intel.com>
....@@ -165,7 +151,7 @@
165151 {}
166152 #endif
167153
168
-/**
154
+/*
169155 * The following tables contain the expected throughput metrics for all rates
170156 *
171157 * 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54, 60 MBits
....@@ -332,7 +318,7 @@
332318 }
333319
334320 #ifdef CONFIG_MAC80211_DEBUGFS
335
-/**
321
+/*
336322 * Program the device to use fixed rate for frame transmit
337323 * This is for debugging/testing only
338324 * once the device start use fixed rate, we need to reload the module
....@@ -454,7 +440,7 @@
454440 return 0;
455441 }
456442
457
-/**
443
+/*
458444 * rs_collect_tx_data - Update the success/failure sliding window
459445 *
460446 * We keep a sliding window of the last 62 packets transmitted
....@@ -687,7 +673,7 @@
687673 return 1;
688674 }
689675
690
-/**
676
+/*
691677 * Green-field mode is valid if the station supports it and
692678 * there are no non-GF stations present in the BSS.
693679 */
....@@ -703,7 +689,7 @@
703689 return false;
704690 }
705691
706
-/**
692
+/*
707693 * rs_get_supported_rates - get the available rates
708694 *
709695 * if management frame or broadcast frame only return
....@@ -861,16 +847,6 @@
861847 struct iwl_scale_tbl_info *tbl;
862848 bool full_concurrent = priv->bt_full_concurrent;
863849
864
- if (priv->bt_ant_couple_ok) {
865
- /*
866
- * Is there a need to switch between
867
- * full concurrency and 3-wire?
868
- */
869
- if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
870
- full_concurrent = true;
871
- else
872
- full_concurrent = false;
873
- }
874850 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) ||
875851 (priv->bt_full_concurrent != full_concurrent)) {
876852 priv->bt_full_concurrent = full_concurrent;
....@@ -2636,7 +2612,7 @@
26362612 lq_sta->last_txrate_idx = index;
26372613 }
26382614
2639
-/**
2615
+/*
26402616 * rs_initialize_lq - Initialize a station's hardware rate table
26412617 *
26422618 * The uCode's station table contains a table of fallback rates
....@@ -2734,10 +2710,6 @@
27342710 IWL_DEBUG_RATE(priv, "Rate scaling not initialized yet.\n");
27352711 priv_sta = NULL;
27362712 }
2737
-
2738
- /* Send management frames and NO_ACK data using lowest rate. */
2739
- if (rate_control_send_low(sta, priv_sta, txrc))
2740
- return;
27412713
27422714 rate_idx = lq_sta->last_txrate_idx;
27432715
....@@ -3038,7 +3010,7 @@
30383010 cpu_to_le16(priv->lib->bt_params->agg_time_limit);
30393011 }
30403012
3041
-static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
3013
+static void *rs_alloc(struct ieee80211_hw *hw)
30423014 {
30433015 return hw->priv;
30443016 }
....@@ -3275,28 +3247,16 @@
32753247 struct dentry *dir)
32763248 {
32773249 struct iwl_lq_sta *lq_sta = priv_sta;
3278
- lq_sta->rs_sta_dbgfs_scale_table_file =
3279
- debugfs_create_file("rate_scale_table", 0600, dir,
3280
- lq_sta, &rs_sta_dbgfs_scale_table_ops);
3281
- lq_sta->rs_sta_dbgfs_stats_table_file =
3282
- debugfs_create_file("rate_stats_table", 0400, dir,
3283
- lq_sta, &rs_sta_dbgfs_stats_table_ops);
3284
- lq_sta->rs_sta_dbgfs_rate_scale_data_file =
3285
- debugfs_create_file("rate_scale_data", 0400, dir,
3286
- lq_sta, &rs_sta_dbgfs_rate_scale_data_ops);
3287
- lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file =
3288
- debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
3289
- &lq_sta->tx_agg_tid_en);
32903250
3291
-}
3251
+ debugfs_create_file("rate_scale_table", 0600, dir, lq_sta,
3252
+ &rs_sta_dbgfs_scale_table_ops);
3253
+ debugfs_create_file("rate_stats_table", 0400, dir, lq_sta,
3254
+ &rs_sta_dbgfs_stats_table_ops);
3255
+ debugfs_create_file("rate_scale_data", 0400, dir, lq_sta,
3256
+ &rs_sta_dbgfs_rate_scale_data_ops);
3257
+ debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
3258
+ &lq_sta->tx_agg_tid_en);
32923259
3293
-static void rs_remove_debugfs(void *priv, void *priv_sta)
3294
-{
3295
- struct iwl_lq_sta *lq_sta = priv_sta;
3296
- debugfs_remove(lq_sta->rs_sta_dbgfs_scale_table_file);
3297
- debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file);
3298
- debugfs_remove(lq_sta->rs_sta_dbgfs_rate_scale_data_file);
3299
- debugfs_remove(lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file);
33003260 }
33013261 #endif
33023262
....@@ -3322,7 +3282,6 @@
33223282 .free_sta = rs_free_sta,
33233283 #ifdef CONFIG_MAC80211_DEBUGFS
33243284 .add_sta_debugfs = rs_add_debugfs,
3325
- .remove_sta_debugfs = rs_remove_debugfs,
33263285 #endif
33273286 };
33283287