| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /****************************************************************************** |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * 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 |
|---|
| 20 | 6 | * |
|---|
| 21 | 7 | * Contact Information: |
|---|
| 22 | 8 | * Intel Linux Wireless <linuxwifi@intel.com> |
|---|
| 23 | 9 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
|---|
| 24 | 10 | * |
|---|
| 25 | 11 | *****************************************************************************/ |
|---|
| 12 | + |
|---|
| 13 | +#include <linux/units.h> |
|---|
| 26 | 14 | |
|---|
| 27 | 15 | /* |
|---|
| 28 | 16 | * DVM device-specific data & functions |
|---|
| .. | .. |
|---|
| 70 | 58 | |
|---|
| 71 | 59 | /** |
|---|
| 72 | 60 | * 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) |
|---|
| 75 | 63 | */ |
|---|
| 76 | 64 | static inline u32 iwl_beacon_time_mask_low(struct iwl_priv *priv, |
|---|
| 77 | 65 | u16 tsf_bits) |
|---|
| .. | .. |
|---|
| 81 | 69 | |
|---|
| 82 | 70 | /** |
|---|
| 83 | 71 | * 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) |
|---|
| 86 | 74 | */ |
|---|
| 87 | 75 | static inline u32 iwl_beacon_time_mask_high(struct iwl_priv *priv, |
|---|
| 88 | 76 | u16 tsf_bits) |
|---|
| .. | .. |
|---|
| 359 | 347 | static void iwl5150_set_ct_threshold(struct iwl_priv *priv) |
|---|
| 360 | 348 | { |
|---|
| 361 | 349 | 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) - |
|---|
| 363 | 351 | iwl_temp_calib_to_offset(priv); |
|---|
| 364 | 352 | |
|---|
| 365 | 353 | priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; |
|---|
| .. | .. |
|---|
| 395 | 383 | vt = le32_to_cpu(priv->statistics.common.temperature); |
|---|
| 396 | 384 | vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset; |
|---|
| 397 | 385 | /* now vt hold the temperature in Kelvin */ |
|---|
| 398 | | - priv->temperature = KELVIN_TO_CELSIUS(vt); |
|---|
| 386 | + priv->temperature = kelvin_to_celsius(vt); |
|---|
| 399 | 387 | iwl_tt_handler(priv); |
|---|
| 400 | 388 | } |
|---|
| 401 | 389 | |
|---|
| .. | .. |
|---|
| 498 | 486 | /* NIC configuration for 6000 series */ |
|---|
| 499 | 487 | static void iwl6000_nic_config(struct iwl_priv *priv) |
|---|
| 500 | 488 | { |
|---|
| 501 | | - switch (priv->cfg->device_family) { |
|---|
| 489 | + switch (priv->trans->trans_cfg->device_family) { |
|---|
| 502 | 490 | case IWL_DEVICE_FAMILY_6005: |
|---|
| 503 | 491 | case IWL_DEVICE_FAMILY_6030: |
|---|
| 504 | 492 | case IWL_DEVICE_FAMILY_6000: |
|---|