Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2455330ybg; Fri, 5 Jun 2020 14:32:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQmszi7PicVZe1DkGy9v4Hoy0s/jAkr8aqqwgCTsyUbTQY7j7gaH4V1FZieHq32bmKu/zt X-Received: by 2002:a05:6402:690:: with SMTP id f16mr11680125edy.9.1591392752228; Fri, 05 Jun 2020 14:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591392752; cv=none; d=google.com; s=arc-20160816; b=zDUallGk0fMtQ9DU/uQ+FbtfaE8pzCGPcY0pRK5pPeKlKBbHOSGvXnTaP+7myJeHlB UzfCOR3DHdm24YtG460uQvUc8F6eQn4CGNu2JBl3KI76GfhX5I41Lv6qrcyg7qDvWcPf P+mIVwwI1OEJ2NfLRANvFKL0RoeqgwFg9p237I5APrTRQcha3yWhSQM58uchqU7zNjB7 qIv3HPZo3jH9yURcD/XiavRRT2b8T1my5dA8AX3rww6uYjtSyniJ9BC29aZrVtwglZ71 Tp7GYFCyCpfBYB1MPLB4ap7UbYLacEe1dKeh6oCOoGR1bBBCmlIhQAhgX/5TF4TqrHBS YNRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=1AYj/noMr3HLkxLYED3BSy4U7HsOLtTMoIM0q0G2y0E=; b=guxeUD6yhEqdX1HCXHLnKPZrR04c7WJgkKFR0zdjNObQYJ5t38benjzFFRAeNhJ9kn RnQRcBYM8/PIx7FVG4gRn/o9eloh126+u7nYHLwZSbT5A/8pcaBYVX5lyEaL6BLP2OF7 htLn15c/lK9uI/Njoy5AJZfwjhIJQlqjQfezSkZpifgctDt3S7Ue7MX5Ad8k5BFPPVSY oChMDNWQxad1RM0nS2o9tn69CY0cCflJdu4JO1zJiispRtLL2NVOsSJDTuCZ4c29LFSa fo48yeozK89g297/0m9eVktCwOhugz+UmAvMUJVXhJMDPEvH7L4wLqOAwCEl/F9ineAL 2QUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb12si3986418ejb.705.2020.06.05.14.31.53; Fri, 05 Jun 2020 14:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728303AbgFEVbw (ORCPT + 99 others); Fri, 5 Jun 2020 17:31:52 -0400 Received: from mga07.intel.com ([134.134.136.100]:35351 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728227AbgFEVbw (ORCPT ); Fri, 5 Jun 2020 17:31:52 -0400 IronPort-SDR: 7T3Lp9fRaAjlOZzdmuDeZM0RkWCPkdm3AMEO3F/6o1BEjYdvsA7Wo+8a5BG1RPXFLqORqi2lXg KsQ5Qwn295NA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2020 14:31:51 -0700 IronPort-SDR: B7vRDmpMx3e94EcAcavclW9lr/W75g+/erSTfC7+Vg6Hvvl84NtiFjzD9KyT/9I/kAAYGmLQhy 8XBQynRpjhdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,477,1583222400"; d="scan'208";a="305193637" Received: from ahakman-mobl.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.103.116]) by fmsmga002.fm.intel.com with ESMTP; 05 Jun 2020 14:31:50 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ] mesh: Remove unused/redundant functions Date: Fri, 5 Jun 2020 14:31:43 -0700 Message-Id: <20200605213143.194808-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This removes mesh_net_provisioner_mode_set (unused) and mesh_net_provisioner_mode_get (duplicates node_is_provisioner) --- mesh/model.c | 2 +- mesh/net.c | 10 ---------- mesh/net.h | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/mesh/model.c b/mesh/model.c index ec79a69b8..f2dfb2644 100644 --- a/mesh/model.c +++ b/mesh/model.c @@ -907,7 +907,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0, * The packet needs to be decoded by the correct key which * is hinted by key_aid, but is not necessarily definitive */ - if (key_aid == APP_AID_DEV || mesh_net_provisioner_mode_get(net)) + if (key_aid == APP_AID_DEV || node_is_provisioner(node)) decrypt_idx = dev_packet_decrypt(node, data, size, szmict, src, dst, key_aid, seq0, iv_index, clear_text); diff --git a/mesh/net.c b/mesh/net.c index 07813eec4..c12dd6541 100644 --- a/mesh/net.c +++ b/mesh/net.c @@ -3362,16 +3362,6 @@ void mesh_net_set_iv_index(struct mesh_net *net, uint32_t index, bool update) net->iv_update = update; } -void mesh_net_provisioner_mode_set(struct mesh_net *net, bool mode) -{ - net->provisioner = mode; -} - -bool mesh_net_provisioner_mode_get(struct mesh_net *net) -{ - return net->provisioner; -} - uint16_t mesh_net_get_primary_idx(struct mesh_net *net) { struct mesh_subnet *subnet; diff --git a/mesh/net.h b/mesh/net.h index 84e7c1545..f7fe3f150 100644 --- a/mesh/net.h +++ b/mesh/net.h @@ -335,8 +335,6 @@ void mesh_net_send_seg(struct mesh_net *net, uint32_t key_id, struct mesh_net_heartbeat *mesh_net_heartbeat_get(struct mesh_net *net); void mesh_net_heartbeat_init(struct mesh_net *net); void mesh_net_heartbeat_send(struct mesh_net *net); -void mesh_net_provisioner_mode_set(struct mesh_net *net, bool mode); -bool mesh_net_provisioner_mode_get(struct mesh_net *net); bool mesh_net_key_list_get(struct mesh_net *net, uint8_t *buf, uint16_t *count); uint16_t mesh_net_get_primary_idx(struct mesh_net *net); uint32_t mesh_net_friend_timeout(struct mesh_net *net, uint16_t addr); -- 2.26.2