diff mbox

cfg80211: propagate set_wiphy failure to userspace

Message ID 1438592124-30803-1-git-send-email-michal.kazior@tieto.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Michal Kazior Aug. 3, 2015, 8:55 a.m. UTC
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>
---
 net/wireless/nl80211.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Johannes Berg Aug. 13, 2015, 11:56 a.m. UTC | #1
On Mon, 2015-08-03 at 10:55 +0200, Michal Kazior wrote:
> 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.
> 
Applied.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 76b41578a838..5849fa199f77 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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;