Commit
da290c54610f49ef475f7f88668259216b08fc36 inverted the check of
the return value when converting to use cfg80211_find_ie().
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
supportRateNum = p[1];
p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, pos, left);
- if (!p) {
+ if (p) {
if (supportRateNum <= sizeof(supportRate)) {
memcpy(supportRate+supportRateNum, p + 2, p[1]);
supportRateNum += p[1];