From: Johannes Berg Date: Fri, 16 Jan 2015 20:05:02 +0000 (+0100) Subject: cfg80211: fix checking nl80211_send_station() return value X-Git-Tag: v4.0~334^2~69^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57007121228347515187049a9c65f7cbeb923dd1;p=platform%2Fkernel%2Flinux-amlogic.git cfg80211: fix checking nl80211_send_station() return value The return value from nl80211_send_station() is the length of the skb, or a negative error, so abort sending the message only when the return value was negative. This fixes the ibss_rsn wpa_supplicant test case. Reported-by: Jouni Malinen Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8e56eeb..c5661c5 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -11788,7 +11788,7 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr, return; if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0, - rdev, dev, mac_addr, sinfo)) { + rdev, dev, mac_addr, sinfo) < 0) { nlmsg_free(msg); return; }