diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-15 12:35:23 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-15 12:35:23 +0000 |
commit | a5e70c13f8a7652abe052c44fb676c2f3087f0f5 (patch) | |
tree | d279b513a5f0868d641c79c280f6b02b21277fa9 /package/kernel/mac80211/patches | |
parent | 93cb862260ffc77ce73630ae26b952e9d44efcc2 (diff) | |
download | mtk-20170518-a5e70c13f8a7652abe052c44fb676c2f3087f0f5.zip mtk-20170518-a5e70c13f8a7652abe052c44fb676c2f3087f0f5.tar.gz mtk-20170518-a5e70c13f8a7652abe052c44fb676c2f3087f0f5.tar.bz2 |
mac80211: fix a crash in legacy minstrel when no STA exists
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37342
Diffstat (limited to 'package/kernel/mac80211/patches')
-rw-r--r-- | package/kernel/mac80211/patches/300-pending_work.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch index b35f5c6..c5a61bb 100644 --- a/package/kernel/mac80211/patches/300-pending_work.patch +++ b/package/kernel/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; |