mac80211: Check rate->idx before rate->count
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 14 Nov 2011 14:28:19 +0000 (15:28 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 7 Jun 2015 00:20:32 +0000 (03:20 +0300)
commit4cf712348fb4cee009299b430e31f1f5454176d2
tree81756fcb181cad88b8f2ae3f66f65512c3d5af29
parentf43e5c26aae82442667842ebd878c68d8454f5ac
mac80211: Check rate->idx before rate->count

The drivers are not required to fill in rate->count if rate->idx is set
to -1. Hence, we should first check rate->idx before accessing
rate->count.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rc80211_minstrel_ht.c