From patchwork Thu Mar 6 09:03:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoqiang Liu X-Patchwork-Id: 327337 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6A8E42C031C for ; Thu, 6 Mar 2014 20:03:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4449117C024; Thu, 6 Mar 2014 04:03:55 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2uin1mV9iikn; Thu, 6 Mar 2014 04:03:55 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CA0E617C00D; Thu, 6 Mar 2014 04:03:49 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id ECEA89D360 for ; Thu, 6 Mar 2014 04:03:48 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jOSCjizCIc+t for ; Thu, 6 Mar 2014 04:03:42 -0500 (EST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 6564C9D35F for ; Thu, 6 Mar 2014 04:03:42 -0500 (EST) Received: by mail-pd0-f170.google.com with SMTP id v10so2275749pde.15 for ; Thu, 06 Mar 2014 01:03:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qMwR3aa30C6j3TV8eXeswkoJuDYNzS7syneA3p3oktE=; b=ncI9Cqk3nx3wov7p70G1p5KK929YehdRdmprDubOEZ34SAeWJEtM0w/H6D+CQaM5+R 8k0ui52WmRLByLEa6yBbP22l4Df4+LTB3L0rmMHBpBIJ7eoZEphBNDxZ0aak8nVILOm7 zNcwd/Kwdl9VnkOkSh7F0889mlnkznAUhdqc7wJQlNWBSfHje9gHGBsPehZWL7GvBfMI sbHBUM/JSS3WbiRih8Ckh5wbmkH9jK6hy9FMDs2yZwZmFH2zCdTMVGJhBk+0UM6MDixf d7za0dr54NFgX8JjPNdanoL022ONpjjUvLaHunQoM3/qSSQoyuAQ/d8yKkA4TAUEegy9 Nx2g== X-Received: by 10.68.143.231 with SMTP id sh7mr13024083pbb.7.1394096620276; Thu, 06 Mar 2014 01:03:40 -0800 (PST) Received: from localhost.localdomain ([27.17.16.94]) by mx.google.com with ESMTPSA id lh13sm32977747pab.4.2014.03.06.01.03.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Mar 2014 01:03:39 -0800 (PST) From: Guoqiang Liu To: hostap@lists.shmoo.com Subject: [PATCH] P2P: make p2p_no_group_iface configurable with dbus Date: Thu, 6 Mar 2014 17:03:03 +0800 Message-Id: <1394096583-13708-1-git-send-email-guoqiang.liu@archermind.com> X-Mailer: git-send-email 1.7.9.5 Cc: guoqiang.liu@archermind.com X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: "guoqiang.liu" Some old device need to set p2p_no_group_iface 1 to set up a p2p connection, So open a dbus interface to configure it. --- wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c index 2b83637..6403e14 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c @@ -825,6 +825,11 @@ dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter, wpa_s->conf->disassoc_low_ack)) goto err_no_mem; + /* No Group Iface */ + if (!wpa_dbus_dict_append_bool(&dict_iter, "NoGroupIface", + wpa_s->conf->p2p_no_group_iface)) + goto err_no_mem; + if (!wpa_dbus_dict_close_write(&variant_iter, &dict_iter) || !dbus_message_iter_close_container(iter, &variant_iter)) goto err_no_mem; @@ -974,6 +979,9 @@ dbus_bool_t wpas_dbus_setter_p2p_device_config(DBusMessageIter *iter, else if (os_strcmp(entry.key, "disassoc_low_ack") == 0 && entry.type == DBUS_TYPE_UINT32) wpa_s->conf->disassoc_low_ack = entry.uint32_value; + else if ((os_strcmp(entry.key, "NoGroupIface") == 0) && + (entry.type == DBUS_TYPE_BOOLEAN)) + wpa_s->conf->p2p_no_group_iface = entry.bool_value; else goto error;