]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mac80211: fix rx_nss calculation for drivers with hw rc
authorMichal Kazior <michal.kazior@tieto.com>
Mon, 2 Dec 2013 10:54:07 +0000 (11:54 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 2 Dec 2013 14:42:16 +0000 (15:42 +0100)
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 <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rate.h

index 5dedc56c94dbe91a1b9bd6c959094ab3b494be86..32cdbd22c5f16a375d780d49a20f5e757729c4d4 100644 (file)
@@ -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();