Commit 70817b5e authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 3083d03c
...@@ -2199,11 +2199,11 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) ...@@ -2199,11 +2199,11 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search)
* setup rate table in uCode * setup rate table in uCode
* return rate_n_flags as used in the table * return rate_n_flags as used in the table
*/ */
static u32 rs_update_rate_tbl(struct iwl_priv *priv, static void rs_update_rate_tbl(struct iwl_priv *priv,
struct iwl_rxon_context *ctx, struct iwl_rxon_context *ctx,
struct iwl_lq_sta *lq_sta, struct iwl_lq_sta *lq_sta,
struct iwl_scale_tbl_info *tbl, struct iwl_scale_tbl_info *tbl,
int index, u8 is_green) int index, u8 is_green)
{ {
u32 rate; u32 rate;
...@@ -2211,8 +2211,6 @@ static u32 rs_update_rate_tbl(struct iwl_priv *priv, ...@@ -2211,8 +2211,6 @@ static u32 rs_update_rate_tbl(struct iwl_priv *priv,
rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); rate = rate_n_flags_from_tbl(priv, tbl, index, is_green);
rs_fill_link_cmd(priv, lq_sta, rate); rs_fill_link_cmd(priv, lq_sta, rate);
iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false); iwl_send_lq_cmd(priv, ctx, &lq_sta->lq, CMD_ASYNC, false);
return rate;
} }
/* /*
...@@ -2241,7 +2239,6 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, ...@@ -2241,7 +2239,6 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
u8 update_lq = 0; u8 update_lq = 0;
struct iwl_scale_tbl_info *tbl, *tbl1; struct iwl_scale_tbl_info *tbl, *tbl1;
u16 rate_scale_index_msk = 0; u16 rate_scale_index_msk = 0;
u32 rate;
u8 is_green = 0; u8 is_green = 0;
u8 active_tbl = 0; u8 active_tbl = 0;
u8 done_search = 0; u8 done_search = 0;
...@@ -2328,8 +2325,8 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, ...@@ -2328,8 +2325,8 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
/* get "active" rate info */ /* get "active" rate info */
index = iwl_hwrate_to_plcp_idx(tbl->current_rate); index = iwl_hwrate_to_plcp_idx(tbl->current_rate);
rate = rs_update_rate_tbl(priv, ctx, lq_sta, rs_update_rate_tbl(priv, ctx, lq_sta, tbl,
tbl, index, is_green); index, is_green);
} }
return; return;
} }
...@@ -2570,8 +2567,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, ...@@ -2570,8 +2567,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
lq_update: lq_update:
/* Replace uCode's rate table for the destination station. */ /* Replace uCode's rate table for the destination station. */
if (update_lq) if (update_lq)
rate = rs_update_rate_tbl(priv, ctx, lq_sta, rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green);
tbl, index, is_green);
if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) { if (iwl_tx_ant_restriction(priv) == IWL_ANT_OK_MULTI) {
/* Should we stay with this modulation mode, /* Should we stay with this modulation mode,
...@@ -3270,14 +3266,10 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = { ...@@ -3270,14 +3266,10 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file, static ssize_t rs_sta_dbgfs_rate_scale_data_read(struct file *file,
char __user *user_buf, size_t count, loff_t *ppos) char __user *user_buf, size_t count, loff_t *ppos)
{ {
char buff[120];
int desc = 0;
struct iwl_lq_sta *lq_sta = file->private_data; struct iwl_lq_sta *lq_sta = file->private_data;
struct iwl_priv *priv;
struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl];
char buff[120];
priv = lq_sta->drv; int desc = 0;
if (is_Ht(tbl->lq_type)) if (is_Ht(tbl->lq_type))
desc += sprintf(buff+desc, desc += sprintf(buff+desc,
......
...@@ -216,15 +216,14 @@ static int iwl_eeprom_verify_signature(struct iwl_priv *priv) ...@@ -216,15 +216,14 @@ static int iwl_eeprom_verify_signature(struct iwl_priv *priv)
static void iwl_set_otp_access(struct iwl_priv *priv, enum iwl_access_mode mode) static void iwl_set_otp_access(struct iwl_priv *priv, enum iwl_access_mode mode)
{ {
u32 otpgp; iwl_read32(priv, CSR_OTP_GP_REG);
otpgp = iwl_read32(priv, CSR_OTP_GP_REG);
if (mode == IWL_OTP_ACCESS_ABSOLUTE) if (mode == IWL_OTP_ACCESS_ABSOLUTE)
iwl_clear_bit(priv, CSR_OTP_GP_REG, iwl_clear_bit(priv, CSR_OTP_GP_REG,
CSR_OTP_GP_REG_OTP_ACCESS_MODE); CSR_OTP_GP_REG_OTP_ACCESS_MODE);
else else
iwl_set_bit(priv, CSR_OTP_GP_REG, iwl_set_bit(priv, CSR_OTP_GP_REG,
CSR_OTP_GP_REG_OTP_ACCESS_MODE); CSR_OTP_GP_REG_OTP_ACCESS_MODE);
} }
static int iwlcore_get_nvm_type(struct iwl_priv *priv, u32 hw_rev) static int iwlcore_get_nvm_type(struct iwl_priv *priv, u32 hw_rev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment