u8 is_dup;
u8 phymode;
u8 ibss_sta_added;
+ u32 supp_rates;
u16 active_rate;
u16 active_siso_rate;
u16 active_mimo_rate;
struct sta_info *sta);
static int rs_fill_link_cmd(struct iwl_rate_scale_priv *lq_data,
struct iwl_rate *tx_mcs,
- struct iwl_link_quality_cmd *tbl,
- struct sta_info *sta);
+ struct iwl_link_quality_cmd *tbl);
static s32 expected_tpt_A[IWL_RATE_COUNT] = {
static int rs_get_lower_rate(struct iwl_rate_scale_priv *lq_data,
struct iwl_scale_tbl_info *tbl, u8 scale_index,
- u8 ht_possible, struct iwl_rate *mcs_rate,
- struct sta_info *sta)
+ u8 ht_possible, struct iwl_rate *mcs_rate)
{
- u8 is_green = lq_data->is_green;
s32 low;
u16 rate_mask;
u16 high_low;
u8 switch_to_legacy = 0;
+ u8 is_green = lq_data->is_green;
/* check if we need to switch from HT to legacy rates.
* assumption is that mandatory rates (1Mbps or 6Mbps)
if (is_legacy(tbl->lq_type)) {
if (lq_data->phymode == (u8) MODE_IEEE80211A)
rate_mask = (u16)(rate_mask &
- (sta->supp_rates << IWL_FIRST_OFDM_RATE));
+ (lq_data->supp_rates << IWL_FIRST_OFDM_RATE));
else
- rate_mask = (u16)(rate_mask & sta->supp_rates);
+ rate_mask = (u16)(rate_mask & lq_data->supp_rates);
}
/* if we did switched from HT to legacy check current rate */
if (is_legacy(tbl->lq_type)) {
if (lq_data->phymode == (u8) MODE_IEEE80211A)
rate_scale_index_msk = (u16) (rate_mask &
- (sta->supp_rates << IWL_FIRST_OFDM_RATE));
+ (lq_data->supp_rates << IWL_FIRST_OFDM_RATE));
else
rate_scale_index_msk = (u16) (rate_mask &
- sta->supp_rates);
+ lq_data->supp_rates);
} else
rate_scale_index_msk = rate_mask;
rs_stay_in_table(lq_data);
if (update_lq) {
rs_mcs_from_tbl(&mcs_rate, tbl, index, is_green);
- rs_fill_link_cmd(lq_data, &mcs_rate, &lq_data->lq, sta);
+ rs_fill_link_cmd(lq_data, &mcs_rate, &lq_data->lq);
rs_send_lq_cmd(priv, &lq_data->lq, CMD_ASYNC);
}
goto out;
lq_update:
if (update_lq) {
rs_mcs_from_tbl(&mcs_rate, tbl, index, is_green);
- rs_fill_link_cmd(lq_data, &mcs_rate, &lq_data->lq, sta);
+ rs_fill_link_cmd(lq_data, &mcs_rate, &lq_data->lq);
rs_send_lq_cmd(priv, &lq_data->lq, CMD_ASYNC);
}
rs_stay_in_table(lq_data);
IWL_DEBUG_HT("Switch current mcs: %X index: %d\n",
tbl->current_rate.rate_n_flags, index);
rs_fill_link_cmd(lq_data, &tbl->current_rate,
- &(lq_data->lq), sta);
+ &lq_data->lq);
rs_send_lq_cmd(priv, &lq_data->lq, CMD_ASYNC);
}
tbl1 = &(lq_data->lq_info[lq_data->active_tbl]);
rs_mcs_from_tbl(&mcs_rate, tbl, rate_idx, use_green);
tbl->current_rate.rate_n_flags = mcs_rate.rate_n_flags;
rs_get_expected_tpt_table(lq, tbl);
- rs_fill_link_cmd(lq, &mcs_rate, &(lq->lq), sta);
+ rs_fill_link_cmd(lq, &mcs_rate, &lq->lq);
rs_send_lq_cmd(priv, &lq->lq, CMD_ASYNC);
out:
return;
struct iwl_rate_scale_priv *crl = priv_sta;
crl->flush_timer = 0;
+ crl->supp_rates = sta->supp_rates;
sta->txrate = 3;
for (j = 0; j < LQ_SIZE; j++)
for (i = 0; i < IWL_RATE_COUNT; i++)
static int rs_fill_link_cmd(struct iwl_rate_scale_priv *lq_data,
struct iwl_rate *tx_mcs,
- struct iwl_link_quality_cmd *lq_cmd,
- struct sta_info *sta)
+ struct iwl_link_quality_cmd *lq_cmd)
{
int index = 0;
int rc = 0;
lq_cmd->general_params.mimo_delimiter = index;
rs_get_lower_rate(lq_data, &tbl_type, rate_idx,
- use_ht_possible, &new_rate, sta);
+ use_ht_possible, &new_rate);
if (is_legacy(tbl_type.lq_type)) {
if (ant_toggle_count < NUM_TRY_BEFORE_ANTENNA_TOGGLE)