[PATCH 1/4] wpa_supplicant: Handle Notice Of Absence driver notification
Janusz.Dziedzic at tieto.com
Janusz.Dziedzic
Mon Nov 28 04:11:27 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.
---
src/drivers/driver.h | 36 +++++++++++++++++++++++++++++++++++-
src/drivers/driver_common.c | 1 +
wpa_supplicant/events.c | 8 ++++++++
3 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index ce25d03..44127f4 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: 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: 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/src/drivers/driver_common.c b/src/drivers/driver_common.c
index 26ca8d6..8580bd3 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -83,6 +83,7 @@ const char * event_to_string(enum wpa_event_type event)
E2S(SCHED_SCAN_STOPPED);
E2S(DRIVER_CLIENT_POLL_OK);
E2S(EAPOL_TX_STATUS);
+ E2S(DRIVER_NOTIFY_NOA);
}
return "UNKNOWN";
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index c9e53ca..509b05e 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2469,6 +2469,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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wpa_supplicant-Handle-Notice-Of-Absence-driver-notif.patch
Type: application/octet-stream
Size: 3128 bytes
Desc: 0001-wpa_supplicant-Handle-Notice-Of-Absence-driver-notif.patch
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20111128/7a8e80ea/attachment.obj
More information about the Hostap
mailing list