From patchwork Fri Jun 16 03:57:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 9790481 X-Patchwork-Delegate: sameo@linux.intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 118A7603B5 for ; Fri, 16 Jun 2017 03:57:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0B552841D for ; Fri, 16 Jun 2017 03:57:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5AC928638; Fri, 16 Jun 2017 03:57:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 018A02856F for ; Fri, 16 Jun 2017 03:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751836AbdFPD5g (ORCPT ); Thu, 15 Jun 2017 23:57:36 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60931 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdFPD5b (ORCPT ); Thu, 15 Jun 2017 23:57:31 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4F8EF20975; Thu, 15 Jun 2017 23:57:30 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Thu, 15 Jun 2017 23:57:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=animalcreek.com; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Gtz Gg/c3U+nD/4g8Q2LPNYWlpJIxyX5Rwb/EU00yphw=; b=nQkOvZlIteptDbm3aZp 8WidHiwCSyluMV/jw6Xyx0T6ev6bOJHvQwTPqwBDMtIAnr2ke/SWrQZ0W0x/GLpA rarZHe3MpSD20NK2zIGhsLtSK7KPamgGGy7NiohNTd+a08cr/xBP2ETRjkXd+MsV WGTo0Fr63KYMR9B9wX2aU3lQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=GtzGg/c3U+nD/4g8Q2LPNYWlpJIxyX5Rwb/EU00yp hw=; b=YagILKLapd06uwZoI8NTrFZegP21i/3rJl8uHl/NC2ieNjo0hVkSp38OQ IQ4MjWO3QdWqXvFsJ/0f2yoA69wkhkkAe/jZSiU+rCr7C0hV2986TDb93UJ/ixaW WX+eRFm2UehXlbVR6PEQWQ31B/RnjiM/rQFICbgCeX7ht4j5Xmsxn0CjsvpZbPPb AhiaCq35rBW7MEXyKJWo6s1fUWo0/enBPMhcqFxxnK60yHkXlGM0ZM7VJKVr5O8f elwThpO8IvwGt9InAsNSER+brl2D1KmnK8T8dhou/poemfty1jpoR2vdNCv/2UKO z+iG4hc1V/0Xo/cDTgXFRuQxif+xw== X-ME-Sender: X-Sasl-enc: MB+uKEyQacR3iSZL2fhyBhcVefFMykF+YfZyAe3llgHd 1497585450 Received: from blue.animalcreek.com (ip68-2-81-12.ph.ph.cox.net [68.2.81.12]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DF9924767; Thu, 15 Jun 2017 23:57:30 -0400 (EDT) Received: from blue.animalcreek.com (localhost [127.0.0.1]) by blue.animalcreek.com (Postfix) with ESMTP id 78F2DA202D8; Thu, 15 Jun 2017 20:57:29 -0700 (MST) From: Mark Greer To: Samuel Ortiz Cc: linux-wireless@vger.kernel.org, linux-nfc@lists.01.org, Mark Greer Subject: [PATCH 2/4] adapter: Add call indicating whether constant poll is enabled Date: Thu, 15 Jun 2017 20:57:26 -0700 Message-Id: <20170616035728.19415-3-mgreer@animalcreek.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170616035728.19415-1-mgreer@animalcreek.com> References: <20170616035728.19415-1-mgreer@animalcreek.com> Organization: Animal Creek Technologies, Inc. Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a routine that returns a boolean indicating whether the adapter constant poll option is enabled or not. Signed-off-by: Mark Greer --- src/adapter.c | 5 +++++ src/near.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index e8c7c61..9c483ca 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -578,6 +578,11 @@ void __near_adapter_destroy(struct near_adapter *adapter) free_adapter(adapter); } +bool __near_adapter_is_constant_poll(struct near_adapter *adapter) +{ + return adapter->constant_poll; +} + const char *__near_adapter_get_path(struct near_adapter *adapter) { return adapter->path; diff --git a/src/near.h b/src/near.h index 7795e61..50a4c8b 100644 --- a/src/near.h +++ b/src/near.h @@ -78,6 +78,7 @@ void __near_manager_cleanup(void); struct near_adapter *__near_adapter_create(uint32_t idx, const char *name, uint32_t protocols, bool powered); void __near_adapter_destroy(struct near_adapter *adapter); +bool __near_adapter_is_constant_poll(struct near_adapter *adapter); const char *__near_adapter_get_path(struct near_adapter *adapter); struct near_adapter *__near_adapter_get(uint32_t idx); int __near_adapter_add(struct near_adapter *adapter);