P2P: Add group ifname to P2P-PROV-DISC-* events

If Provision Discovery Request is sent for GO role (i.e., P2P Group ID
attribute is included), add the group interface name to the control
interface event on the GO. This makes it easier to figure out which
ctrl_iface needs to be used for wps_pbc/wps_pin command to authorize
the joining P2P client.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2011-12-06 21:57:17 +02:00
parent ec437d9e74
commit c3f4278445
6 changed files with 33 additions and 10 deletions

View file

@ -3196,7 +3196,8 @@ static void test_sd_response(void *ctx, const u8 *sa, u16 update_indic,
static void test_prov_disc_req(void *ctx, const u8 *peer, u16 config_methods,
const u8 *dev_addr, const u8 *pri_dev_type,
const char *dev_name, u16 supp_config_methods,
u8 dev_capab, u8 group_capab)
u8 dev_capab, u8 group_capab,
const u8 *group_id, size_t group_id_len)
{
wpa_printf(MSG_DEBUG, "%s(peer=" MACSTR " config_methods=0x%x)",
__func__, MAC2STR(peer), config_methods);

View file

@ -594,6 +594,8 @@ struct p2p_config {
* @supp_config_methods: Supported configuration Methods
* @dev_capab: Device Capabilities
* @group_capab: Group Capabilities
* @group_id: P2P Group ID (or %NULL if not included)
* @group_id_len: Length of P2P Group ID
*
* This callback is used to indicate reception of a Provision Discovery
* Request frame that the P2P module accepted.
@ -601,7 +603,8 @@ struct p2p_config {
void (*prov_disc_req)(void *ctx, const u8 *peer, u16 config_methods,
const u8 *dev_addr, const u8 *pri_dev_type,
const char *dev_name, u16 supp_config_methods,
u8 dev_capab, u8 group_capab);
u8 dev_capab, u8 group_capab,
const u8 *group_id, size_t group_id_len);
/**
* prov_disc_resp - Callback on Provisiong Discovery Response

View file

@ -191,8 +191,8 @@ out:
msg.device_name, msg.config_methods,
msg.capability ? msg.capability[0] : 0,
msg.capability ? msg.capability[1] :
0);
0,
msg.group_id, msg.group_id_len);
}
p2p_parse_free(&msg);
}