[PATCH] P2P return a successful response for p2p presence request if driver has return noa_len greater than 0
Neeraj Kumar Garg
neerajkg
Tue Nov 8 03:06:08 PST 2011
Hello Jouni,
Sorry for sending this patch again. Please let me know if the patch requires modifications.
If the driver returns a valid noa attribute and curr_noa_len > 0, we should return 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==0, then only we send a SUCCESS response.
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_presence_req. But then alternatively, we should not use status variable to send the P2P presence response OR status variable should be dependent upon get_noa call in function p2p_process_presence_req.
---
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;
Regards,
-Neeraj
More information about the Hostap
mailing list