* [PATCH] iwl3945: fix station stuff in RC algorithm
@ 2008-10-10 23:46 Johannes Berg
2008-10-14 21:15 ` reinette chatre
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2008-10-10 23:46 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
Probably bugs I added.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- everything.orig/drivers/net/wireless/iwlwifi/iwl-3945-rs.c 2008-10-11 01:37:24.000000000 +0200
+++ everything/drivers/net/wireless/iwlwifi/iwl-3945-rs.c 2008-10-11 01:42:19.000000000 +0200
@@ -806,13 +806,12 @@ void iwl3945_rate_scale_init(struct ieee
rcu_read_lock();
sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr);
- psta = (void *) sta->drv_priv;
- if (!sta || !psta) {
- IWL_DEBUG_RATE("leave - no private rate data!\n");
+ if (!sta) {
rcu_read_unlock();
return;
}
+ psta = (void *) sta->drv_priv;
rs_sta = psta->rs_sta;
spin_lock_irqsave(&rs_sta->lock, flags);
@@ -836,7 +835,6 @@ void iwl3945_rate_scale_init(struct ieee
break;
}
- rcu_read_unlock();
spin_unlock_irqrestore(&rs_sta->lock, flags);
rssi = priv->last_rx_rssi;
@@ -850,6 +848,7 @@ void iwl3945_rate_scale_init(struct ieee
IWL_DEBUG_RATE("leave: rssi %d assign rate index: "
"%d (plcp 0x%x)\n", rssi, rs_sta->start_rate,
iwl3945_rates[rs_sta->start_rate].plcp);
+ rcu_read_unlock();
}
int iwl3945_rate_control_register(void)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-14 21:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 23:46 [PATCH] iwl3945: fix station stuff in RC algorithm Johannes Berg
2008-10-14 21:15 ` reinette chatre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox