[PATCH] P2P: Do not return an error response if driver has return

root none root
Thu Oct 27 23:41:28 PDT 2011


noa_len greater than 0
 Signed-off-by: root <root at neeraj-ubuntu64.(none)>

---
 src/p2p/p2p_group.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 mode change 100644 => 100755 src/p2p/p2p_group.c

diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c
old mode 100644
new mode 100755
index 58b24c5..d60f6c0
--- a/src/p2p/p2p_group.c
+++ b/src/p2p/p2p_group.c
@@ -658,7 +658,7 @@ u8 p2p_group_presence_req(struct p2p_group *group,
     curr_noa_len);

  /* TODO: properly process request and store copy */
- if (curr_noa_len > 0)
+ if (curr_noa_len < 0)
  return P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE;

  return P2P_SC_SUCCESS;
-- 
1.7.4.1

--20cf303bffb093030b04b0563fba
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div><div><div>Hello,</div><div>If the driver returns a valid noa attribute=
 and curr_noa_len > 0, we should reutrn P2P Presence response as P2P_SC_=
SUCCESS instead of UNABLE_TO_ACCODATE. The problem is p2p_process_presence_=
req takes the status response from p2p_group_presence_req function and then=
 puts this status in P2P Presence response. With the present code, if curr_=
noa_len=3D=3D0, then only we send a SUCCESS response.</div>
<div>I agree that calling function p2p_group_presence_req() is not required=
 as we are anyways again calling get_noa in the function p2p_process_presen=
ce_req. But then alternatively, we should not use status variable to send t=
he P2P presence response OR status variable should be dependent upon get_no=
a call in function p2p_process_presence_req.</div>
</div><div><br></div><div>From 4dedc9f92a3f94265f042ddb53826e5b7063c47e Mon=
 Sep 17 00:00:00 2001</div><div>From: root <root at neeraj-ubuntu64.(none)&=
gt;</div><div>Date: Fri, 28 Oct 2011 12:11:28 +0530</div><div>Subject: [PAT=
CH] P2P: Do not return an error response if driver has return noa_len great=
er than 0</div>
<div>=A0Signed-off-by: root <root at neeraj-ubuntu64.(none)></div><div><=
br></div><div>---</div><div>=A0src/p2p/p2p_group.c | =A0 =A02 +-</div><div>=
=A01 files changed, 1 insertions(+), 1 deletions(-)</div><div>=A0mode chang=
e 100644 =3D> 100755 src/p2p/p2p_group.c</div>
<div><br></div><div>diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c<=
/div><div>old mode 100644</div><div>new mode 100755</div><div>index 58b24c5=
..d60f6c0</div><div>--- a/src/p2p/p2p_group.c</div><div>+++ b/src/p2p/p2p_g=
roup.c</div>
<div>@@ -658,7 +658,7 @@ u8 p2p_group_presence_req(struct p2p_group *group,=
</div><div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">			<=
/span> =A0 =A0curr_noa_len);</div><div>=A0</div><div>=A0<span class=3D"Appl=
e-tab-span" style=3D"white-space:pre">	</span>/* TODO: properly process req=
uest and store copy */</div>
<div>-<span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>if (=
curr_noa_len > 0)</div><div>+<span class=3D"Apple-tab-span" style=3D"whi=
te-space:pre">	</span>if (curr_noa_len < 0)</div><div>=A0<span class=3D"=
Apple-tab-span" style=3D"white-space:pre">		</span>return P2P_SC_FAIL_UNABL=
E_TO_ACCOMMODATE;</div>
<div>=A0</div><div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:p=
re">	</span>return P2P_SC_SUCCESS;</div><div>--=A0</div><div>1.7.4.1</div><=
/div>

--20cf303bffb093030b04b0563fba--



More information about the Hostap mailing list