static u16 p2p_wps_method_pw_id(enum p2p_wps_method wps_method)
{
switch (wps_method) {
- case WPS_PIN_LABEL:
- return DEV_PW_DEFAULT;
case WPS_PIN_DISPLAY:
return DEV_PW_REGISTRAR_SPECIFIED;
case WPS_PIN_KEYPAD:
static const char * p2p_wps_method_str(enum p2p_wps_method wps_method)
{
switch (wps_method) {
- case WPS_PIN_LABEL:
- return "Label";
case WPS_PIN_DISPLAY:
return "Display";
case WPS_PIN_KEYPAD:
}
switch (msg.dev_password_id) {
- case DEV_PW_DEFAULT:
- wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
- "P2P: PIN from peer Label");
- if (dev->wps_method != WPS_PIN_KEYPAD) {
- wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
- "P2P: We have wps_method=%s -> "
- "incompatible",
- p2p_wps_method_str(dev->wps_method));
- status = P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD;
- goto fail;
- }
- break;
case DEV_PW_REGISTRAR_SPECIFIED:
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: PIN from peer Display");
case DEV_PW_USER_SPECIFIED:
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: Peer entered PIN on Keypad");
- if (dev->wps_method != WPS_PIN_LABEL &&
- dev->wps_method != WPS_PIN_DISPLAY) {
+ if (dev->wps_method != WPS_PIN_DISPLAY) {
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: We have wps_method=%s -> "
"incompatible",
dev->oper_freq = 0;
switch (msg.dev_password_id) {
- case DEV_PW_DEFAULT:
- wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
- "P2P: PIN from peer Label");
- if (dev->wps_method != WPS_PIN_KEYPAD) {
- wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
- "P2P: We have wps_method=%s -> "
- "incompatible",
- p2p_wps_method_str(dev->wps_method));
- status = P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD;
- goto fail;
- }
- break;
case DEV_PW_REGISTRAR_SPECIFIED:
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: PIN from peer Display");
case DEV_PW_USER_SPECIFIED:
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: Peer entered PIN on Keypad");
- if (dev->wps_method != WPS_PIN_LABEL &&
- dev->wps_method != WPS_PIN_DISPLAY) {
+ if (dev->wps_method != WPS_PIN_DISPLAY) {
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: We have wps_method=%s -> "
"incompatible",
wps_method = WPS_PBC;
else if (!os_strcmp(entry.str_value, "pin"))
wps_method = WPS_PIN_DISPLAY;
- else if (!os_strcmp(entry.str_value, "label"))
- wps_method = WPS_PIN_LABEL;
else if (!os_strcmp(entry.str_value, "display"))
wps_method = WPS_PIN_DISPLAY;
else if (!os_strcmp(entry.str_value, "keypad"))
/*
* Validate the wps_method specified and the pin value.
*/
- if ((!pin || !pin[0]) &&
- ((wps_method == WPS_PIN_LABEL) || (wps_method == WPS_PIN_KEYPAD)))
+ if ((!pin || !pin[0]) && (wps_method == WPS_PIN_KEYPAD))
goto inv_args;
new_pin = wpas_p2p_connect(wpa_s, addr, pin, wps_method,