diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-10 19:46:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:14 -0400 |
commit | 525181891fb5ed323b6ba0f141c422f1395acfb9 (patch) | |
tree | 003062baca032810047574bf545802ef8f8c5143 /drivers/net/wireless | |
parent | d51626df5747efaa8d2c00678f64cb503845effe (diff) |
iwl3945: fix station stuff in RC algorithm
Probably bugs I added.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index bb91353c443e..c25daec4f93d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -826,13 +826,12 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
826 | rcu_read_lock(); | 826 | rcu_read_lock(); |
827 | 827 | ||
828 | sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr); | 828 | sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr); |
829 | psta = (void *) sta->drv_priv; | 829 | if (!sta) { |
830 | if (!sta || !psta) { | ||
831 | IWL_DEBUG_RATE("leave - no private rate data!\n"); | ||
832 | rcu_read_unlock(); | 830 | rcu_read_unlock(); |
833 | return; | 831 | return; |
834 | } | 832 | } |
835 | 833 | ||
834 | psta = (void *) sta->drv_priv; | ||
836 | rs_sta = psta->rs_sta; | 835 | rs_sta = psta->rs_sta; |
837 | 836 | ||
838 | spin_lock_irqsave(&rs_sta->lock, flags); | 837 | spin_lock_irqsave(&rs_sta->lock, flags); |
@@ -856,7 +855,6 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
856 | break; | 855 | break; |
857 | } | 856 | } |
858 | 857 | ||
859 | rcu_read_unlock(); | ||
860 | spin_unlock_irqrestore(&rs_sta->lock, flags); | 858 | spin_unlock_irqrestore(&rs_sta->lock, flags); |
861 | 859 | ||
862 | rssi = priv->last_rx_rssi; | 860 | rssi = priv->last_rx_rssi; |
@@ -870,6 +868,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
870 | IWL_DEBUG_RATE("leave: rssi %d assign rate index: " | 868 | IWL_DEBUG_RATE("leave: rssi %d assign rate index: " |
871 | "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate, | 869 | "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate, |
872 | iwl3945_rates[rs_sta->start_rate].plcp); | 870 | iwl3945_rates[rs_sta->start_rate].plcp); |
871 | rcu_read_unlock(); | ||
873 | } | 872 | } |
874 | 873 | ||
875 | int iwl3945_rate_control_register(void) | 874 | int iwl3945_rate_control_register(void) |