Lines Matching defs:priv
37 static void iwl1000_set_ct_threshold(struct iwl_priv *priv)
40 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
41 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
45 static void iwl1000_nic_config(struct iwl_priv *priv)
49 iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG,
56 * @priv: pointer to iwl_priv data structure
60 static inline u32 iwl_beacon_time_mask_low(struct iwl_priv *priv,
68 * @priv: pointer to iwl_priv data structure
72 static inline u32 iwl_beacon_time_mask_high(struct iwl_priv *priv,
84 static u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec,
95 (iwl_beacon_time_mask_high(priv, IWLAGN_EXT_BEACON_TIME_POS) >>
97 rem = (usec % interval) & iwl_beacon_time_mask_low(priv,
106 static __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base,
109 u32 base_low = base & iwl_beacon_time_mask_low(priv,
111 u32 addon_low = addon & iwl_beacon_time_mask_low(priv,
114 u32 res = (base & iwl_beacon_time_mask_high(priv,
116 (addon & iwl_beacon_time_mask_high(priv,
154 static void iwl1000_hw_set_hw_params(struct iwl_priv *priv)
156 iwl1000_set_ct_threshold(priv);
159 priv->hw_params.sens = &iwl1000_sensitivity;
177 static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
180 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
181 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
185 static void iwl2000_nic_config(struct iwl_priv *priv)
187 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
215 static void iwl2000_hw_set_hw_params(struct iwl_priv *priv)
217 iwl2000_set_ct_threshold(priv);
220 priv->hw_params.sens = &iwl2000_sensitivity;
332 static s32 iwl_temp_calib_to_offset(struct iwl_priv *priv)
336 temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature);
337 voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage);
344 static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
348 iwl_temp_calib_to_offset(priv);
350 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
353 static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
356 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
359 static void iwl5000_hw_set_hw_params(struct iwl_priv *priv)
361 iwl5000_set_ct_threshold(priv);
364 priv->hw_params.sens = &iwl5000_sensitivity;
367 static void iwl5150_hw_set_hw_params(struct iwl_priv *priv)
369 iwl5150_set_ct_threshold(priv);
372 priv->hw_params.sens = &iwl5150_sensitivity;
375 static void iwl5150_temperature(struct iwl_priv *priv)
378 s32 offset = iwl_temp_calib_to_offset(priv);
380 vt = le32_to_cpu(priv->statistics.common.temperature);
383 priv->temperature = kelvin_to_celsius(vt);
384 iwl_tt_handler(priv);
387 static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
394 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
408 cmd.band = priv->band == NL80211_BAND_2GHZ;
410 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
421 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
422 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
424 switch_count -= (priv->ucode_beacon_time -
430 cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
434 ucode_switch_time = iwl_usecs_to_beacons(priv,
437 cmd.switch_time = iwl_add_beacon_time(priv,
438 priv->ucode_beacon_time,
442 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
447 return iwl_dvm_send_cmd(priv, &hcmd);
476 static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
479 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD;
480 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
484 static void iwl6000_nic_config(struct iwl_priv *priv)
486 switch (priv->trans->mac_cfg->device_family) {
493 iwl_write32(priv->trans, CSR_GP_DRIVER_REG,
498 if (priv->nvm_data->calib_version >= 6)
499 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
504 if (priv->nvm_data->calib_version >= 6)
505 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
507 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
539 static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)
541 iwl6000_set_ct_threshold(priv);
544 priv->hw_params.sens = &iwl6000_sensitivity;
548 static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
555 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
576 cmd->band = priv->band == NL80211_BAND_2GHZ;
578 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
589 if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) {
590 if (switch_count > ((priv->ucode_beacon_time - tsf_low) /
592 switch_count -= (priv->ucode_beacon_time -
598 cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time);
602 ucode_switch_time = iwl_usecs_to_beacons(priv,
605 cmd->switch_time = iwl_add_beacon_time(priv,
606 priv->ucode_beacon_time,
610 IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
615 err = iwl_dvm_send_cmd(priv, &hcmd);