P2P: Add GO Intent of connecting device in GO Negotiation Request event
Add GO Intent information of connecting device in GO Negotiation Request event which will help applications to decide its own GO intent value in advance and can avoid failure cases when both devices use GO Intent 15 depending on application requirement. Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
This commit is contained in:
parent
f5d5161db1
commit
aa2b12562b
7 changed files with 26 additions and 15 deletions
|
@ -705,6 +705,7 @@ struct p2p_config {
|
|||
* @ctx: Callback context from cb_ctx
|
||||
* @src: Source address of the message triggering this notification
|
||||
* @dev_passwd_id: WPS Device Password ID
|
||||
* @go_intent: Peer's GO Intent
|
||||
*
|
||||
* This callback is used to notify that a P2P Device is requesting
|
||||
* group owner negotiation with us, but we do not have all the
|
||||
|
@ -713,7 +714,8 @@ struct p2p_config {
|
|||
* PIN or PBC button press. This information can be provided with a
|
||||
* call to p2p_connect().
|
||||
*/
|
||||
void (*go_neg_req_rx)(void *ctx, const u8 *src, u16 dev_passwd_id);
|
||||
void (*go_neg_req_rx)(void *ctx, const u8 *src, u16 dev_passwd_id,
|
||||
u8 go_intent);
|
||||
|
||||
/**
|
||||
* go_neg_completed - Notification of GO Negotiation results
|
||||
|
|
|
@ -668,7 +668,9 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa,
|
|||
MAC2STR(sa));
|
||||
status = P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE;
|
||||
p2p->cfg->go_neg_req_rx(p2p->cfg->cb_ctx, sa,
|
||||
msg.dev_password_id);
|
||||
msg.dev_password_id,
|
||||
msg.go_intent ? (*msg.go_intent >> 1) :
|
||||
0);
|
||||
} else if (p2p->go_neg_peer && p2p->go_neg_peer != dev) {
|
||||
p2p_dbg(p2p, "Already in Group Formation with another peer");
|
||||
status = P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue