[RFC] P2P: Handling single channel concurrency
Jouni Malinen
j
Sun Jan 8 21:08:03 PST 2012
On Tue, Dec 27, 2011 at 03:15:49AM -0800, Jithu Jance wrote:
> This patch attempts to handle the single channel concurrency scenario where we initially have a P2P connection and then a STA connection is attempted.
>
> As a first step, i tried implementing following things.
> 1. When STA connection is attempted, try to find whether there is any frequency conflict between any other interface.
> 2. If the conflicting interface is a P2P GO, announce channel switch in beacons and move the GO. /* Just a hook is provided. Functionality is not yet implemented */
This sounds fine.
> 3. If GO is not able to move the channel or the driver doesn't support the functionality, remove the P2P GO interface.
> 4. If the conflicting interface is a P2P Client, disconnect & remove the client interface.
How about rejecting the new STA connection instead of killing existing
connection? In other words, some entity above wpa_supplicant would need
to kill the group first before being able to get the STA connection in
such a case.
> diff --git a/src/drivers/driver.h b/src/drivers/driver.h
> @@ -2483,6 +2483,17 @@ struct wpa_driver_ops {
> + /**
> + * go_switch_channel - Announce channel switch and migrate the GO to a
> + * given frequency.
> + * @priv: Private driver interface data
> + * @freq: frequency in MHz
> + * Returns: 0 on success, -1 on failure
> + *
> + * This function is used to move the GO to the legacy STA channel to avoid
> + * frequency conflict in single channel concurrency.
> + */
> + int (*go_switch_channel)(void *priv, unsigned int freq);
I would assume that this could be made generic to both non-P2P AP and
P2P GO, so the same could be just switch_channels instead of something
P2P specific.
> diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
> @@ -1415,6 +1416,16 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
> + /* If multichannel concurrency is not supported, check for any frequency
> + * conflict and take appropriate action.
> + */
> + if (((freq = wpa_drv_shared_freq(wpa_s)) > 0) && (freq != params.freq) &&
> + !(wpa_s->drv_flags & WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT)) {
I would reorder those conditions to avoid the wpa_drv_shared_freq() call
is multi-channel concurrency is supported.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list