diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 0db742c0aff..dd1c639074c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -408,7 +408,7 @@ int iwl_add_station_common(struct iwl_priv *priv, const u8 *addr, | |||
408 | EXPORT_SYMBOL(iwl_add_station_common); | 408 | EXPORT_SYMBOL(iwl_add_station_common); |
409 | 409 | ||
410 | static struct iwl_link_quality_cmd *iwl_sta_init_lq(struct iwl_priv *priv, | 410 | static struct iwl_link_quality_cmd *iwl_sta_init_lq(struct iwl_priv *priv, |
411 | const u8 *addr, bool is_ap) | 411 | u8 sta_id) |
412 | { | 412 | { |
413 | int i, r; | 413 | int i, r; |
414 | struct iwl_link_quality_cmd *link_cmd; | 414 | struct iwl_link_quality_cmd *link_cmd; |
@@ -422,9 +422,7 @@ static struct iwl_link_quality_cmd *iwl_sta_init_lq(struct iwl_priv *priv, | |||
422 | } | 422 | } |
423 | /* Set up the rate scaling to start at selected rate, fall back | 423 | /* Set up the rate scaling to start at selected rate, fall back |
424 | * all the way down to 1M in IEEE order, and then spin on 1M */ | 424 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
425 | if (is_ap) | 425 | if (priv->band == IEEE80211_BAND_5GHZ) |
426 | r = IWL_RATE_54M_INDEX; | ||
427 | else if (priv->band == IEEE80211_BAND_5GHZ) | ||
428 | r = IWL_RATE_6M_INDEX; | 426 | r = IWL_RATE_6M_INDEX; |
429 | else | 427 | else |
430 | r = IWL_RATE_1M_INDEX; | 428 | r = IWL_RATE_1M_INDEX; |
@@ -459,8 +457,7 @@ static struct iwl_link_quality_cmd *iwl_sta_init_lq(struct iwl_priv *priv, | |||
459 | link_cmd->agg_params.agg_time_limit = | 457 | link_cmd->agg_params.agg_time_limit = |
460 | cpu_to_le16(LINK_QUAL_AGG_TIME_LIMIT_DEF); | 458 | cpu_to_le16(LINK_QUAL_AGG_TIME_LIMIT_DEF); |
461 | 459 | ||
462 | /* Update the rate scaling for control frame Tx to AP */ | 460 | link_cmd->sta_id = sta_id; |
463 | link_cmd->sta_id = is_ap ? IWL_AP_ID : priv->hw_params.bcast_sta_id; | ||
464 | 461 | ||
465 | ret = iwl_send_lq_cmd(priv, link_cmd, CMD_SYNC, true); | 462 | ret = iwl_send_lq_cmd(priv, link_cmd, CMD_SYNC, true); |
466 | if (ret) | 463 | if (ret) |
@@ -496,7 +493,7 @@ int iwl_add_local_station(struct iwl_priv *priv, const u8 *addr, bool init_rs) | |||
496 | 493 | ||
497 | if (init_rs) { | 494 | if (init_rs) { |
498 | /* Set up default rate scaling table in device's station table */ | 495 | /* Set up default rate scaling table in device's station table */ |
499 | link_cmd = iwl_sta_init_lq(priv, addr, false); | 496 | link_cmd = iwl_sta_init_lq(priv, sta_id); |
500 | if (!link_cmd) { | 497 | if (!link_cmd) { |
501 | IWL_ERR(priv, "Unable to initialize rate scaling for station %pM.\n", | 498 | IWL_ERR(priv, "Unable to initialize rate scaling for station %pM.\n", |
502 | addr); | 499 | addr); |