From: Jouni Malinen Date: Sun, 26 Apr 2015 10:59:06 +0000 (+0300) Subject: P2P: Allow wpa_supplicant to start if social channels are not supported X-Git-Tag: hostap_2_5~796 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5678a2d89b40bd449f41c2debe24e77f6c4ca248;p=thirdparty%2Fhostap.git P2P: Allow wpa_supplicant to start if social channels are not supported It was possible for an nl80211-based driver to be determined to support P2P even when the radio supports only the 5 GHz band. This resulted in P2P initialization failing due to not being able to pick a social channel and wpa_supplicant not starting. Fix this by not enabling P2P, but still allowing wpa_supplicant initialization to complete. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index b8592d321..def959f68 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3931,9 +3931,9 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s) */ if (p2p_config_get_random_social(&p2p, &p2p.reg_class, &p2p.channel) != 0) { - wpa_printf(MSG_ERROR, - "P2P: Failed to select random social channel as listen channel"); - return -1; + wpa_printf(MSG_INFO, + "P2P: No social channels supported by the driver - do not enable P2P"); + return 0; } p2p.channel_forced = 0; }