aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-01-16 15:05:02 -0500
committerJohannes Berg <johannes.berg@intel.com>2015-01-16 15:05:52 -0500
commit57007121228347515187049a9c65f7cbeb923dd1 (patch)
tree6182ff537e61976ac4669c09b8bba37a8cfdd248 /net/wireless
parent5e06a9e8b6db441371dadc02f3e2348196f408dd (diff)
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 <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8e56eeb583aa..c5661c5ad8f3 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,
11788 return; 11788 return;
11789 11789
11790 if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0, 11790 if (nl80211_send_station(msg, NL80211_CMD_DEL_STATION, 0, 0, 0,
11791 rdev, dev, mac_addr, sinfo)) { 11791 rdev, dev, mac_addr, sinfo) < 0) {
11792 nlmsg_free(msg); 11792 nlmsg_free(msg);
11793 return; 11793 return;
11794 } 11794 }