Lines Matching +full:sens +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
11 * DVM device-specific data & functions
13 #include "iwl-io.h"
14 #include "iwl-prph.h"
15 #include "iwl-nvm-utils.h"
40 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl1000_set_ct_threshold()
41 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl1000_set_ct_threshold()
49 iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG, in iwl1000_nic_config()
55 * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time
62 return (1 << tsf_bits) - 1; in iwl_beacon_time_mask_low()
66 * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
73 return ((1 << (32 - tsf_bits)) - 1) << tsf_bits; in iwl_beacon_time_mask_high()
78 * time in usec will be changed into a 32-bit value in extended:internal format
118 res += base_low - addon_low; in iwl_add_beacon_time()
120 res += interval + base_low - addon_low; in iwl_add_beacon_time()
157 priv->hw_params.sens = &iwl1000_sensitivity; in iwl1000_hw_set_hw_params()
178 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl2000_set_ct_threshold()
179 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl2000_set_ct_threshold()
185 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl2000_nic_config()
218 priv->hw_params.sens = &iwl2000_sensitivity; in iwl2000_hw_set_hw_params()
328 #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5)
334 temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature); in iwl_temp_calib_to_offset()
335 voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage); in iwl_temp_calib_to_offset()
337 /* offset = temp - volt / coeff */ in iwl_temp_calib_to_offset()
338 return (s32)(temperature - in iwl_temp_calib_to_offset()
345 s32 threshold = (s32)celsius_to_kelvin(CT_KILL_THRESHOLD_LEGACY) - in iwl5150_set_ct_threshold()
348 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; in iwl5150_set_ct_threshold()
354 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl5000_set_ct_threshold()
362 priv->hw_params.sens = &iwl5000_sensitivity; in iwl5000_hw_set_hw_params()
370 priv->hw_params.sens = &iwl5150_sensitivity; in iwl5150_hw_set_hw_params()
378 vt = le32_to_cpu(priv->statistics.common.temperature); in iwl5150_temperature()
381 priv->temperature = kelvin_to_celsius(vt); in iwl5150_temperature()
389 * MULTI-FIXME in iwl5000_hw_channel_switch()
392 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl5000_hw_channel_switch()
398 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl5000_hw_channel_switch()
399 struct ieee80211_vif *vif = ctx->vif; in iwl5000_hw_channel_switch()
406 cmd.band = priv->band == NL80211_BAND_2GHZ; in iwl5000_hw_channel_switch()
407 ch = ch_switch->chandef.chan->hw_value; in iwl5000_hw_channel_switch()
409 ctx->active.channel, ch); in iwl5000_hw_channel_switch()
411 cmd.rxon_flags = ctx->staging.flags; in iwl5000_hw_channel_switch()
412 cmd.rxon_filter_flags = ctx->staging.filter_flags; in iwl5000_hw_channel_switch()
413 switch_count = ch_switch->count; in iwl5000_hw_channel_switch()
414 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl5000_hw_channel_switch()
419 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl5000_hw_channel_switch()
420 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl5000_hw_channel_switch()
422 switch_count -= (priv->ucode_beacon_time - in iwl5000_hw_channel_switch()
428 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl5000_hw_channel_switch()
431 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl5000_hw_channel_switch()
436 priv->ucode_beacon_time, in iwl5000_hw_channel_switch()
443 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl5000_hw_channel_switch()
477 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl6000_set_ct_threshold()
478 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl6000_set_ct_threshold()
484 switch (priv->trans->trans_cfg->device_family) { in iwl6000_nic_config()
491 iwl_write32(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
496 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
497 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
502 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
503 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
505 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
542 priv->hw_params.sens = &iwl6000_sensitivity; in iwl6000_hw_set_hw_params()
550 * MULTI-FIXME in iwl6000_hw_channel_switch()
553 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl6000_hw_channel_switch()
559 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl6000_hw_channel_switch()
560 struct ieee80211_vif *vif = ctx->vif; in iwl6000_hw_channel_switch()
570 return -ENOMEM; in iwl6000_hw_channel_switch()
574 cmd->band = priv->band == NL80211_BAND_2GHZ; in iwl6000_hw_channel_switch()
575 ch = ch_switch->chandef.chan->hw_value; in iwl6000_hw_channel_switch()
577 ctx->active.channel, ch); in iwl6000_hw_channel_switch()
578 cmd->channel = cpu_to_le16(ch); in iwl6000_hw_channel_switch()
579 cmd->rxon_flags = ctx->staging.flags; in iwl6000_hw_channel_switch()
580 cmd->rxon_filter_flags = ctx->staging.filter_flags; in iwl6000_hw_channel_switch()
581 switch_count = ch_switch->count; in iwl6000_hw_channel_switch()
582 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl6000_hw_channel_switch()
587 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl6000_hw_channel_switch()
588 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl6000_hw_channel_switch()
590 switch_count -= (priv->ucode_beacon_time - in iwl6000_hw_channel_switch()
596 cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl6000_hw_channel_switch()
599 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl6000_hw_channel_switch()
603 cmd->switch_time = iwl_add_beacon_time(priv, in iwl6000_hw_channel_switch()
604 priv->ucode_beacon_time, in iwl6000_hw_channel_switch()
609 cmd->switch_time); in iwl6000_hw_channel_switch()
610 cmd->expect_beacon = in iwl6000_hw_channel_switch()
611 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl6000_hw_channel_switch()