If there is a pending GO Negotiation when p2p_cancel is used,
unauthorize the peer to avoid immediate reconnection from being
accepted without a new p2p_connect command.
p2p->best_freq_5 = freq_5;
p2p->best_freq_overall = freq_overall;
}
+
+
+const u8 * p2p_get_go_neg_peer(struct p2p_data *p2p)
+{
+ if (p2p == NULL || p2p->go_neg_peer == NULL)
+ return NULL;
+ return p2p->go_neg_peer->p2p_device_addr;
+}
void p2p_set_best_channels(struct p2p_data *p2p, int freq_24, int freq_5,
int freq_overall);
+const u8 * p2p_get_go_neg_peer(struct p2p_data *p2p);
+
#endif /* P2P_H */
{
struct wpa_global *global = wpa_s->global;
int found = 0;
+ const u8 *peer;
wpa_printf(MSG_DEBUG, "P2P: Request to cancel group formation");
!is_zero_ether_addr(wpa_s->pending_interface_addr))
found = 1;
+ peer = p2p_get_go_neg_peer(global->p2p);
+ if (peer) {
+ wpa_printf(MSG_DEBUG, "P2P: Unauthorize pending GO Neg peer "
+ MACSTR, MAC2STR(peer));
+ p2p_unauthorize(global->p2p, peer);
+ }
+
wpas_p2p_stop_find(wpa_s);
for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {