Commit 52518189 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

iwl3945: fix station stuff in RC algorithm

Probably bugs I added.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Acked-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d51626df
...@@ -826,13 +826,12 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) ...@@ -826,13 +826,12 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
rcu_read_lock(); rcu_read_lock();
sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr); sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr);
psta = (void *) sta->drv_priv; if (!sta) {
if (!sta || !psta) {
IWL_DEBUG_RATE("leave - no private rate data!\n");
rcu_read_unlock(); rcu_read_unlock();
return; return;
} }
psta = (void *) sta->drv_priv;
rs_sta = psta->rs_sta; rs_sta = psta->rs_sta;
spin_lock_irqsave(&rs_sta->lock, flags); spin_lock_irqsave(&rs_sta->lock, flags);
...@@ -856,7 +855,6 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) ...@@ -856,7 +855,6 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
break; break;
} }
rcu_read_unlock();
spin_unlock_irqrestore(&rs_sta->lock, flags); spin_unlock_irqrestore(&rs_sta->lock, flags);
rssi = priv->last_rx_rssi; rssi = priv->last_rx_rssi;
...@@ -870,6 +868,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) ...@@ -870,6 +868,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
IWL_DEBUG_RATE("leave: rssi %d assign rate index: " IWL_DEBUG_RATE("leave: rssi %d assign rate index: "
"%d (plcp 0x%x)\n", rssi, rs_sta->start_rate, "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate,
iwl3945_rates[rs_sta->start_rate].plcp); iwl3945_rates[rs_sta->start_rate].plcp);
rcu_read_unlock();
} }
int iwl3945_rate_control_register(void) int iwl3945_rate_control_register(void)
......
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