cfg80211: propagate set_wiphy failure to userspace
authorMichal Kazior <michal.kazior@tieto.com>
Mon, 3 Aug 2015 08:55:24 +0000 (10:55 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Aug 2015 15:49:47 +0000 (17:49 +0200)
If driver failed to setup wiphy params (e.g. rts
threshold, fragmentation treshold) userspace
wasn't properly notified about this. This could
lead to user confusion who would think the command
succeeded even if that wasn't the case.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c

index 76b41578a838e3bed8596c5950ffbd6881d54a64..5849fa199f7733a0a67291b19ec2acdf2be72c23 100644 (file)
@@ -2321,6 +2321,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
                        rdev->wiphy.frag_threshold = old_frag_threshold;
                        rdev->wiphy.rts_threshold = old_rts_threshold;
                        rdev->wiphy.coverage_class = old_coverage_class;
+                       return result;
                }
        }
        return 0;