diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-05-11 06:29:25 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-05-13 15:02:59 -0400 |
commit | 70817b5e14760dad49a067fc3dd137bccd3c2960 (patch) | |
tree | b170c40a5a7d3cbacca2cafc09816846feeb7889 /drivers | |
parent | 3083d03c215a2d1642dd12ede7ad61e24601b583 (diff) |
iwlagn: remove set but unused vars
gcc is warning that a few variables in rate
scaling are set but never otherwise used.
This pointed out a few simplifications.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 7 |
2 files changed, 13 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 432f839700dd..c38ba7c9cfd4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2199,11 +2199,11 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) | |||
2199 | * setup rate table in uCode | 2199 | * setup rate table in uCode |
2200 | * return rate_n_flags as used in the table | 2200 | * return rate_n_flags as used in the table |
2201 | */ | 2201 | */ |
2202 | static u32 rs_update_rate_tbl(struct iwl_priv *priv, | 2202 | static void rs_update_rate_tbl(struct iwl_priv *priv, |
2203 | struct iwl_rxon_context *ctx, | 2203 | struct iwl_rxon_context *ctx, |
2204 | struct iwl_lq_sta *lq_sta, | 2204 | struct iwl_lq_sta *lq_sta, |
2205 | struct iwl_scale_tbl_info *tbl, | 2205 | struct iwl_scale_tbl_info *tbl, |
2206 | int index, u8 is_green) | 2206 | int index, u8 is_green) |
2207 | { | 2207 | { |
2208 | u32 rate; | 2208 | u32 rate; |
2209 | 2209 | ||
@@ -2211,8 +2211,6 @@ static u32 rs_update_rate_tbl(struct iwl_priv *priv, | |||
2211 | rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); | 2211 | rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); |
2212 | rs_fill_link_cmd(priv, lq_sta, rate); | 2212 | rs_fill_link_cmd(priv, lq_sta, rate); |
2213 | iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false); | 2213 | iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false); |
2214 | |||
2215 | return rate; | ||
2216 | } | 2214 | } |
2217 | 2215 | ||
2218 | /* | 2216 | /* |
@@ -2241,7 +2239,6 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2241 | u8 update_lq = 0; | 2239 | u8 update_lq = 0; |
2242 | struct iwl_scale_tbl_info *tbl, *tbl1; | 2240 | struct iwl_scale_tbl_info *tbl, *tbl1; |
2243 | u16 rate_scale_index_msk = 0; | 2241 | u16 rate_scale_index_msk = 0; |
2244 | u32 rate; | ||
2245 | u8 is_green = 0; | 2242 | u8 is_green = 0; |
2246 | u8 active_tbl = 0; | 2243 | u8 active_tbl = 0; |
2247 | u8 done_search = 0; | 2244 | u8 done_search = 0; |
@@ -2328,8 +2325,8 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2328 | tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | 2325 | tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); |
2329 | /* get "active" rate info */ | 2326 | /* get "active" rate info */ |
2330 | index = iwl_hwrate_to_plcp_idx(tbl->current_rate); | 2327 | index = iwl_hwrate_to_plcp_idx(tbl->current_rate); |
2331 | rate = rs_update_rate_tbl(priv, ctx, lq_sta, | 2328 | rs_update_rate_tbl(priv, ctx, lq_sta, tbl, |
2332 | tbl, index, is_green); | 2329 | index, is_green); |
2333 | } | 2330 | } |
2334 | return; | 2331 | return; |
2335 | } | 2332 | } |
@@ -2570,8 +2567,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2570 | lq_update: | 2567 | lq_update: |
2571 | /* Replace uCode's rate table for the destination station. */ | 2568 | /* Replace uCode's rate table for the destination station. */ |
2572 | if (update_lq) | 2569 | if (update_lq) |
2573 | rate = rs_update_rate_tbl(priv, ctx, lq_sta, | 2570 | rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); |
2574 | tbl, index, is_green); | ||
2575 | 2571 | ||
2576 | if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) { | 2572 | if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) { |
2577 | /* Should we stay with this modulation mode, | 2573 | /* Should we stay with this modulation mode, |
@@ -3270,14 +3266,10 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = { | |||
3270 | static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file, | 3266 | static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file, |
3271 | char __user *user_buf, size_t count, loff_t *ppos) | 3267 | char __user *user_buf, size_t count, loff_t *ppos) |
3272 | { | 3268 | { |
3273 | char buff[120]; | ||
3274 | int desc = 0; | ||
3275 | |||
3276 | struct iwl_lq_sta *lq_sta = file->private_data; | 3269 | struct iwl_lq_sta *lq_sta = file->private_data; |
3277 | struct iwl_priv *priv; | ||
3278 | struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; | 3270 | struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; |
3279 | 3271 | char buff[120]; | |
3280 | priv = lq_sta->drv; | 3272 | int desc = 0; |
3281 | 3273 | ||
3282 | if (is_Ht(tbl->lq_type)) | 3274 | if (is_Ht(tbl->lq_type)) |
3283 | desc += sprintf(buff+desc, | 3275 | desc += sprintf(buff+desc, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index c8397962632c..47a56bc1cd12 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -216,15 +216,14 @@ static int iwl_eeprom_verify_signature(struct iwl_priv *priv) | |||
216 | 216 | ||
217 | static void iwl_set_otp_access(struct iwl_priv *priv, enum iwl_access_mode mode) | 217 | static void iwl_set_otp_access(struct iwl_priv *priv, enum iwl_access_mode mode) |
218 | { | 218 | { |
219 | u32 otpgp; | 219 | iwl_read32(priv, CSR_OTP_GP_REG); |
220 | 220 | ||
221 | otpgp = iwl_read32(priv, CSR_OTP_GP_REG); | ||
222 | if (mode == IWL_OTP_ACCESS_ABSOLUTE) | 221 | if (mode == IWL_OTP_ACCESS_ABSOLUTE) |
223 | iwl_clear_bit(priv, CSR_OTP_GP_REG, | 222 | iwl_clear_bit(priv, CSR_OTP_GP_REG, |
224 | CSR_OTP_GP_REG_OTP_ACCESS_MODE); | 223 | CSR_OTP_GP_REG_OTP_ACCESS_MODE); |
225 | else | 224 | else |
226 | iwl_set_bit(priv, CSR_OTP_GP_REG, | 225 | iwl_set_bit(priv, CSR_OTP_GP_REG, |
227 | CSR_OTP_GP_REG_OTP_ACCESS_MODE); | 226 | CSR_OTP_GP_REG_OTP_ACCESS_MODE); |
228 | } | 227 | } |
229 | 228 | ||
230 | static int iwlcore_get_nvm_type(struct iwl_priv *priv, u32 hw_rev) | 229 | static int iwlcore_get_nvm_type(struct iwl_priv *priv, u32 hw_rev) |