.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /****************************************************************************** |
---|
2 | 3 | * |
---|
3 | 4 | * 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. |
---|
20 | 5 | * |
---|
21 | 6 | * Contact Information: |
---|
22 | 7 | * Intel Linux Wireless <ilw@linux.intel.com> |
---|
.. | .. |
---|
105 | 90 | #define IL_EVT_DISABLE (0) |
---|
106 | 91 | #define IL_EVT_DISABLE_SIZE (1532/32) |
---|
107 | 92 | |
---|
108 | | -/** |
---|
| 93 | +/* |
---|
109 | 94 | * il3945_disable_events - Disable selected events in uCode event log |
---|
110 | 95 | * |
---|
111 | 96 | * Disable an event by writing "1"s into "disable" |
---|
.. | .. |
---|
276 | 261 | return next_rate; |
---|
277 | 262 | } |
---|
278 | 263 | |
---|
279 | | -/** |
---|
| 264 | +/* |
---|
280 | 265 | * il3945_tx_queue_reclaim - Reclaim Tx queue entries already Tx'd |
---|
281 | 266 | * |
---|
282 | 267 | * When FW advances 'R' idx, all entries between old and new 'R' idx |
---|
.. | .. |
---|
306 | 291 | il_wake_queue(il, txq); |
---|
307 | 292 | } |
---|
308 | 293 | |
---|
309 | | -/** |
---|
| 294 | +/* |
---|
310 | 295 | * il3945_hdl_tx - Handle Tx response |
---|
311 | 296 | */ |
---|
312 | 297 | static void |
---|
.. | .. |
---|
642 | 627 | return 0; |
---|
643 | 628 | } |
---|
644 | 629 | |
---|
645 | | -/** |
---|
| 630 | +/* |
---|
646 | 631 | * il3945_hw_txq_free_tfd - Free one TFD, those at idx [txq->q.read_ptr] |
---|
647 | 632 | * |
---|
648 | 633 | * Does NOT advance any idxes |
---|
.. | .. |
---|
690 | 675 | } |
---|
691 | 676 | } |
---|
692 | 677 | |
---|
693 | | -/** |
---|
| 678 | +/* |
---|
694 | 679 | * il3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD: |
---|
695 | 680 | * |
---|
696 | 681 | */ |
---|
.. | .. |
---|
843 | 828 | return 0; |
---|
844 | 829 | } |
---|
845 | 830 | |
---|
846 | | -/** |
---|
| 831 | +/* |
---|
847 | 832 | * il3945_txq_ctx_reset - Reset TX queue context |
---|
848 | 833 | * |
---|
849 | 834 | * Destroys all DMA structures and initialize them again |
---|
.. | .. |
---|
1008 | 993 | return 0; |
---|
1009 | 994 | } |
---|
1010 | 995 | |
---|
1011 | | -/** |
---|
| 996 | +/* |
---|
1012 | 997 | * il3945_hw_txq_ctx_free - Free TXQ Context |
---|
1013 | 998 | * |
---|
1014 | 999 | * Destroy all TX DMA queues and structures |
---|
.. | .. |
---|
1050 | 1035 | } |
---|
1051 | 1036 | } |
---|
1052 | 1037 | |
---|
1053 | | -/** |
---|
| 1038 | +/* |
---|
1054 | 1039 | * il3945_hw_reg_adjust_power_by_temp |
---|
1055 | 1040 | * return idx delta into power gain settings table |
---|
1056 | 1041 | */ |
---|
.. | .. |
---|
1060 | 1045 | return (new_reading - old_reading) * (-11) / 100; |
---|
1061 | 1046 | } |
---|
1062 | 1047 | |
---|
1063 | | -/** |
---|
| 1048 | +/* |
---|
1064 | 1049 | * il3945_hw_reg_temp_out_of_range - Keep temperature in sane range |
---|
1065 | 1050 | */ |
---|
1066 | 1051 | static inline int |
---|
.. | .. |
---|
1075 | 1060 | return _il_rd(il, CSR_UCODE_DRV_GP2); |
---|
1076 | 1061 | } |
---|
1077 | 1062 | |
---|
1078 | | -/** |
---|
| 1063 | +/* |
---|
1079 | 1064 | * il3945_hw_reg_txpower_get_temperature |
---|
1080 | 1065 | * get the current temperature by reading from NIC |
---|
1081 | 1066 | */ |
---|
.. | .. |
---|
1111 | 1096 | * Both are lower than older versions' 9 degrees */ |
---|
1112 | 1097 | #define IL_TEMPERATURE_LIMIT_TIMER 6 |
---|
1113 | 1098 | |
---|
1114 | | -/** |
---|
| 1099 | +/* |
---|
1115 | 1100 | * il3945_is_temp_calib_needed - determines if new calibration is needed |
---|
1116 | 1101 | * |
---|
1117 | 1102 | * records new temperature in tx_mgr->temperature. |
---|
.. | .. |
---|
1330 | 1315 | /* Kick off thermal recalibration check every 60 seconds */ |
---|
1331 | 1316 | #define REG_RECALIB_PERIOD (60) |
---|
1332 | 1317 | |
---|
1333 | | -/** |
---|
| 1318 | +/* |
---|
1334 | 1319 | * il3945_hw_reg_set_scan_power - Set Tx power for scan probe requests |
---|
1335 | 1320 | * |
---|
1336 | 1321 | * Set (in our channel info database) the direct scan Tx power for 1 Mbit (CCK) |
---|
.. | .. |
---|
1387 | 1372 | power_gain_table[band_idx][power_idx].dsp_atten; |
---|
1388 | 1373 | } |
---|
1389 | 1374 | |
---|
1390 | | -/** |
---|
| 1375 | +/* |
---|
1391 | 1376 | * il3945_send_tx_power - fill in Tx Power command with gain settings |
---|
1392 | 1377 | * |
---|
1393 | 1378 | * Configures power settings for all rates for the current channel, |
---|
.. | .. |
---|
1454 | 1439 | |
---|
1455 | 1440 | } |
---|
1456 | 1441 | |
---|
1457 | | -/** |
---|
| 1442 | +/* |
---|
1458 | 1443 | * il3945_hw_reg_set_new_power - Configures power tables at new levels |
---|
1459 | 1444 | * @ch_info: Channel to update. Uses power_info.requested_power. |
---|
1460 | 1445 | * |
---|
.. | .. |
---|
1525 | 1510 | return 0; |
---|
1526 | 1511 | } |
---|
1527 | 1512 | |
---|
1528 | | -/** |
---|
| 1513 | +/* |
---|
1529 | 1514 | * il3945_hw_reg_get_ch_txpower_limit - returns new power limit for channel |
---|
1530 | 1515 | * |
---|
1531 | 1516 | * NOTE: Returned power limit may be less (but not more) than requested, |
---|
.. | .. |
---|
1552 | 1537 | return min(max_power, ch_info->max_power_avg); |
---|
1553 | 1538 | } |
---|
1554 | 1539 | |
---|
1555 | | -/** |
---|
| 1540 | +/* |
---|
1556 | 1541 | * il3945_hw_reg_comp_txpower_temp - Compensate for temperature |
---|
1557 | 1542 | * |
---|
1558 | 1543 | * Compensate txpower settings of *all* channels for temperature. |
---|
.. | .. |
---|
1714 | 1699 | return rc; |
---|
1715 | 1700 | } |
---|
1716 | 1701 | |
---|
1717 | | -/** |
---|
| 1702 | +/* |
---|
1718 | 1703 | * il3945_commit_rxon - commit staging_rxon to hardware |
---|
1719 | 1704 | * |
---|
1720 | 1705 | * The RXON command in staging_rxon is committed to the hardware and |
---|
.. | .. |
---|
1845 | 1830 | return 0; |
---|
1846 | 1831 | } |
---|
1847 | 1832 | |
---|
1848 | | -/** |
---|
| 1833 | +/* |
---|
1849 | 1834 | * il3945_reg_txpower_periodic - called when time to check our temperature. |
---|
1850 | 1835 | * |
---|
1851 | 1836 | * -- reset periodic timer |
---|
.. | .. |
---|
1888 | 1873 | mutex_unlock(&il->mutex); |
---|
1889 | 1874 | } |
---|
1890 | 1875 | |
---|
1891 | | -/** |
---|
| 1876 | +/* |
---|
1892 | 1877 | * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel. |
---|
1893 | 1878 | * |
---|
1894 | 1879 | * This function is used when initializing channel-info structs. |
---|
.. | .. |
---|
1927 | 1912 | return group_idx; |
---|
1928 | 1913 | } |
---|
1929 | 1914 | |
---|
1930 | | -/** |
---|
| 1915 | +/* |
---|
1931 | 1916 | * il3945_hw_reg_get_matched_power_idx - Interpolate to get nominal idx |
---|
1932 | 1917 | * |
---|
1933 | 1918 | * Interpolate to get nominal (i.e. at factory calibration temperature) idx |
---|
.. | .. |
---|
2050 | 2035 | } |
---|
2051 | 2036 | } |
---|
2052 | 2037 | |
---|
2053 | | -/** |
---|
| 2038 | +/* |
---|
2054 | 2039 | * il3945_txpower_set_from_eeprom - Set channel power info based on EEPROM |
---|
2055 | 2040 | * |
---|
2056 | 2041 | * Second pass (during init) to set up il->channel_info |
---|
.. | .. |
---|
2115 | 2100 | |
---|
2116 | 2101 | /* set tx power value for all OFDM rates */ |
---|
2117 | 2102 | for (rate_idx = 0; rate_idx < IL_OFDM_RATES; rate_idx++) { |
---|
2118 | | - s32 uninitialized_var(power_idx); |
---|
| 2103 | + s32 power_idx; |
---|
2119 | 2104 | int rc; |
---|
2120 | 2105 | |
---|
2121 | 2106 | /* use channel group's clip-power table, |
---|
.. | .. |
---|
2320 | 2305 | vif->bss_conf.bssid); |
---|
2321 | 2306 | } |
---|
2322 | 2307 | |
---|
2323 | | -/** |
---|
| 2308 | +/* |
---|
2324 | 2309 | * il3945_init_hw_rate_table - Initialize the hardware rate fallback table |
---|
2325 | 2310 | */ |
---|
2326 | 2311 | int |
---|
.. | .. |
---|
2535 | 2520 | return; |
---|
2536 | 2521 | } |
---|
2537 | 2522 | |
---|
2538 | | - /** |
---|
| 2523 | + /* |
---|
2539 | 2524 | * il3945_load_bsm - Load bootstrap instructions |
---|
2540 | 2525 | * |
---|
2541 | 2526 | * BSM operation: |
---|