diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
commit | 1c62c72b1a3c4478fb9069503d20c41b1f385ca1 (patch) | |
tree | 939634bedbabfcd389ab7ad96ab7e161e25b2061 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | da1fdb02d9200ff28b6f3a380d21930335fe5429 (diff) | |
parent | 9f6e1bafac4f3c58c8a670496adcc4d313d3c7f7 (diff) |
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 068f7f8435c5..de915c4b9e5c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -352,7 +352,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv, | |||
352 | * RX handler implementations | 352 | * RX handler implementations |
353 | * | 353 | * |
354 | *****************************************************************************/ | 354 | *****************************************************************************/ |
355 | #ifdef CONFIG_IWLWIFI_DEBUG | 355 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
356 | /* | 356 | /* |
357 | * based on the assumption of all statistics counter are in DWORD | 357 | * based on the assumption of all statistics counter are in DWORD |
358 | * FIXME: This function is for debugging, do not deal with | 358 | * FIXME: This function is for debugging, do not deal with |
@@ -460,7 +460,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, | |||
460 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", | 460 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", |
461 | (int)sizeof(struct iwl3945_notif_statistics), | 461 | (int)sizeof(struct iwl3945_notif_statistics), |
462 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 462 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
463 | #ifdef CONFIG_IWLWIFI_DEBUG | 463 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
464 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); | 464 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); |
465 | #endif | 465 | #endif |
466 | iwl_recover_from_statistics(priv, pkt); | 466 | iwl_recover_from_statistics(priv, pkt); |
@@ -475,7 +475,7 @@ void iwl3945_reply_statistics(struct iwl_priv *priv, | |||
475 | __le32 *flag = (__le32 *)&pkt->u.raw; | 475 | __le32 *flag = (__le32 *)&pkt->u.raw; |
476 | 476 | ||
477 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { | 477 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { |
478 | #ifdef CONFIG_IWLWIFI_DEBUG | 478 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
479 | memset(&priv->_3945.accum_statistics, 0, | 479 | memset(&priv->_3945.accum_statistics, 0, |
480 | sizeof(struct iwl3945_notif_statistics)); | 480 | sizeof(struct iwl3945_notif_statistics)); |
481 | memset(&priv->_3945.delta_statistics, 0, | 481 | memset(&priv->_3945.delta_statistics, 0, |
@@ -947,8 +947,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, | |||
947 | tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]); | 947 | tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]); |
948 | } | 948 | } |
949 | 949 | ||
950 | static u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, | 950 | static u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate) |
951 | u16 tx_rate, u8 flags) | ||
952 | { | 951 | { |
953 | unsigned long flags_spin; | 952 | unsigned long flags_spin; |
954 | struct iwl_station_entry *station; | 953 | struct iwl_station_entry *station; |
@@ -962,10 +961,9 @@ static u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, | |||
962 | station->sta.sta.modify_mask = STA_MODIFY_TX_RATE_MSK; | 961 | station->sta.sta.modify_mask = STA_MODIFY_TX_RATE_MSK; |
963 | station->sta.rate_n_flags = cpu_to_le16(tx_rate); | 962 | station->sta.rate_n_flags = cpu_to_le16(tx_rate); |
964 | station->sta.mode = STA_CONTROL_MODIFY_MSK; | 963 | station->sta.mode = STA_CONTROL_MODIFY_MSK; |
965 | 964 | iwl_send_add_sta(priv, &station->sta, CMD_ASYNC); | |
966 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); | 965 | spin_unlock_irqrestore(&priv->sta_lock, flags_spin); |
967 | 966 | ||
968 | iwl_send_add_sta(priv, &station->sta, flags); | ||
969 | IWL_DEBUG_RATE(priv, "SCALE sync station %d to rate %d\n", | 967 | IWL_DEBUG_RATE(priv, "SCALE sync station %d to rate %d\n", |
970 | sta_id, tx_rate); | 968 | sta_id, tx_rate); |
971 | return sta_id; | 969 | return sta_id; |
@@ -2473,8 +2471,7 @@ static int iwl3945_manage_ibss_station(struct iwl_priv *priv, | |||
2473 | 2471 | ||
2474 | iwl3945_sync_sta(priv, vif_priv->ibss_bssid_sta_id, | 2472 | iwl3945_sync_sta(priv, vif_priv->ibss_bssid_sta_id, |
2475 | (priv->band == IEEE80211_BAND_5GHZ) ? | 2473 | (priv->band == IEEE80211_BAND_5GHZ) ? |
2476 | IWL_RATE_6M_PLCP : IWL_RATE_1M_PLCP, | 2474 | IWL_RATE_6M_PLCP : IWL_RATE_1M_PLCP); |
2477 | CMD_ASYNC); | ||
2478 | iwl3945_rate_scale_init(priv->hw, vif_priv->ibss_bssid_sta_id); | 2475 | iwl3945_rate_scale_init(priv->hw, vif_priv->ibss_bssid_sta_id); |
2479 | 2476 | ||
2480 | return 0; | 2477 | return 0; |