From patchwork Sun Apr 8 18:36:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 151369 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id AF943B7025 for ; Mon, 9 Apr 2012 04:36:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 181999D282; Sun, 8 Apr 2012 14:36:57 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8IInzvi05lva; Sun, 8 Apr 2012 14:36:56 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id E93289D283; Sun, 8 Apr 2012 14:36:52 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id F0A7F9D283 for ; Sun, 8 Apr 2012 14:36:51 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iGrvAeZTQgFO for ; Sun, 8 Apr 2012 14:36:48 -0400 (EDT) Received: from jmaline2.user.openhosting.com (kvm.w1.fi [128.177.28.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 6A1219D282 for ; Sun, 8 Apr 2012 14:36:48 -0400 (EDT) Received: from jm (a91-155-81-182.elisa-laajakaista.fi [91.155.81.182]) (authenticated bits=0) by jmaline2.user.openhosting.com (8.13.8/8.13.8) with ESMTP id q38ITKB5009412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 8 Apr 2012 14:29:22 -0400 Received: by jm (sSMTP sendmail emulation); Sun, 08 Apr 2012 21:36:46 +0300 Date: Sun, 8 Apr 2012 21:36:46 +0300 From: Jouni Malinen To: hostap@lists.shmoo.com Subject: Re: [RFC 3/4] P2P: Handling single channel concurrency Message-ID: <20120408183646.GC12438@w1.fi> Mail-Followup-To: hostap@lists.shmoo.com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com On Tue, Mar 06, 2012 at 10:34:12AM +0530, Jithu Jance wrote: > Single channel concurrency patch [3/4] > > Hooks for implementing GO/AP channel switch. To be expanded later. Cleaned up version below. Though, I would like to see an example implementation for this in driver_nl80211.c, i.e., we need to get this functionality reviewed on the linux-wireless mailing list and included in the upstream kernel. [PATCH 2/3] P2P: Add driver op for requesting GO/AP channel switch Signed-hostap: Jithu Jance --- src/drivers/driver.h | 12 ++++++++++++ wpa_supplicant/driver_i.h | 8 ++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 329f89a..7ff1b3d 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2535,6 +2535,18 @@ struct wpa_driver_ops { * conditions. */ int (*radio_disable)(void *priv, int disabled); + + /** + * switch_channel - Announce channel switch and migrate the GO to the + * 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 (*switch_channel)(void *priv, unsigned int freq); }; diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index e1e921d..2ab455b 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -672,4 +672,12 @@ static inline int wpa_drv_radio_disable(struct wpa_supplicant *wpa_s, return wpa_s->driver->radio_disable(wpa_s->drv_priv, disabled); } +static inline int wpa_drv_switch_channel(struct wpa_supplicant *wpa_s, + unsigned int freq) +{ + if (!wpa_s->driver->switch_channel) + return -1; + return wpa_s->driver->switch_channel(wpa_s->drv_priv, freq); +} + #endif /* DRIVER_I_H */