aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c71
1 files changed, 70 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 37b3e2086633..4b3fb4095678 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -44,6 +44,7 @@
44#include "iwl-sta.h" 44#include "iwl-sta.h"
45#include "iwl-helpers.h" 45#include "iwl-helpers.h"
46#include "iwl-5000-hw.h" 46#include "iwl-5000-hw.h"
47#include "iwl-6000-hw.h"
47 48
48/* Highest firmware API version supported */ 49/* Highest firmware API version supported */
49#define IWL6000_UCODE_API_MAX 4 50#define IWL6000_UCODE_API_MAX 4
@@ -100,8 +101,76 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
100 /* else do nothing, uCode configured */ 101 /* else do nothing, uCode configured */
101} 102}
102 103
104static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
105 .min_nrg_cck = 97,
106 .max_nrg_cck = 0, /* not used, set to 0 */
107 .auto_corr_min_ofdm = 80,
108 .auto_corr_min_ofdm_mrc = 128,
109 .auto_corr_min_ofdm_x1 = 105,
110 .auto_corr_min_ofdm_mrc_x1 = 192,
111
112 .auto_corr_max_ofdm = 145,
113 .auto_corr_max_ofdm_mrc = 232,
114 .auto_corr_max_ofdm_x1 = 145,
115 .auto_corr_max_ofdm_mrc_x1 = 232,
116
117 .auto_corr_min_cck = 125,
118 .auto_corr_max_cck = 175,
119 .auto_corr_min_cck_mrc = 160,
120 .auto_corr_max_cck_mrc = 310,
121 .nrg_th_cck = 97,
122 .nrg_th_ofdm = 100,
123};
124
125static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
126{
127 if ((priv->cfg->mod_params->num_of_queues > IWL50_NUM_QUEUES) ||
128 (priv->cfg->mod_params->num_of_queues < IWL_MIN_NUM_QUEUES)) {
129 IWL_ERR(priv,
130 "invalid queues_num, should be between %d and %d\n",
131 IWL_MIN_NUM_QUEUES, IWL50_NUM_QUEUES);
132 return -EINVAL;
133 }
134
135 priv->hw_params.max_txq_num = priv->cfg->mod_params->num_of_queues;
136 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
137 priv->hw_params.scd_bc_tbls_size =
138 IWL50_NUM_QUEUES * sizeof(struct iwl5000_scd_bc_tbl);
139 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
140 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
141 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
142
143 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
144 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
145
146 priv->hw_params.max_bsm_size = 0;
147 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
148 BIT(IEEE80211_BAND_5GHZ);
149 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
150
151 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
152 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
153 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
154 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
155
156 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
157 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
158
159 /* Set initial sensitivity parameters */
160 /* Set initial calibration set */
161 priv->hw_params.sens = &iwl6000_sensitivity;
162 priv->hw_params.calib_init_cfg =
163 BIT(IWL_CALIB_XTAL) |
164 BIT(IWL_CALIB_LO) |
165 BIT(IWL_CALIB_TX_IQ) |
166 BIT(IWL_CALIB_TX_IQ_PERD) |
167 BIT(IWL_CALIB_BASE_BAND);
168
169 return 0;
170}
171
103static struct iwl_lib_ops iwl6000_lib = { 172static struct iwl_lib_ops iwl6000_lib = {
104 .set_hw_params = iwl5000_hw_set_hw_params, 173 .set_hw_params = iwl6000_hw_set_hw_params,
105 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, 174 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl,
106 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, 175 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
107 .txq_set_sched = iwl5000_txq_set_sched, 176 .txq_set_sched = iwl5000_txq_set_sched,