diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-15 12:36:00 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-15 12:36:00 +0000 |
commit | 35bc211eb648d5ab3fcc63ac7b2f520f8b0c9b1f (patch) | |
tree | 6becde8c0387adae57df5f82569d8006c173c2a0 | |
parent | 75e6ea0453a33e001a1e8c0288fcf167a3dd468e (diff) | |
download | upstream-35bc211eb648d5ab3fcc63ac7b2f520f8b0c9b1f.tar.gz upstream-35bc211eb648d5ab3fcc63ac7b2f520f8b0c9b1f.tar.bz2 upstream-35bc211eb648d5ab3fcc63ac7b2f520f8b0c9b1f.zip |
mac80211: fix a crash in legacy minstrel when no STA exists
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r37342
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@37343 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index b35f5c6036..c5a61bb7d5 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -779,3 +779,22 @@ } static int cfg80211_sme_connect(struct wireless_dev *wdev, +--- a/net/mac80211/rc80211_minstrel.c ++++ b/net/mac80211/rc80211_minstrel.c +@@ -290,7 +290,7 @@ minstrel_get_rate(void *priv, struct iee + struct minstrel_rate *msr, *mr; + unsigned int ndx; + bool mrr_capable; +- bool prev_sample = mi->prev_sample; ++ bool prev_sample; + int delta; + int sampling_ratio; + +@@ -314,6 +314,7 @@ minstrel_get_rate(void *priv, struct iee + (mi->sample_count + mi->sample_deferred / 2); + + /* delta < 0: no sampling required */ ++ prev_sample = mi->prev_sample; + mi->prev_sample = false; + if (delta < 0 || (!mrr_capable && prev_sample)) + return; |