Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256063
b: refs/heads/master
c: 0b5b3ff
h: refs/heads/master
i:
  256061: bcf2d72
  256059: 075c57f
  256055: 8f7c293
  256047: f6130ed
  256031: 0d6d99d
  255999: 8b6a99d
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Jun 24, 2011
1 parent 016af80 commit eb2b2bd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81704d2db99386d718e277cd5ac92663abec8a66
refs/heads/master: 0b5b3ff15b301338ccec77ebc051308ac614d05d
26 changes: 22 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv)
struct iwl_host_cmd cmd = {
.id = REPLY_TX_BEACON,
};
struct ieee80211_tx_info *info;
u32 frame_size;
u32 rate_flags;
u32 rate;
Expand Down Expand Up @@ -172,14 +173,31 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv)
frame_size);

/* Set up packet rate and flags */
rate = iwl_rate_get_lowest_plcp(priv, priv->beacon_ctx);
info = IEEE80211_SKB_CB(priv->beacon_skb);

/*
* Let's set up the rate at least somewhat correctly;
* it will currently not actually be used by the uCode,
* it uses the broadcast station's rate instead.
*/
if (info->control.rates[0].idx < 0 ||
info->control.rates[0].flags & IEEE80211_TX_RC_MCS)
rate = 0;
else
rate = info->control.rates[0].idx;

priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant,
priv->hw_params.valid_tx_ant);
rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
if ((rate >= IWL_FIRST_CCK_RATE) && (rate <= IWL_LAST_CCK_RATE))

/* In mac80211, rates for 5 GHz start at 0 */
if (info->band == IEEE80211_BAND_5GHZ)
rate += IWL_FIRST_OFDM_RATE;
else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE)
rate_flags |= RATE_MCS_CCK_MSK;
tx_beacon_cmd->tx.rate_n_flags = iwl_hw_set_rate_n_flags(rate,
rate_flags);

tx_beacon_cmd->tx.rate_n_flags =
iwl_hw_set_rate_n_flags(rate, rate_flags);

/* Submit command */
cmd.len[0] = sizeof(*tx_beacon_cmd);
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,19 +526,6 @@ int iwl_full_rxon_required(struct iwl_priv *priv,
return 0;
}

u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv,
struct iwl_rxon_context *ctx)
{
/*
* Assign the lowest rate -- should really get this from
* the beacon skb from mac80211.
*/
if (ctx->staging.flags & RXON_FLG_BAND_24G_MSK)
return IWL_RATE_1M_PLCP;
else
return IWL_RATE_6M_PLCP;
}

static void _iwl_set_rxon_ht(struct iwl_priv *priv,
struct iwl_ht_config *ht_conf,
struct iwl_rxon_context *ctx)
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,6 @@ void iwl_setup_watchdog(struct iwl_priv *priv);
****************************************************/
int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);

/*******************************************************************************
* Rate
******************************************************************************/

u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv,
struct iwl_rxon_context *ctx);

/*******************************************************************************
* Scanning
******************************************************************************/
Expand Down

0 comments on commit eb2b2bd

Please sign in to comment.