[PATCH proposal] wpa_supplicant: Handle Notice Of Absence attr driver notification

Janusz.Dziedzic at tieto.com Janusz.Dziedzic
Wed Nov 23 01:49:03 PST 2011



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;
-- 
1.7.0.4



More information about the Hostap mailing list