Lines Matching +full:sens +full:-
1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
16 * DVM device-specific data & functions
18 #include "iwl-io.h"
19 #include "iwl-prph.h"
20 #include "iwl-eeprom-parse.h"
45 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl1000_set_ct_threshold()
46 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl1000_set_ct_threshold()
54 iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG, in iwl1000_nic_config()
60 * iwl_beacon_time_mask_low - mask of lower 32 bit of beacon time
67 return (1 << tsf_bits) - 1; in iwl_beacon_time_mask_low()
71 * iwl_beacon_time_mask_high - mask of higher 32 bit of beacon time
78 return ((1 << (32 - tsf_bits)) - 1) << tsf_bits; in iwl_beacon_time_mask_high()
83 * time in usec will be changed into a 32-bit value in extended:internal format
123 res += base_low - addon_low; in iwl_add_beacon_time()
125 res += interval + base_low - addon_low; in iwl_add_beacon_time()
162 priv->hw_params.sens = &iwl1000_sensitivity; in iwl1000_hw_set_hw_params()
183 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl2000_set_ct_threshold()
184 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl2000_set_ct_threshold()
190 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl2000_nic_config()
223 priv->hw_params.sens = &iwl2000_sensitivity; in iwl2000_hw_set_hw_params()
333 #define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5)
339 temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature); in iwl_temp_calib_to_offset()
340 voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage); in iwl_temp_calib_to_offset()
342 /* offset = temp - volt / coeff */ in iwl_temp_calib_to_offset()
343 return (s32)(temperature - in iwl_temp_calib_to_offset()
350 s32 threshold = (s32)celsius_to_kelvin(CT_KILL_THRESHOLD_LEGACY) - in iwl5150_set_ct_threshold()
353 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; in iwl5150_set_ct_threshold()
359 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; in iwl5000_set_ct_threshold()
367 priv->hw_params.sens = &iwl5000_sensitivity; in iwl5000_hw_set_hw_params()
375 priv->hw_params.sens = &iwl5150_sensitivity; in iwl5150_hw_set_hw_params()
383 vt = le32_to_cpu(priv->statistics.common.temperature); in iwl5150_temperature()
386 priv->temperature = kelvin_to_celsius(vt); in iwl5150_temperature()
394 * MULTI-FIXME in iwl5000_hw_channel_switch()
397 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl5000_hw_channel_switch()
403 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl5000_hw_channel_switch()
404 struct ieee80211_vif *vif = ctx->vif; in iwl5000_hw_channel_switch()
411 cmd.band = priv->band == NL80211_BAND_2GHZ; in iwl5000_hw_channel_switch()
412 ch = ch_switch->chandef.chan->hw_value; in iwl5000_hw_channel_switch()
414 ctx->active.channel, ch); in iwl5000_hw_channel_switch()
416 cmd.rxon_flags = ctx->staging.flags; in iwl5000_hw_channel_switch()
417 cmd.rxon_filter_flags = ctx->staging.filter_flags; in iwl5000_hw_channel_switch()
418 switch_count = ch_switch->count; in iwl5000_hw_channel_switch()
419 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl5000_hw_channel_switch()
424 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl5000_hw_channel_switch()
425 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl5000_hw_channel_switch()
427 switch_count -= (priv->ucode_beacon_time - in iwl5000_hw_channel_switch()
433 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl5000_hw_channel_switch()
436 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl5000_hw_channel_switch()
441 priv->ucode_beacon_time, in iwl5000_hw_channel_switch()
448 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl5000_hw_channel_switch()
482 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; in iwl6000_set_ct_threshold()
483 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; in iwl6000_set_ct_threshold()
489 switch (priv->trans->trans_cfg->device_family) { in iwl6000_nic_config()
496 iwl_write32(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
501 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
502 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
507 if (priv->nvm_data->calib_version >= 6) in iwl6000_nic_config()
508 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
510 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, in iwl6000_nic_config()
547 priv->hw_params.sens = &iwl6000_sensitivity; in iwl6000_hw_set_hw_params()
555 * MULTI-FIXME in iwl6000_hw_channel_switch()
558 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; in iwl6000_hw_channel_switch()
564 u16 beacon_interval = le16_to_cpu(ctx->timing.beacon_interval); in iwl6000_hw_channel_switch()
565 struct ieee80211_vif *vif = ctx->vif; in iwl6000_hw_channel_switch()
575 return -ENOMEM; in iwl6000_hw_channel_switch()
579 cmd->band = priv->band == NL80211_BAND_2GHZ; in iwl6000_hw_channel_switch()
580 ch = ch_switch->chandef.chan->hw_value; in iwl6000_hw_channel_switch()
582 ctx->active.channel, ch); in iwl6000_hw_channel_switch()
583 cmd->channel = cpu_to_le16(ch); in iwl6000_hw_channel_switch()
584 cmd->rxon_flags = ctx->staging.flags; in iwl6000_hw_channel_switch()
585 cmd->rxon_filter_flags = ctx->staging.filter_flags; in iwl6000_hw_channel_switch()
586 switch_count = ch_switch->count; in iwl6000_hw_channel_switch()
587 tsf_low = ch_switch->timestamp & 0x0ffffffff; in iwl6000_hw_channel_switch()
592 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { in iwl6000_hw_channel_switch()
593 if (switch_count > ((priv->ucode_beacon_time - tsf_low) / in iwl6000_hw_channel_switch()
595 switch_count -= (priv->ucode_beacon_time - in iwl6000_hw_channel_switch()
601 cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time); in iwl6000_hw_channel_switch()
604 vif->bss_conf.beacon_int * switch_count * TIME_UNIT; in iwl6000_hw_channel_switch()
608 cmd->switch_time = iwl_add_beacon_time(priv, in iwl6000_hw_channel_switch()
609 priv->ucode_beacon_time, in iwl6000_hw_channel_switch()
614 cmd->switch_time); in iwl6000_hw_channel_switch()
615 cmd->expect_beacon = in iwl6000_hw_channel_switch()
616 ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR; in iwl6000_hw_channel_switch()