2013-03-20 19:13:26

by Janusz Dziedzic

[permalink] [raw]
Subject: [PATCH 1/4] cfg80211: add P2P Notice of Absence attribute

Add P2P Notice of Absence attribute structure.

Signed-off-by: Janusz Dziedzic <[email protected]>
---
include/linux/ieee80211.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 4cf0c9e..9dc9e1c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1027,6 +1027,26 @@ enum ieee80211_p2p_attr_id {
IEEE80211_P2P_ATTR_MAX
};

+/* Notice of Absence attribute - described in P2P spec 4.1.14 */
+/* Typical max value used here */
+#define IEEE80211_P2P_NOA_DESC_MAX 4
+
+struct ieee80211_p2p_noa_desc {
+ u8 count;
+ __le32 duration;
+ __le32 interval;
+ __le32 start_time;
+} __packed;
+
+struct ieee80211_p2p_noa_attr {
+ u8 index;
+ u8 oppps_ctwindow;
+ struct ieee80211_p2p_noa_desc desc[IEEE80211_P2P_NOA_DESC_MAX];
+} __packed;
+
+#define IEEE80211_P2P_OPPPS_ENABLE_BIT BIT(7)
+#define IEEE80211_P2P_OPPPS_CTWINDOW_MASK 0x7F
+
/**
* struct ieee80211_bar - HT Block Ack Request
*
--
1.7.9.5


2013-03-20 21:01:35

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/4] cfg80211: add P2P Notice of Absence attribute

Since you're going to have to resend anyway ...

> +/* Notice of Absence attribute - described in P2P spec 4.1.14 */
> +/* Typical max value used here */
> +#define IEEE80211_P2P_NOA_DESC_MAX 4
> +
> +struct ieee80211_p2p_noa_desc {
> + u8 count;
> + __le32 duration;
> + __le32 interval;
> + __le32 start_time;
> +} __packed;
> +
> +struct ieee80211_p2p_noa_attr {
> + u8 index;
> + u8 oppps_ctwindow;
> + struct ieee80211_p2p_noa_desc desc[IEEE80211_P2P_NOA_DESC_MAX];

I think you should just have a single space, even if that doesn't line
up any more then.

johannes