In general, your commit messages should have a title of the form "do X"[1] rather than "doing X".
[1] http://www.englishpage.com/verbpage/simplepresent.html On Fri, Oct 19, 2012 at 5:59 PM, <[email protected]> wrote: > From: Marco Porsch <[email protected]> > > The local link-specific power mode defines the mesh power mode in which > the local STA operates towards the peer STA of the corresponding mesh > peering. > This commit adds the possibility of setting the local link-specific > power mode. > > Signed-off-by: Marco Porsch <[email protected]> > Signed-off-by: Ivan Bezyazychnyy <[email protected]> > Signed-off-by: Mike Krinkin <[email protected]> > --- > include/linux/nl80211.h | 4 ++++ > include/net/cfg80211.h | 2 ++ > net/mac80211/cfg.c | 4 ++++ > net/wireless/nl80211.c | 8 ++++++++ > 4 files changed, 18 insertions(+) > > diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h > index 5497eb4..12891c2 100644 > --- a/include/linux/nl80211.h > +++ b/include/linux/nl80211.h > @@ -1273,6 +1273,8 @@ enum nl80211_commands { > * the connection request from a station. nl80211_connect_failed_reason > * enum has different reasons of connection failure. > * > + * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power > mode > + * Please also mention which enum these can be found in. > * @NL80211_ATTR_MAX: highest attribute number currently defined > * @__NL80211_ATTR_AFTER_LAST: internal use > */ > @@ -1530,6 +1532,8 @@ enum nl80211_attrs { > > NL80211_ATTR_CONN_FAILED_REASON, > > + NL80211_ATTR_LOCAL_MESH_POWER_MODE, > + > /* add attributes here, update the policy in nl80211.c */ > > __NL80211_ATTR_AFTER_LAST, > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index dbbc8d8..eb461f7 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -505,6 +505,7 @@ enum station_parameters_apply_mask { > * @sta_modify_mask: bitmap indicating which parameters changed > * (for those that don't have a natural "no change" value), > * see &enum station_parameters_apply_mask > + * @local_ps_mode: local link-specific mesh power save mode > */ > struct station_parameters { > u8 *supported_rates; > @@ -519,6 +520,7 @@ struct station_parameters { > struct ieee80211_ht_cap *ht_capa; > u8 uapsd_queues; > u8 max_sp; > + enum nl80211_mesh_power_mode local_ps_mode; > }; > > /** > diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c > index adf544a..8c008aa 100644 > --- a/net/mac80211/cfg.c > +++ b/net/mac80211/cfg.c > @@ -1166,6 +1166,10 @@ static int sta_apply_parameters(struct ieee80211_local > *local, > mesh_plink_block(sta); > break; > } > + > + if (params->local_ps_mode) > + ieee80211_set_local_ps_mode(sta, > + params->local_ps_mode, 0); > #endif > } > > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c > index a57e383..ca98b79 100644 > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -3069,6 +3069,10 @@ static int nl80211_set_station(struct sk_buff *skb, > struct genl_info *info) > params.plink_state = > nla_get_u8(info->attrs[NL80211_ATTR_STA_PLINK_STATE]); > > + if (info->attrs[NL80211_ATTR_LOCAL_MESH_POWER_MODE]) > + params.local_ps_mode = > + > nla_get_u8(info->attrs[NL80211_ATTR_LOCAL_MESH_POWER_MODE]); > + > switch (dev->ieee80211_ptr->iftype) { > case NL80211_IFTYPE_AP: > case NL80211_IFTYPE_AP_VLAN: > @@ -3076,6 +3080,8 @@ static int nl80211_set_station(struct sk_buff *skb, > struct genl_info *info) > /* disallow mesh-specific things */ > if (params.plink_action) > return -EINVAL; > + if (params.local_ps_mode) > + err = -EINVAL; > > /* TDLS can't be set, ... */ > if (params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) > @@ -3118,6 +3124,8 @@ static int nl80211_set_station(struct sk_buff *skb, > struct genl_info *info) > return -EINVAL; > if (params.listen_interval >= 0) > return -EINVAL; > + if (params.local_ps_mode) > + err = -EINVAL; > /* reject any changes other than AUTHORIZED */ > if (params.sta_flags_mask & ~BIT(NL80211_STA_FLAG_AUTHORIZED)) > return -EINVAL; > -- > 1.7.9.5 > _______________________________________________ Devel mailing list [email protected] http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
