| CPC H04L 67/1051 (2013.01) [H04W 48/10 (2013.01)] | 16 Claims |

|
1. An electronic device comprising:
at least one wireless communication module, including wireless communication circuitry, configured to transmit and receive a wireless signal;
at least one processor operatively connected with the wireless communication module; and
memory electrically connected to the at least one processor and configured to store instructions executable by the at least one processor,
wherein, when the instructions are executed by the at least one processor, the at least one processor is configured to:
obtain information for a wireless fidelity (Wi-Fi) peer to peer (P2P) connection to a second external electronic device while the electronic device forms a first P2P group with a first external electronic device through the Wi-Fi P2P connection, and
generate a second P2P group with the second external electronic device by obtaining a group owner (GO) permission while maintaining the first P2P group based on the information and a role of the electronic device in the first P2P group,
wherein the at least one processor is further configured to:
when the electronic device is connected to a Wi-Fi access point (AP), generate the second P2P group based on an operation channel of the first P2P group and a connection channel between the electronic device and the Wi-Fi AP,
when a first frequency band of the operation channel is different from a second frequency band of the connection channel, select a channel of a higher frequency band from the operation channel and the connection channel to be an operation channel of the second P2P group, and
when the first frequency band is the same as the second frequency band and the operation channel is different from the connection channel, select the operation channel of the second P2P group based on a remaining time of a P2P service of the first P2P group.
|