cfg80211: add P2P Notice of Absence attribute
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Thu, 21 Mar 2013 14:47:54 +0000 (15:47 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Mon, 15 Apr 2013 22:03:29 +0000 (00:03 +0200)
Add P2P Notice of Absence attribute structure.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index 5567dc173fde920675aa7ffd86e9702ad0251337..ea446085e17abeb175eaa2479eedd55d885bebb0 100644 (file)
@@ -1004,6 +1004,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
  *