From patchwork Wed Nov 23 09:49:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 127242 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 70DB31007D2 for ; Wed, 23 Nov 2011 20:49:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 915C29C1A0; Wed, 23 Nov 2011 04:49:08 -0500 (EST) 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 cW2-4EkjwR0A; Wed, 23 Nov 2011 04:49:08 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3FB319C196; Wed, 23 Nov 2011 04:49:04 -0500 (EST) 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 454489C196 for ; Wed, 23 Nov 2011 04:49:03 -0500 (EST) 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 Du87QrGs-C1q for ; Wed, 23 Nov 2011 04:48:59 -0500 (EST) Received: from ebb06.tieto.com (ebb06.tieto.com [131.207.168.38]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "ebb06.tieto.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id C82599C190 for ; Wed, 23 Nov 2011 04:48:58 -0500 (EST) X-AuditID: 83cfa826-b7b5bae000001ca6-fa-4eccc1881d4c Received: from FIVLA-EXHUB02.eu.tieto.com ( [131.207.136.42]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 41.59.07334.881CCCE4; Wed, 23 Nov 2011 11:48:56 +0200 (EET) Received: from EXMB01.eu.tieto.com ([131.207.136.90]) by FIVLA-EXHUB02.eu.tieto.com ([131.207.136.42]) with mapi; Wed, 23 Nov 2011 11:48:55 +0200 From: To: Date: Wed, 23 Nov 2011 11:49:03 +0200 Subject: [PATCH proposal] wpa_supplicant: Handle Notice Of Absence attr driver notification Thread-Topic: [PATCH proposal] wpa_supplicant: Handle Notice Of Absence attr driver notification Thread-Index: AcypxSJcXeyOiD67TWGw25I0Usesqw== Message-ID: <3078A9B976EF864C8DDD0C499FFD07911E3B709F99@EXMB01.eu.tieto.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Brightmail-Tracker: AAAAARl2xuw= Cc: j@w1.fi 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 P2P GO basic definition for handling driver (EVENT_DRIVER_NOTIFY_NOA) notification about current Notice Of Absence and Opportunistic Power Save params used by driver after set/change NOA attr params. --- src/drivers/driver.h | 36 +++++++++++++++++++++++++++++++++++- wpa_supplicant/events.c | 8 ++++++++ 2 files changed, 43 insertions(+), 1 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index ce25d03..0374234 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2884,7 +2884,12 @@ enum wpa_event_type { /** * EVENT_EAPOL_TX_STATUS - notify of EAPOL TX status */ - EVENT_EAPOL_TX_STATUS + EVENT_EAPOL_TX_STATUS, + + /** + * EVENT_DRIVER_NOTIFY_NOA - Device/driver did NOA setup/change + */ + EVENT_DRIVER_NOTIFY_NOA }; @@ -3464,6 +3469,35 @@ union wpa_event_data { int data_len; int ack; } eapol_tx_status; + + /** + * struct driver_notify_noa - Data for EVENT_DRIVER_NOTIFY_NOA + * @index: inentifies an instance of NOA timing + * @oppps_ctwindow: opportunistic power save capability + * BIT(7): 1 - enabled, 0 disabled + * BITS(0-6) - Client Traffic Window in TU + * @count_type: indicates the number of absence intervals + * 255 - mean a continous schedule + * 0 - mean NOA disabled + * @duration: duration in units of microseconds that P2P_GO + * can remain absent following the start of NOA + * interval + * @interval: NOA interval in units of microseconds + * @start_time: the start time for the schedule expressed in terms + * of lower 4 bytes of the TSF timer + * + * Contain current params used by driver, Notice Of Absence + * instance and Opportunistic Power Save + * + */ + struct driver_notify_noa { + u8 index; + u8 oppps_ctwindow; + u8 count_type; + u32 duration; + u32 interval; + u32 start_time; + } driver_notify_noa; }; /** diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 7010600..e1673df 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2473,6 +2473,14 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, wpas_wps_start_pbc(wpa_s, NULL, 0); #endif /* CONFIG_WPS */ break; + case EVENT_DRIVER_NOTIFY_NOA: +#ifdef CONFIG_P2P + /* TODO: Update Beacon and probe response here + * p2p_group_notif_noa() + */ + wpa_dbg(wpa_s, MSG_DEBUG, "EVENT_DRIVER_NOTIFY_NOA"); +#endif /* CONFIG_P2P */ + break; default: wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event); break;