hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/intel/iwlwifi/dvm/devices.c
....@@ -1,28 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23 *
34 * Copyright(c) 2008 - 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 Intel Corporation
206 *
217 * Contact Information:
228 * Intel Linux Wireless <linuxwifi@intel.com>
239 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
2410 *
2511 *****************************************************************************/
12
+
13
+#include <linux/units.h>
2614
2715 /*
2816 * DVM device-specific data & functions
....@@ -70,8 +58,8 @@
7058
7159 /**
7260 * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time
73
- * @priv -- pointer to iwl_priv data structure
74
- * @tsf_bits -- number of bits need to shift for masking)
61
+ * @priv: pointer to iwl_priv data structure
62
+ * @tsf_bits: number of bits need to shift for masking)
7563 */
7664 static inline u32 iwl_beacon_time_mask_low(struct iwl_priv *priv,
7765 u16 tsf_bits)
....@@ -81,8 +69,8 @@
8169
8270 /**
8371 * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
84
- * @priv -- pointer to iwl_priv data structure
85
- * @tsf_bits -- number of bits need to shift for masking)
72
+ * @priv: pointer to iwl_priv data structure
73
+ * @tsf_bits: number of bits need to shift for masking)
8674 */
8775 static inline u32 iwl_beacon_time_mask_high(struct iwl_priv *priv,
8876 u16 tsf_bits)
....@@ -359,7 +347,7 @@
359347 static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
360348 {
361349 const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF;
362
- s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
350
+ s32 threshold = (s32)celsius_to_kelvin(CT_KILL_THRESHOLD_LEGACY) -
363351 iwl_temp_calib_to_offset(priv);
364352
365353 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
....@@ -395,7 +383,7 @@
395383 vt = le32_to_cpu(priv->statistics.common.temperature);
396384 vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
397385 /* now vt hold the temperature in Kelvin */
398
- priv->temperature = KELVIN_TO_CELSIUS(vt);
386
+ priv->temperature = kelvin_to_celsius(vt);
399387 iwl_tt_handler(priv);
400388 }
401389
....@@ -498,7 +486,7 @@
498486 /* NIC configuration for 6000 series */
499487 static void iwl6000_nic_config(struct iwl_priv *priv)
500488 {
501
- switch (priv->cfg->device_family) {
489
+ switch (priv->trans->trans_cfg->device_family) {
502490 case IWL_DEVICE_FAMILY_6005:
503491 case IWL_DEVICE_FAMILY_6030:
504492 case IWL_DEVICE_FAMILY_6000: