diff mbox

[08/14] ctrl: Redirect global MGMT_TX and GET commands to P2P Device interface

Message ID 1444837400-17309-9-git-send-email-ilan.peer@intel.com
State Changes Requested
Headers show

Commit Message

Ilan Peer Oct. 14, 2015, 3:43 p.m. UTC
From: Avraham Stern <avraham.stern@intel.com>

Redirect MGMT_TX and GET commands from the global control interface to
the P2P Device interface, to support a configuration that uses a
dedicated P2P Device interface.

The redirection of MGMT_TX is needed in tests that use MGMT_TX for
P2P, e.g., in gas_max_pending().

The redirection of GET is needed in tests that try to get values
previously configured using SET, e.g.,  nfc_p2p_go_neg()

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
---
 wpa_supplicant/ctrl_iface.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jouni Malinen Oct. 28, 2015, 8:50 a.m. UTC | #1
On Thu, Oct 22, 2015 at 02:11:31PM +0000, Peer, Ilan wrote:
> > From: Jouni Malinen [mailto:j@w1.fi]
> > On Wed, Oct 14, 2015 at 06:43:14PM +0300, Ilan Peer wrote:
> > > diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> > > wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
> > > +#ifdef CONFIG_TESTING_OPTIONS
> > > +		"MGMT_TX ",
> > > +		"GET ",
> > > +#endif /* CONFIG_TESTING_OPTIONS */
> > 
> > Neither of these does not seem correct to redirect to a P2P interface.
> > These are in no way specific to P2P and especially MGMT_TX looks pretty
> > strange on the global interface since it is specific to an interface.
> 
> Would it be better to state the interface names explicitly? So wlanX would be used in case the P2P Device is not used, and p2p-dev otherwise?

Yes, the correct interface name would need to be specified in the test
script. I'm not completely sure what test case operations this is needed
in, so cannot comment on the proper way of handling it there, but I
don't see a wpa_supplicant change to be the correct way to do this.
Ilan Peer Oct. 28, 2015, 9:23 a.m. UTC | #2
> -----Original Message-----
> From: Jouni Malinen [mailto:j@w1.fi]
> Sent: Wednesday, October 28, 2015 10:50
> To: Peer, Ilan
> Cc: hostap@lists.infradead.org; Stern, Avraham
> Subject: Re: [PATCH 08/14] ctrl: Redirect global MGMT_TX and GET
> commands to P2P Device interface
> 
> On Thu, Oct 22, 2015 at 02:11:31PM +0000, Peer, Ilan wrote:
> > > From: Jouni Malinen [mailto:j@w1.fi] On Wed, Oct 14, 2015 at
> > > 06:43:14PM +0300, Ilan Peer wrote:
> > > > diff --git a/wpa_supplicant/ctrl_iface.c
> > > > b/wpa_supplicant/ctrl_iface.c
> > > > wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
> > > > +#ifdef CONFIG_TESTING_OPTIONS
> > > > +		"MGMT_TX ",
> > > > +		"GET ",
> > > > +#endif /* CONFIG_TESTING_OPTIONS */
> > >
> > > Neither of these does not seem correct to redirect to a P2P interface.
> > > These are in no way specific to P2P and especially MGMT_TX looks
> > > pretty strange on the global interface since it is specific to an interface.
> >
> > Would it be better to state the interface names explicitly? So wlanX would
> be used in case the P2P Device is not used, and p2p-dev otherwise?
> 
> Yes, the correct interface name would need to be specified in the test script.
> I'm not completely sure what test case operations this is needed in, so cannot
> comment on the proper way of handling it there, but I don't see a
> wpa_supplicant change to be the correct way to do this.
> 

Ok. Please drop these patches. We'll change the implementation and send a new patch set.

Thanks,

Ilan.
diff mbox

Patch

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index a32b718..351c746 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -9152,6 +9152,10 @@  static char * wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
 		"NFC_REPORT_HANDOVER ",
 		"P2P_ASP_PROVISION ",
 		"P2P_ASP_PROVISION_RESP ",
+#ifdef CONFIG_TESTING_OPTIONS
+		"MGMT_TX ",
+		"GET ",
+#endif /* CONFIG_TESTING_OPTIONS */
 		NULL
 	};
 	int found = 0;