diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-04-21 18:41:53 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:15 -0400 |
commit | 099b40b743df80372236ba1df9796f59ba297b1d (patch) | |
tree | e11a14801bafcf447ff24368e4bf2d370fb167b5 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 073d3f5f1b3b6512eb82a3d40c84dedb14dc6f73 (diff) |
iwlwifi: expanding HW parameters control
This patch adds several parameters to priv.hw_params, for better control
over HW capabilities variants
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 7886596b62c7..9b3a745b66b7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -999,7 +999,8 @@ void iwl4965_rf_kill_ct_config(struct iwl_priv *priv) | |||
999 | temp_th = CELSIUS_TO_KELVIN(TM_CT_KILL_THRESHOLD); | 999 | temp_th = CELSIUS_TO_KELVIN(TM_CT_KILL_THRESHOLD); |
1000 | 1000 | ||
1001 | crit_temperature = ((temp_th * (R3-R1))/CT_LIMIT_CONST) + R2; | 1001 | crit_temperature = ((temp_th * (R3-R1))/CT_LIMIT_CONST) + R2; |
1002 | cmd.critical_temperature_R = cpu_to_le32(crit_temperature); | 1002 | cmd.critical_temperature_R = |
1003 | cpu_to_le32(priv->hw_params.ct_kill_threshold); | ||
1003 | ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD, | 1004 | ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD, |
1004 | sizeof(cmd), &cmd); | 1005 | sizeof(cmd), &cmd); |
1005 | if (ret) | 1006 | if (ret) |
@@ -1340,6 +1341,7 @@ int iwl4965_hw_set_hw_params(struct iwl_priv *priv) | |||
1340 | } | 1341 | } |
1341 | 1342 | ||
1342 | priv->hw_params.max_txq_num = priv->cfg->mod_params->num_of_queues; | 1343 | priv->hw_params.max_txq_num = priv->cfg->mod_params->num_of_queues; |
1344 | priv->hw_params.sw_crypto = priv->cfg->mod_params->sw_crypto; | ||
1343 | priv->hw_params.tx_cmd_len = sizeof(struct iwl4965_tx_cmd); | 1345 | priv->hw_params.tx_cmd_len = sizeof(struct iwl4965_tx_cmd); |
1344 | priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; | 1346 | priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; |
1345 | priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; | 1347 | priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; |
@@ -1351,10 +1353,17 @@ int iwl4965_hw_set_hw_params(struct iwl_priv *priv) | |||
1351 | priv->hw_params.max_stations = IWL4965_STATION_COUNT; | 1353 | priv->hw_params.max_stations = IWL4965_STATION_COUNT; |
1352 | priv->hw_params.bcast_sta_id = IWL4965_BROADCAST_ID; | 1354 | priv->hw_params.bcast_sta_id = IWL4965_BROADCAST_ID; |
1353 | 1355 | ||
1356 | priv->hw_params.max_data_size = IWL49_RTC_DATA_SIZE; | ||
1357 | priv->hw_params.max_inst_size = IWL49_RTC_INST_SIZE; | ||
1358 | priv->hw_params.max_bsm_size = BSM_SRAM_SIZE; | ||
1359 | priv->hw_params.fat_channel = BIT(IEEE80211_BAND_5GHZ); | ||
1360 | |||
1354 | priv->hw_params.tx_chains_num = 2; | 1361 | priv->hw_params.tx_chains_num = 2; |
1355 | priv->hw_params.rx_chains_num = 2; | 1362 | priv->hw_params.rx_chains_num = 2; |
1356 | priv->hw_params.valid_tx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX); | 1363 | priv->hw_params.valid_tx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX); |
1357 | priv->hw_params.valid_rx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX); | 1364 | priv->hw_params.valid_rx_ant = (IWL_ANTENNA_MAIN | IWL_ANTENNA_AUX); |
1365 | priv->hw_params.ct_kill_threshold = CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD); | ||
1366 | |||
1358 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB | 1367 | #ifdef CONFIG_IWL4965_RUN_TIME_CALIB |
1359 | priv->hw_params.sens = &iwl4965_sensitivity; | 1368 | priv->hw_params.sens = &iwl4965_sensitivity; |
1360 | #endif | 1369 | #endif |
@@ -3064,7 +3073,7 @@ static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data, | |||
3064 | hdr = (struct ieee80211_hdr *)rxb->skb->data; | 3073 | hdr = (struct ieee80211_hdr *)rxb->skb->data; |
3065 | 3074 | ||
3066 | /* in case of HW accelerated crypto and bad decryption, drop */ | 3075 | /* in case of HW accelerated crypto and bad decryption, drop */ |
3067 | if (!priv->cfg->mod_params->sw_crypto && | 3076 | if (!priv->hw_params.sw_crypto && |
3068 | iwl4965_set_decrypted_flag(priv, hdr, ampdu_status, stats)) | 3077 | iwl4965_set_decrypted_flag(priv, hdr, ampdu_status, stats)) |
3069 | return; | 3078 | return; |
3070 | 3079 | ||
@@ -3122,7 +3131,7 @@ void iwl4965_init_ht_hw_capab(struct iwl_priv *priv, | |||
3122 | 3131 | ||
3123 | ht_info->ht_supported = 1; | 3132 | ht_info->ht_supported = 1; |
3124 | 3133 | ||
3125 | if (band == IEEE80211_BAND_5GHZ) { | 3134 | if (priv->hw_params.fat_channel & BIT(band)) { |
3126 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SUP_WIDTH; | 3135 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SUP_WIDTH; |
3127 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_40; | 3136 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_40; |
3128 | ht_info->supp_mcs_set[4] = 0x01; | 3137 | ht_info->supp_mcs_set[4] = 0x01; |