linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/8] mesh power saving implementation: indication
@ 2011-11-21 14:40 Ivan Bezyazychnyy
  2011-11-21 14:40 ` [RFC v2 1/8] cfg80211 and nl80211: mesh power mode config parameter Ivan Bezyazychnyy
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Ivan Bezyazychnyy @ 2011-11-21 14:40 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ivan Bezyazychnyy

Hi!

We have updated our patches and also we would like to add some words
what our work is about.

Based on the latest IEEE 802.11s standard the power saving mechanism
can be divided into the following implementation phases:
* indication of mesh STAs' power modes in frames;
* a buffering and identification sending frames in mesh STA;
* Mesh Awake Window implementation;
* Peer service periods.

This patchset implements the phase of indication of mesh STAs'
power modes in frames. There are two types of mesh power modes:
* peer power mode: a mesh STA indicates its mesh power mode for each
mesh peering and obtains the mesh power modes of its peer mesh STAs;
* non-peer power mode: mesh station also indicates mesh power mode for
non-peer mesh stations. It determines when non-peer mesh STAs may send
Probe Request and Mesh Peering Open Request frames to the mesh STA.

Peer power mode should be indicated with Power Management field in the Frame
Control field and the Mesh Power Save Level field in all transmitted
individually addressed Mesh Data or QoS Null frames on this link.

Non-peer power mode should be indicated with the Power Management
field in the Frame Control field and the Mesh Power Save Level field
in the Mesh Capability field in Beacon and Probe Response frames. A
mesh STA shall also indicate its non-peer mesh power mode with the
Power Management field in the Frame Control field and the Mesh Power
Save Level field in the QoS Control field in group addressed Mesh Data
frames.

We would appreciate comments and advice.

Thanks,
Ivan

Ivan Bezyazychnyy (8):
  cfg80211 and nl80211: mesh power mode config parameter
  mac80211: mesh power mode indication in QoS frames
  mac80211: tracking mesh peer link-specific power mode
  mac80211: mesh non-peer power mode indication in beacons
  mac80211: setting link-specific mesh power modes when plink opens
  cfg80211 and nl80211: Setting local link-specific power mode
  cfg80211 and nl80211: getting local and peer mesh power modes
  cfg80211 and nl80211: setting and getting mesh non-peer power mode

 include/linux/ieee80211.h |   14 ++++++++++
 include/linux/nl80211.h   |   41 ++++++++++++++++++++++++++++++
 include/net/cfg80211.h    |   14 +++++++++-
 net/mac80211/cfg.c        |   16 +++++++++++-
 net/mac80211/mesh.c       |   35 +++++++++++++++++++++++++
 net/mac80211/mesh.h       |   11 ++++++++
 net/mac80211/mesh_plink.c |   22 +++++++++++++++-
 net/mac80211/rx.c         |   61 +++++++++++++++++++++++++++++++++++++++++++++
 net/mac80211/sta_info.h   |    4 +++
 net/mac80211/tx.c         |   46 ++++++++++++++++++++++++++++++++++
 net/wireless/mesh.c       |    1 +
 net/wireless/nl80211.c    |   22 ++++++++++++++++
 12 files changed, 284 insertions(+), 3 deletions(-)

-- 
1.7.3.4


^ permalink raw reply	[flat|nested] 19+ messages in thread
* [RFC v2 3/8] mac80211: tracking mesh peer link-specific power mode
@ 2011-11-21 13:16 Ivan Bezyazychnyy
  0 siblings, 0 replies; 19+ messages in thread
From: Ivan Bezyazychnyy @ 2011-11-21 13:16 UTC (permalink / raw)
  To: linux-wireless

peer_ps_mode field has been added to sta_info structure to
representpeer's link-specific power mode for our station.
Peer's link-specific power mode is tracked from the Power
Managementfield in the Frame Control field and the Mesh Power Save
Level fieldin the QoS Control field at the end of a frame exchange
sequence.
Signed-off-by: Ivan Bezyazychnyy
<ivan.bezyazychnyy@gmail.com>Signed-off-by: Mike Krinkin
<krinkin.m.u@gmail.com>Signed-off-by: Max Filippov
<jcmvbkbc@gmail.com>--- include/linux/ieee80211.h |   11 ++++++++
net/mac80211/mesh.h       |    2 + net/mac80211/rx.c         |   61
+++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/sta_info.h
 |    2 + 4 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/include/linux/ieee80211.h
b/include/linux/ieee80211.hindex 483fa46..44e9c0d 100644---
a/include/linux/ieee80211.h+++ b/include/linux/ieee80211.h@@ -546,6
+546,17 @@ static inline int ieee80211_is_qos_nullfunc(__le16 fc) 	
   cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); }
+/**+ * ieee80211s_has_qos_pm - check Power Save Level in QoS control+
* @qc - QoS control bytes in little-endian byteorder+ */++static
inline int ieee80211s_has_qos_pm(__le16 qc)+{+	return (qc &
cpu_to_le16(+			IEEE80211_QOS_CTL_MESH_PS_LEVEL)) != 0;+}+ struct
ieee80211s_hdr { 	u8 flags; 	u8 ttl;diff --git a/net/mac80211/mesh.h
b/net/mac80211/mesh.hindex 8c00e2d..6842453 100644---
a/net/mac80211/mesh.h+++ b/net/mac80211/mesh.h@@ -222,6 +222,8 @@ void
ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata); void
ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); void
ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata); void
ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);+void
ieee80211s_set_sta_ps_mode(struct sta_info *sta,+				enum
nl80211_mesh_power_mode mode);  /* Mesh paths */ int
mesh_nexthop_lookup(struct sk_buff *skb,diff --git a/net/mac80211/rx.c
b/net/mac80211/rx.cindex b867bd5..40ad4ed 100644---
a/net/mac80211/rx.c+++ b/net/mac80211/rx.c@@ -1162,6 +1162,34 @@ int
ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start) }
EXPORT_SYMBOL(ieee80211_sta_ps_transition); +void
ieee80211s_set_sta_ps_mode(struct sta_info *sta,+				enum
nl80211_mesh_power_mode mode)+{+	if (sta->peer_ps_mode != mode)
{+		sta->peer_ps_mode = mode;+#ifdef
CONFIG_MAC80211_VERBOSE_PS_DEBUG+		switch (mode) {+		case
NL80211_MESH_POWER_ACTIVE:+			printk(KERN_DEBUG "%s: STA %pM enters
active mode\n",+				sta->sdata->name, sta->sta.addr);+			break;+		case
NL80211_MESH_POWER_LIGHT_SLEEP:+			printk(KERN_DEBUG "%s: STA %pM
enters light sleep mode\n",+				sta->sdata->name,
sta->sta.addr);+			break;+		case
NL80211_MESH_POWER_DEEP_SLEEP:+			printk(KERN_DEBUG "%s: STA %pM
enters deep sleep mode\n",+				sta->sdata->name,
sta->sta.addr);+			break;+		default:+			printk(KERN_DEBUG "%s: STA %pM
used invalid power save mode\n",+				sta->sdata->name,
sta->sta.addr);+			break;+		}+#endif /*
CONFIG_MAC80211_VERBOSE_PS_DEBUG */+	}+}+ static ieee80211_rx_result
debug_noinline ieee80211_rx_h_uapsd_and_pspoll(struct
ieee80211_rx_data *rx) {@@ -1314,6 +1342,39 @@
ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) 	}  	/*+	 *
Test mesh power save level subfield of QoS control field (PSL)+	 * and
Power Managment field of frame control (PW)+	 *
+----+----+-----------------++	 * | PM | PSL| Mesh Power Mode |+	 *
+----+----+-----------------++	 * | 0  |Rsrv|    Active       |+	 *
+----+----+-----------------++	 * | 1  | 0  |    Light        |+	 *
+----+----+-----------------++	 * | 1  | 1  |    Deep         |+	 *
+----+----+-----------------++	 */+	if
(!ieee80211_has_morefrags(hdr->frame_control) &&+	
!(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) &&+	
ieee80211_vif_is_mesh(&rx->sdata->vif) &&+	
(ieee80211_is_data(hdr->frame_control) ||+	
ieee80211_is_nullfunc(hdr->frame_control))) {+		if
(ieee80211_has_pm(hdr->frame_control)) {+			__le16 *qc = (__le16 *)
ieee80211_get_qos_ctl(hdr);+			if (ieee80211s_has_qos_pm(*qc))
{+				ieee80211s_set_sta_ps_mode(sta,+					NL80211_MESH_POWER_DEEP_SLEEP);+			}
else {+				ieee80211s_set_sta_ps_mode(sta,+					NL80211_MESH_POWER_LIGHT_SLEEP);+			}+		}
else {+			ieee80211s_set_sta_ps_mode(sta,+				NL80211_MESH_POWER_ACTIVE);+		}+	}++	/*
	 * Drop (qos-)data::nullfunc frames silently, since they 	 * are used
only to control station power saving mode. 	 */diff --git
a/net/mac80211/sta_info.h b/net/mac80211/sta_info.hindex
8742668..86fe10a 100644--- a/net/mac80211/sta_info.h+++
b/net/mac80211/sta_info.h@@ -251,6 +251,7 @@ struct sta_ampdu_mlme {
* @ignore_plink_timer: ignore the peer-link timer (used internally)  *
@plink_state: peer link state  * @local_ps_mode: local link-specific
power save mode+ * @peer_ps_mode: peer link-specific power save mode
* @plink_timeout: timeout of peer link  * @plink_timer: peer link
watch timer  * @plink_timer_was_running: used by suspend/resume to
restore timers@@ -340,6 +341,7 @@ struct sta_info { 	bool
plink_timer_was_running; 	enum nl80211_plink_state plink_state; 	enum
nl80211_mesh_power_mode local_ps_mode;+	enum nl80211_mesh_power_mode
peer_ps_mode; 	u32 plink_timeout; 	struct timer_list plink_timer;
#endif-- 1.7.3.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-11-25 18:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 14:40 [RFC v2 0/8] mesh power saving implementation: indication Ivan Bezyazychnyy
2011-11-21 14:40 ` [RFC v2 1/8] cfg80211 and nl80211: mesh power mode config parameter Ivan Bezyazychnyy
2011-11-24 18:21   ` Johannes Berg
2011-11-21 14:40 ` [RFC v2 2/8] mac80211: mesh power mode indication in QoS frames Ivan Bezyazychnyy
2011-11-24 18:23   ` Johannes Berg
2011-11-21 14:40 ` [RFC v2 3/8] mac80211: tracking mesh peer link-specific power mode Ivan Bezyazychnyy
2011-11-24 18:26   ` Johannes Berg
2011-11-21 14:40 ` [RFC v2 4/8] mac80211: mesh non-peer power mode indication in beacons Ivan Bezyazychnyy
2011-11-21 14:40 ` [RFC v2 5/8] mac80211: setting link-specific mesh power modes when plink opens Ivan Bezyazychnyy
2011-11-24 18:29   ` Johannes Berg
2011-11-21 14:40 ` [RFC v2 6/8] cfg80211 and nl80211: Setting local link-specific power mode Ivan Bezyazychnyy
2011-11-21 14:40 ` [RFC v2 7/8] cfg80211 and nl80211: getting local and peer mesh power modes Ivan Bezyazychnyy
2011-11-24 18:31   ` Johannes Berg
2011-11-21 14:40 ` [RFC v2 8/8] cfg80211 and nl80211: setting and getting mesh non-peer power mode Ivan Bezyazychnyy
2011-11-24 18:33 ` [RFC v2 0/8] mesh power saving implementation: indication Johannes Berg
2011-11-25 18:35   ` Ivan Bezyazychnyy
2011-11-25  1:40 ` Javier Cardona
2011-11-25 18:40   ` Ivan Bezyazychnyy
  -- strict thread matches above, loose matches on Subject: below --
2011-11-21 13:16 [RFC v2 3/8] mac80211: tracking mesh peer link-specific power mode Ivan Bezyazychnyy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).