hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/wireless/intel/iwlegacy/3945.c
....@@ -1,22 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
34 * Copyright(c) 2003 - 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>
....@@ -105,7 +90,7 @@
10590 #define IL_EVT_DISABLE (0)
10691 #define IL_EVT_DISABLE_SIZE (1532/32)
10792
108
-/**
93
+/*
10994 * il3945_disable_events - Disable selected events in uCode event log
11095 *
11196 * Disable an event by writing "1"s into "disable"
....@@ -276,7 +261,7 @@
276261 return next_rate;
277262 }
278263
279
-/**
264
+/*
280265 * il3945_tx_queue_reclaim - Reclaim Tx queue entries already Tx'd
281266 *
282267 * When FW advances 'R' idx, all entries between old and new 'R' idx
....@@ -306,7 +291,7 @@
306291 il_wake_queue(il, txq);
307292 }
308293
309
-/**
294
+/*
310295 * il3945_hdl_tx - Handle Tx response
311296 */
312297 static void
....@@ -642,7 +627,7 @@
642627 return 0;
643628 }
644629
645
-/**
630
+/*
646631 * il3945_hw_txq_free_tfd - Free one TFD, those at idx [txq->q.read_ptr]
647632 *
648633 * Does NOT advance any idxes
....@@ -690,7 +675,7 @@
690675 }
691676 }
692677
693
-/**
678
+/*
694679 * il3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD:
695680 *
696681 */
....@@ -843,7 +828,7 @@
843828 return 0;
844829 }
845830
846
-/**
831
+/*
847832 * il3945_txq_ctx_reset - Reset TX queue context
848833 *
849834 * Destroys all DMA structures and initialize them again
....@@ -1008,7 +993,7 @@
1008993 return 0;
1009994 }
1010995
1011
-/**
996
+/*
1012997 * il3945_hw_txq_ctx_free - Free TXQ Context
1013998 *
1014999 * Destroy all TX DMA queues and structures
....@@ -1050,7 +1035,7 @@
10501035 }
10511036 }
10521037
1053
-/**
1038
+/*
10541039 * il3945_hw_reg_adjust_power_by_temp
10551040 * return idx delta into power gain settings table
10561041 */
....@@ -1060,7 +1045,7 @@
10601045 return (new_reading - old_reading) * (-11) / 100;
10611046 }
10621047
1063
-/**
1048
+/*
10641049 * il3945_hw_reg_temp_out_of_range - Keep temperature in sane range
10651050 */
10661051 static inline int
....@@ -1075,7 +1060,7 @@
10751060 return _il_rd(il, CSR_UCODE_DRV_GP2);
10761061 }
10771062
1078
-/**
1063
+/*
10791064 * il3945_hw_reg_txpower_get_temperature
10801065 * get the current temperature by reading from NIC
10811066 */
....@@ -1111,7 +1096,7 @@
11111096 * Both are lower than older versions' 9 degrees */
11121097 #define IL_TEMPERATURE_LIMIT_TIMER 6
11131098
1114
-/**
1099
+/*
11151100 * il3945_is_temp_calib_needed - determines if new calibration is needed
11161101 *
11171102 * records new temperature in tx_mgr->temperature.
....@@ -1330,7 +1315,7 @@
13301315 /* Kick off thermal recalibration check every 60 seconds */
13311316 #define REG_RECALIB_PERIOD (60)
13321317
1333
-/**
1318
+/*
13341319 * il3945_hw_reg_set_scan_power - Set Tx power for scan probe requests
13351320 *
13361321 * Set (in our channel info database) the direct scan Tx power for 1 Mbit (CCK)
....@@ -1387,7 +1372,7 @@
13871372 power_gain_table[band_idx][power_idx].dsp_atten;
13881373 }
13891374
1390
-/**
1375
+/*
13911376 * il3945_send_tx_power - fill in Tx Power command with gain settings
13921377 *
13931378 * Configures power settings for all rates for the current channel,
....@@ -1454,7 +1439,7 @@
14541439
14551440 }
14561441
1457
-/**
1442
+/*
14581443 * il3945_hw_reg_set_new_power - Configures power tables at new levels
14591444 * @ch_info: Channel to update. Uses power_info.requested_power.
14601445 *
....@@ -1525,7 +1510,7 @@
15251510 return 0;
15261511 }
15271512
1528
-/**
1513
+/*
15291514 * il3945_hw_reg_get_ch_txpower_limit - returns new power limit for channel
15301515 *
15311516 * NOTE: Returned power limit may be less (but not more) than requested,
....@@ -1552,7 +1537,7 @@
15521537 return min(max_power, ch_info->max_power_avg);
15531538 }
15541539
1555
-/**
1540
+/*
15561541 * il3945_hw_reg_comp_txpower_temp - Compensate for temperature
15571542 *
15581543 * Compensate txpower settings of *all* channels for temperature.
....@@ -1714,7 +1699,7 @@
17141699 return rc;
17151700 }
17161701
1717
-/**
1702
+/*
17181703 * il3945_commit_rxon - commit staging_rxon to hardware
17191704 *
17201705 * The RXON command in staging_rxon is committed to the hardware and
....@@ -1845,7 +1830,7 @@
18451830 return 0;
18461831 }
18471832
1848
-/**
1833
+/*
18491834 * il3945_reg_txpower_periodic - called when time to check our temperature.
18501835 *
18511836 * -- reset periodic timer
....@@ -1888,7 +1873,7 @@
18881873 mutex_unlock(&il->mutex);
18891874 }
18901875
1891
-/**
1876
+/*
18921877 * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel.
18931878 *
18941879 * This function is used when initializing channel-info structs.
....@@ -1927,7 +1912,7 @@
19271912 return group_idx;
19281913 }
19291914
1930
-/**
1915
+/*
19311916 * il3945_hw_reg_get_matched_power_idx - Interpolate to get nominal idx
19321917 *
19331918 * Interpolate to get nominal (i.e. at factory calibration temperature) idx
....@@ -2050,7 +2035,7 @@
20502035 }
20512036 }
20522037
2053
-/**
2038
+/*
20542039 * il3945_txpower_set_from_eeprom - Set channel power info based on EEPROM
20552040 *
20562041 * Second pass (during init) to set up il->channel_info
....@@ -2115,7 +2100,7 @@
21152100
21162101 /* set tx power value for all OFDM rates */
21172102 for (rate_idx = 0; rate_idx < IL_OFDM_RATES; rate_idx++) {
2118
- s32 uninitialized_var(power_idx);
2103
+ s32 power_idx;
21192104 int rc;
21202105
21212106 /* use channel group's clip-power table,
....@@ -2320,7 +2305,7 @@
23202305 vif->bss_conf.bssid);
23212306 }
23222307
2323
-/**
2308
+/*
23242309 * il3945_init_hw_rate_table - Initialize the hardware rate fallback table
23252310 */
23262311 int
....@@ -2535,7 +2520,7 @@
25352520 return;
25362521 }
25372522
2538
- /**
2523
+ /*
25392524 * il3945_load_bsm - Load bootstrap instructions
25402525 *
25412526 * BSM operation: