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
63 return (1 << tsf_bits) - 1; in iwl_beacon_time_mask_low()
67 * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
75 return ((1 << (32 - tsf_bits)) - 1) << tsf_bits; in iwl_beacon_time_mask_high()
80 * time in usec will be changed into a 32-bit value in extended:internal format
120 res += base_low - addon_low; in iwl_add_beacon_time()
122 res += interval + base_low - addon_low; in iwl_add_beacon_time()
159 priv->hw_params.sens = &iwl1000_sensitivity; in iwl1000_hw_set_hw_params()
180 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl2000_set_ct_threshold()
181 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl2000_set_ct_threshold()
187 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl2000_nic_config()
220 priv->hw_params.sens = &iwl2000_sensitivity; in iwl2000_hw_set_hw_params()
330 #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5)
336 temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature); in iwl_temp_calib_to_offset()
337 voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage); in iwl_temp_calib_to_offset()
339 /* offset = temp - volt / coeff */ in iwl_temp_calib_to_offset()
340 return (s32)(temperature - in iwl_temp_calib_to_offset()
347 s32 threshold = (s32)celsius_to_kelvin(CT_KILL_THRESHOLD_LEGACY) - in iwl5150_set_ct_threshold()
350 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; in iwl5150_set_ct_threshold()
356 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl5000_set_ct_threshold()
364 priv->hw_params.sens = &iwl5000_sensitivity; in iwl5000_hw_set_hw_params()
372 priv->hw_params.sens = &iwl5150_sensitivity; in iwl5150_hw_set_hw_params()
380 vt = le32_to_cpu(priv->statistics.common.temperature); in iwl5150_temperature()
383 priv->temperature = kelvin_to_celsius(vt); in iwl5150_temperature()
391 * MULTI-FIXME in iwl5000_hw_channel_switch()
394 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl5000_hw_channel_switch()
400 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl5000_hw_channel_switch()
401 struct ieee80211_vif *vif = ctx->vif; in iwl5000_hw_channel_switch()
408 cmd.band = priv->band == NL80211_BAND_2GHZ; in iwl5000_hw_channel_switch()
409 ch = ch_switch->chandef.chan->hw_value; in iwl5000_hw_channel_switch()
411 ctx->active.channel, ch); in iwl5000_hw_channel_switch()
413 cmd.rxon_flags = ctx->staging.flags; in iwl5000_hw_channel_switch()
414 cmd.rxon_filter_flags = ctx->staging.filter_flags; in iwl5000_hw_channel_switch()
415 switch_count = ch_switch->count; in iwl5000_hw_channel_switch()
416 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl5000_hw_channel_switch()
421 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl5000_hw_channel_switch()
422 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl5000_hw_channel_switch()
424 switch_count -= (priv->ucode_beacon_time - in iwl5000_hw_channel_switch()
430 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl5000_hw_channel_switch()
433 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl5000_hw_channel_switch()
438 priv->ucode_beacon_time, in iwl5000_hw_channel_switch()
445 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl5000_hw_channel_switch()
479 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl6000_set_ct_threshold()
480 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl6000_set_ct_threshold()
486 switch (priv->trans->mac_cfg->device_family) { in iwl6000_nic_config()
493 iwl_write32(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
498 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
499 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
504 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
505 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
507 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
544 priv->hw_params.sens = &iwl6000_sensitivity; in iwl6000_hw_set_hw_params()
552 * MULTI-FIXME in iwl6000_hw_channel_switch()
555 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl6000_hw_channel_switch()
561 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl6000_hw_channel_switch()
562 struct ieee80211_vif *vif = ctx->vif; in iwl6000_hw_channel_switch()
572 return -ENOMEM; in iwl6000_hw_channel_switch()
576 cmd->band = priv->band == NL80211_BAND_2GHZ; in iwl6000_hw_channel_switch()
577 ch = ch_switch->chandef.chan->hw_value; in iwl6000_hw_channel_switch()
579 ctx->active.channel, ch); in iwl6000_hw_channel_switch()
580 cmd->channel = cpu_to_le16(ch); in iwl6000_hw_channel_switch()
581 cmd->rxon_flags = ctx->staging.flags; in iwl6000_hw_channel_switch()
582 cmd->rxon_filter_flags = ctx->staging.filter_flags; in iwl6000_hw_channel_switch()
583 switch_count = ch_switch->count; in iwl6000_hw_channel_switch()
584 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl6000_hw_channel_switch()
589 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl6000_hw_channel_switch()
590 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl6000_hw_channel_switch()
592 switch_count -= (priv->ucode_beacon_time - in iwl6000_hw_channel_switch()
598 cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl6000_hw_channel_switch()
601 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl6000_hw_channel_switch()
605 cmd->switch_time = iwl_add_beacon_time(priv, in iwl6000_hw_channel_switch()
606 priv->ucode_beacon_time, in iwl6000_hw_channel_switch()
611 cmd->switch_time); in iwl6000_hw_channel_switch()
612 cmd->expect_beacon = in iwl6000_hw_channel_switch()
613 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl6000_hw_channel_switch()