Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90133
b: refs/heads/master
c: f4d6082
h: refs/heads/master
i:
  90131: 114d66b
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Mar 7, 2008
1 parent 6226feb commit 1c6f914
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c5ef8a7059e4f7adc37b337face8b0a8cbd4f48
refs/heads/master: f4d6082d53c588036a1c37891cb7d65088be13f5
25 changes: 12 additions & 13 deletions trunk/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,19 +852,18 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,

sta = sta_info_get(local, hdr->addr1);

if (!sta || !sta->rate_ctrl_priv) {
rcu_read_unlock();
return;
}
if (!sta || !sta->rate_ctrl_priv)
goto out;


lq_sta = (struct iwl4965_lq_sta *)sta->rate_ctrl_priv;

if (!priv->lq_mngr.lq_ready)
return;
goto out;

if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) &&
!lq_sta->ibss_sta_added)
return;
goto out;

table = &lq_sta->lq;
active_index = lq_sta->active_tbl;
Expand Down Expand Up @@ -915,8 +914,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
tx_resp->control.tx_rate->bitrate)) {
IWL_DEBUG_RATE("initial rate does not match 0x%x\n",
tx_mcs.rate_n_flags);
rcu_read_unlock();
return;
goto out;
}

/* Update frame history window with "failure" for each Tx retry. */
Expand Down Expand Up @@ -1025,6 +1023,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,

/* See if there's a better rate or modulation mode to try. */
rs_rate_scale_perform(priv, dev, hdr, sta);
out:
rcu_read_unlock();
return;
}
Expand Down Expand Up @@ -2229,8 +2228,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) ||
!sta || !sta->rate_ctrl_priv) {
sel->rate = rate_lowest(local, sband, sta);
rcu_read_unlock();
return;
goto out;
}

lq_sta = (struct iwl4965_lq_sta *)sta->rate_ctrl_priv;
Expand All @@ -2257,14 +2255,15 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
goto done;
}

done:
done:
if ((i < 0) || (i > IWL_RATE_COUNT)) {
sel->rate = rate_lowest(local, sband, sta);
return;
goto out;
}
rcu_read_unlock();

sel->rate = &priv->ieee_rates[i];
out:
rcu_read_unlock();
}

static void *rs_alloc_sta(void *priv, gfp_t gfp)
Expand Down

0 comments on commit 1c6f914

Please sign in to comment.