All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: Alexander Aring <alex.aring@gmail.com>, linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de
Subject: Re: [RFCv3 bluetooth-next 4/6] mac802154: change max_frame_retries behaviour
Date: Tue, 4 Aug 2015 18:40:46 +0200	[thread overview]
Message-ID: <55C0EB0E.2010005@osg.samsung.com> (raw)
In-Reply-To: <1438246542-17633-5-git-send-email-alex.aring@gmail.com>

Hello.

On 30/07/15 10:55, Alexander Aring wrote:
> This patch changes the default min value of max_frame_retries to 0 and
> changes the max_frame_retries default value to 3 which is also 802.15.4
> default.
You mean min_frame_retries to 0 here?


> We don't use max_frame_retries "-1" as indicator for no-aret mode
> anymore, instead we checking on the ack request bit inside the 802.15.4
> frame control field.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
>   net/mac802154/iface.c | 3 +--
>   net/mac802154/main.c  | 9 +++------
>   2 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
> index 416de90..8837c5a 100644
> --- a/net/mac802154/iface.c
> +++ b/net/mac802154/iface.c
> @@ -483,8 +483,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
>   	wpan_dev->min_be = 3;
>   	wpan_dev->max_be = 5;
>   	wpan_dev->csma_retries = 4;
> -	/* for compatibility, actual default is 3 */
> -	wpan_dev->frame_retries = -1;
> +	wpan_dev->frame_retries = 3;
>   
>   	wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST);
>   	wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST);
> diff --git a/net/mac802154/main.c b/net/mac802154/main.c
> index 91f1208..6e1764b 100644
> --- a/net/mac802154/main.c
> +++ b/net/mac802154/main.c
> @@ -109,7 +109,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
>   	phy->supported.max_minbe = 8;
>   	phy->supported.min_maxbe = 3;
>   	phy->supported.max_maxbe = 8;
> -	phy->supported.min_frame_retries = -1;
> +	phy->supported.min_frame_retries = 0;
>   	phy->supported.max_frame_retries = 7;

Maybe also set it to 3 here if we want to have this as default and 
letting it to userspace to set it to another value if needed?

>   	phy->supported.max_csma_backoffs = 5;
>   	phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE;
> @@ -175,11 +175,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
>   	}
>   
>   	if (!(hw->flags & IEEE802154_HW_FRAME_RETRIES)) {
> -		/* TODO should be 3, but our default value is -1 which means
> -		 * no ARET handling.
> -		 */
> -		local->phy->supported.min_frame_retries = -1;
> -		local->phy->supported.max_frame_retries = -1;
> +		local->phy->supported.min_frame_retries = 3;
> +		local->phy->supported.max_frame_retries = 3;

This confuses me. During alloc_hw we set min to 0 which makes sense for 
me but afterwards we set both, min and max, to 3? Should it not only be 
max to three here? Am I missing something?

regards
Stefan Schmidt

  reply	other threads:[~2015-08-04 16:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  8:55 [RFCv3 bluetooth-next 0/6] ieee802154: aret handling changes Alexander Aring
2015-07-30  8:55 ` [RFCv3 bluetooth-next 1/6] mac802154: cfg: remove test and set checks Alexander Aring
2015-08-04 16:29   ` Stefan Schmidt
2015-07-30  8:55 ` [RFCv3 bluetooth-next 2/6] ieee802154: add helpers for frame control checks Alexander Aring
2015-08-04 16:29   ` Stefan Schmidt
2015-08-04 17:44     ` Alexander Aring
2015-08-04 18:35       ` Stefan Schmidt
2015-08-04 18:47         ` Alexander Aring
2015-08-05  8:47           ` Stefan Schmidt
2015-07-30  8:55 ` [RFCv3 bluetooth-next 3/6] at86rf230: use aret mode if ackreq is set while xmit Alexander Aring
2015-08-04 16:35   ` Stefan Schmidt
2015-07-30  8:55 ` [RFCv3 bluetooth-next 4/6] mac802154: change max_frame_retries behaviour Alexander Aring
2015-08-04 16:40   ` Stefan Schmidt [this message]
2015-08-04 18:00     ` Alexander Aring
2015-08-04 18:09       ` Alexander Aring
2015-08-05  8:46       ` Stefan Schmidt
2015-08-05  9:14         ` Alexander Aring
2015-07-30  8:55 ` [RFCv3 bluetooth-next 5/6] at86rf230: remove max_frame_retries -1 check Alexander Aring
2015-08-04 16:42   ` Stefan Schmidt
2015-07-30  8:55 ` [RFCv3 bluetooth-next 6/6] ieee802154: add ack request default handling Alexander Aring
2015-08-04 16:51   ` Stefan Schmidt
2015-08-04 16:28 ` [RFCv3 bluetooth-next 0/6] ieee802154: aret handling changes Stefan Schmidt
2015-08-04 18:42   ` Alexander Aring
2015-08-05  8:54     ` Stefan Schmidt

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=55C0EB0E.2010005@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alex.aring@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@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.