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;
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. */
/* 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;
}
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;
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)