From patchwork Mon Apr 21 04:53:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 4022391 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5848BFF02 for ; Mon, 21 Apr 2014 04:56:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4E2320265 for ; Mon, 21 Apr 2014 04:56:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E88C2025B for ; Mon, 21 Apr 2014 04:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751680AbaDUEzW (ORCPT ); Mon, 21 Apr 2014 00:55:22 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34433 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751663AbaDUEzT (ORCPT ); Mon, 21 Apr 2014 00:55:19 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so3330026pab.41 for ; Sun, 20 Apr 2014 21:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=5O/p8nURi8rxw0l9zP8XLcJPvGdxm+m+6tzkneSBcqA=; b=tm0U1Ah8rSCBQCRGR/Zqzsy3TKlGpAcfPiXPeiBwZuC8AkT8VpI5PfagsfoUqhhXH2 0ouQXlgVF2hxP2loAK0fwLKkwhAnk6AahyYDqSjP2OQbY6UjhzwPvLiOYtoQC/TbRukZ 0z0wLm90SN8hf/BtxpID2+59R3H8lQVpuoEdM8M1PkVmdSvU+a3i6K8VVlriDGl1/f7H zTtmL0RbWQxhUMV6Gwt3R0h6vGey1+aHt2vq0xmYYmvY9lYYSrs6x1JjO2YtD4P6MmnM VaT5IODkDr95gGEQ0m6KQCnRVGoRHBYVCamiKATtvzGVuXOjEwrHcwRKv9VdNQdkc2Jd 1agA== X-Received: by 10.69.19.139 with SMTP id gu11mr168041pbd.161.1398056119430; Sun, 20 Apr 2014 21:55:19 -0700 (PDT) Received: from localhost.localdomain ([61.157.126.13]) by mx.google.com with ESMTPSA id gj9sm75124104pbc.7.2014.04.20.21.55.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2014 21:55:18 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 09/12] cfg80211: change return value of notifier function Date: Mon, 21 Apr 2014 12:53:04 +0800 Message-Id: X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Return NOTIFY_DONE if we don't care this time's notification, return NOTIFY_OK if we successfully handled this time's notification. That's the formal way to do it. Signed-off-by: Zhao, Gang --- net/wireless/core.c | 4 +++- net/wireless/nl80211.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index 8045ef9..7ceb5dd 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1004,9 +1004,11 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, if (rfkill_blocked(rdev->rfkill)) return notifier_from_errno(-ERFKILL); break; + default: + return NOTIFY_DONE; } - return NOTIFY_DONE; + return NOTIFY_OK; } static struct notifier_block cfg80211_netdev_notifier = { diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 6550e20..fce423a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -11672,7 +11672,7 @@ static int nl80211_netlink_notify(struct notifier_block * nb, rcu_read_unlock(); - return NOTIFY_DONE; + return NOTIFY_OK; } static struct notifier_block nl80211_netlink_notifier = {