From patchwork Thu Jun 8 08:17:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 772911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wjyzN2jm8z9sCZ for ; Thu, 8 Jun 2017 18:20:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gg/aubcr"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=3TnSMg40CNGicVEnwCbGLRfTpdOb6pba1U/MjZdYqPQ=; b=Gg/ aubcrcMvonhSeoIQkCeTo7deZwdrPknhkRpwvVNXfBVmDcw5cyx+tYeL/UO+DvPXVibyY2ChegZIz Yhxoq+YzHwXW0eX/w89YElHtQgY5vxzcQcnrSojYm2hR9h/gcCJSCcbCluUlal2ZMc1DcmoReAo3E merqiOR6/j8stsRa67aMkdJojHGEVrGC87nGb0Jhu9FxhKYGd6h8IxWiFKCZikNwtWZ4fyze0K25m kmW12hDoNuNXRx5iEG79J5tSiKPUbRNpTzAncZFFMAM/APgxtdOcllvfgeOjIlc16/51doZeDnYam MgjUxpp7VgZwuwhot3MWQftq6bxOTIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dIsfk-0004PY-GH; Thu, 08 Jun 2017 08:20:04 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIsfM-0004OM-7b for hostap@lists.infradead.org; Thu, 08 Jun 2017 08:19:41 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2017 01:19:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,314,1493708400"; d="scan'208"; a="1179822025" Received: from temphostname.jer.intel.com ([10.12.217.219]) by fmsmga002.fm.intel.com with ESMTP; 08 Jun 2017 01:19:15 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH] ap: Fix return value in hostapd_drv_switch_channel() Date: Thu, 8 Jun 2017 11:17:54 +0300 Message-Id: <1496909880-3511-1-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170608_011940_364837_DAB5C5B1 X-CRM114-Status: UNSURE ( 9.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [134.134.136.24 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [134.134.136.24 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilan Peer MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ilan Peer The documentation in driver.h state that in case of an error -1 is returned. Signed-off-by: Ilan Peer --- src/ap/ap_drv_ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h index b598015..bf8169d 100644 --- a/src/ap/ap_drv_ops.h +++ b/src/ap/ap_drv_ops.h @@ -276,7 +276,7 @@ static inline int hostapd_drv_switch_channel(struct hostapd_data *hapd, { if (hapd->driver == NULL || hapd->driver->switch_channel == NULL || hapd->drv_priv == NULL) - return -ENOTSUP; + return -1; return hapd->driver->switch_channel(hapd->drv_priv, settings); }