From: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: javier@cozybit.com, linux-wireless@vger.kernel.org,
Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>,
Mike Krinkin <krinkin.m.u@gmail.com>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [RFC 05/14] mac80211: mesh power mode indication in transmitted frames
Date: Mon, 19 Nov 2012 12:07:19 -0800 [thread overview]
Message-ID: <50AA9177.5030408@etit.tu-chemnitz.de> (raw)
In-Reply-To: <1353143459.9543.19.camel@jlt4.sipsolutions.net>
Hi,
First of all; thanks for all the comments.
On 11/17/2012 01:10 AM, Johannes Berg wrote:
> On Fri, 2012-11-16 at 22:47 -0800, Marco Porsch wrote:
>
>> --- a/net/mac80211/mesh.h
>> +++ b/net/mac80211/mesh.h
>> @@ -30,6 +30,7 @@ enum mesh_config_capab_flags {
>> MESHCONF_CAPAB_ACCEPT_PLINKS = BIT(0),
>> MESHCONF_CAPAB_FORWARDING = BIT(3),
>> MESHCONF_CAPAB_TBTT_ADJUSTING = BIT(5),
>> + MESHCONF_CAPAB_POWER_SAVE_LEVEL = BIT(6),
>
> Please move this entire enum to ieee80211.h first (in a separate patch).
>
> It should also be u16 values and be put into the frame as a u16, since
> the field is a u16 field apparently.
Sorry, I don't get that one. According to IEEE80211-2012 8.4.2.100 Mesh
Configuration element and 8.4.2.100.8 Mesh Capability, the capability
field is just u8.
It is currently written as follows:
mesh.c : mesh_add_meshconf_ie
/* Mesh capability */
*pos = MESHCONF_CAPAB_FORWARDING;
*pos |= ifmsh->accepting_plinks ?
MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00;
*pos++ |= ifmsh->adjusting_tbtt ?
MESHCONF_CAPAB_TBTT_ADJUSTING : 0x00;
Should I change anything? Just move the enum?
>
> (yes, it's a bit harsh to demand this of you, but since we don't have a
> mesh maintainer who's cleaning up that code ...)
>
>> +void ieee80211_set_mesh_ps_flags(struct ieee80211_sub_if_data *sdata,
>> + struct sta_info *sta,
>> + struct ieee80211_hdr *hdr)
>> +{
>> + enum nl80211_mesh_power_mode pm;
>> + __le16 *qc;
>> +
>> + BUG_ON(is_unicast_ether_addr(hdr->addr1) &&
>> + ieee80211_is_data_qos(hdr->frame_control) &&
>> + !sta);
>
> NACK.
>
>> +++ b/net/mac80211/wme.c
>> @@ -184,7 +184,18 @@ void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
>>
>> /* qos header is 2 bytes */
>> *p++ = ack_policy | tid;
>> - *p = ieee80211_vif_is_mesh(&sdata->vif) ?
>> - (IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT >> 8) : 0;
>> +
>> + if (!ieee80211_vif_is_mesh(&sdata->vif)) {
>> + *p = 0;
>> + return;
>
> I'd rather you refactor the function to return early in the case of the
> frame not being a Data QoS frame, and then put the mesh stuff all inside
> the if.
>
> johannes
>
>
next prev parent reply other threads:[~2012-11-19 20:07 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 6:47 [RFC 00/14] mesh powersave - basics Marco Porsch
2012-11-17 6:47 ` [RFC 01/14] {nl,cfg,mac}80211: add beacon interval and DTIM period to mesh config Marco Porsch
2012-11-17 8:54 ` Johannes Berg
2012-11-17 6:47 ` [RFC 02/14] {cfg,nl}80211: mesh power mode config parameters Marco Porsch
2012-11-17 8:57 ` Johannes Berg
2012-11-17 6:47 ` [RFC 03/14] {cfg,nl}80211: set and get default mesh power mode Marco Porsch
2012-11-17 8:59 ` Johannes Berg
2012-11-17 23:38 ` Thomas Pedersen
2012-11-17 6:47 ` [RFC 04/14] mac80211: local link-specific mesh power mode logic Marco Porsch
2012-11-17 9:05 ` Johannes Berg
2012-11-17 6:47 ` [RFC 05/14] mac80211: mesh power mode indication in transmitted frames Marco Porsch
2012-11-17 9:10 ` Johannes Berg
2012-11-19 20:07 ` Marco Porsch [this message]
2012-11-19 20:32 ` Johannes Berg
2012-11-17 6:47 ` [RFC 06/14] mac80211: track neighbor STA power modes Marco Porsch
2012-11-17 9:14 ` Johannes Berg
2012-11-17 6:47 ` [RFC 07/14] {cfg,nl}80211: set local link-specific power mode Marco Porsch
2012-11-17 9:16 ` Johannes Berg
2012-11-17 6:48 ` [RFC 08/14] {cfg,nl}80211: get local and peer mesh power modes Marco Porsch
2012-11-17 6:48 ` [RFC 09/14] mac80211: add power save support structure to mesh interface Marco Porsch
2012-11-17 9:26 ` Johannes Berg
2012-11-20 23:53 ` Marco Porsch
2012-11-26 10:39 ` Johannes Berg
2012-11-17 6:48 ` [RFC 10/14] mac80211: enable frame buffering for PS STA Marco Porsch
2012-11-17 9:28 ` Johannes Berg
2012-11-17 6:48 ` [RFC 11/14] {cfg,nl}80211: add awake window to mesh config Marco Porsch
2012-11-17 9:29 ` Johannes Berg
2012-11-17 6:48 ` [RFC 12/14] mac80211: add awake window IE to mesh beacons Marco Porsch
2012-11-17 9:30 ` Johannes Berg
2012-11-17 6:48 ` [RFC 13/14] mac80211: add TIM " Marco Porsch
2012-11-17 9:33 ` Johannes Berg
2012-11-17 6:48 ` [RFC 14/14] mac80211: mesh PS individually-addressed frame release Marco Porsch
2012-11-17 9:40 ` Johannes Berg
2012-11-20 18:11 ` Marco Porsch
2012-11-26 10:45 ` Johannes Berg
2012-11-26 18:27 ` Marco Porsch
2012-11-28 13:07 ` Johannes Berg
2012-11-17 9:41 ` [RFC 00/14] mesh powersave - basics Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AA9177.5030408@etit.tu-chemnitz.de \
--to=marco.porsch@etit.tu-chemnitz.de \
--cc=ivan.bezyazychnyy@gmail.com \
--cc=javier@cozybit.com \
--cc=jcmvbkbc@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=krinkin.m.u@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.