Commit 39e88504 authored by Guy Cohen's avatar Guy Cohen Committed by John W. Linville

iwlwifi: TLC modifications

1. Merge TLC fixes from AP support code
2. Remove struct iwl4965_rate
3. Misc code restructuring
Signed-off-by: default avatarGuy Cohen <guy.cohen@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 399f4900
This diff is collapsed.
......@@ -1073,17 +1073,29 @@ unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
return priv->ibss_beacon->len;
}
static u8 iwl4965_rate_get_lowest_plcp(int rate_mask)
static u8 iwl4965_rate_get_lowest_plcp(struct iwl_priv *priv)
{
u8 i;
int i;
int rate_mask;
/* Set rate mask*/
if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
rate_mask = priv->active_rate_basic & 0xF;
else
rate_mask = priv->active_rate_basic & 0xFF0;
/* Find lowest valid rate */
for (i = IWL_RATE_1M_INDEX; i != IWL_RATE_INVALID;
i = iwl4965_rates[i].next_ieee) {
i = iwl4965_rates[i].next_ieee) {
if (rate_mask & (1 << i))
return iwl4965_rates[i].plcp;
}
return IWL_RATE_INVALID;
/* No valid rate was found. Assign the lowest one */
if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
return IWL_RATE_1M_PLCP;
else
return IWL_RATE_6M_PLCP;
}
static int iwl4965_send_beacon_cmd(struct iwl_priv *priv)
......@@ -1101,16 +1113,7 @@ static int iwl4965_send_beacon_cmd(struct iwl_priv *priv)
return -ENOMEM;
}
if (!(priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)) {
rate = iwl4965_rate_get_lowest_plcp(priv->active_rate_basic &
0xFF0);
if (rate == IWL_INVALID_RATE)
rate = IWL_RATE_6M_PLCP;
} else {
rate = iwl4965_rate_get_lowest_plcp(priv->active_rate_basic & 0xF);
if (rate == IWL_INVALID_RATE)
rate = IWL_RATE_1M_PLCP;
}
rate = iwl4965_rate_get_lowest_plcp(priv);
frame_size = iwl4965_hw_get_beacon_cmd(priv, frame, rate);
......
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