From: Michal Kazior Date: Mon, 2 Dec 2013 10:54:07 +0000 (+0100) Subject: mac80211: fix rx_nss calculation for drivers with hw rc X-Git-Tag: next-20131204~43^2^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ddcc347b70;p=karo-tx-linux.git mac80211: fix rx_nss calculation for drivers with hw rc Drivers with hardware rate control were given sta->rx_nss set to 0. This was because rx_nss calculation procedure was protected by hw/sw rate control check. Signed-off-by: Michal Kazior Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 5dedc56c94db..32cdbd22c5f1 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h @@ -54,6 +54,8 @@ static inline void rate_control_rate_init(struct sta_info *sta) struct ieee80211_supported_band *sband; struct ieee80211_chanctx_conf *chanctx_conf; + ieee80211_sta_set_rx_nss(sta); + if (!ref) return; @@ -67,8 +69,6 @@ static inline void rate_control_rate_init(struct sta_info *sta) sband = local->hw.wiphy->bands[chanctx_conf->def.chan->band]; - ieee80211_sta_set_rx_nss(sta); - ref->ops->rate_init(ref->priv, sband, &chanctx_conf->def, ista, priv_sta); rcu_read_unlock();