From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 5/8] mac802154: change frame_retries behaviour
Date: Mon, 10 Aug 2015 21:15:56 +0200 [thread overview]
Message-ID: <1439234159-11630-6-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1439234159-11630-1-git-send-email-alex.aring@gmail.com>
This patch changes the default minimum value of frame_retries to 0 and
changes the frame_retries default value to 3 which is also 802.15.4
default.
We don't use the frame_retries "-1" value as indicator for no-aret mode
anymore, instead we checking on the ack request bit inside the 802.15.4
frame control field. This allows a acknowledge handling per frame. This
checking is done by transceiver or inside xmit callback of driver layer.
If a transceiver doesn't support ARET handling the transmit
functionality ignores ack frames then, which isn't well but should not
effect anything of current functionality.
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
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 ff99055..ed26952 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -498,8 +498,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 9e55431..e8cab5b 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -111,7 +111,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;
phy->supported.max_csma_backoffs = 5;
phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE;
@@ -177,11 +177,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;
}
if (hw->flags & IEEE802154_HW_PROMISCUOUS)
--
2.5.0
next prev parent reply other threads:[~2015-08-10 17:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 19:15 [PATCH bluetooth-next 0/8] ieee802154: pending patches Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 1/8] 6lowpan: Fix extraction of flow label field Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 2/8] ieee802154: 6lowpan: remove multiple lowpan per wpan support Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 3/8] mac802154: fix wpan mac setting while lowpan is there Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 4/8] mac802154: cfg: remove test and set checks Alexander Aring
2015-08-10 19:15 ` Alexander Aring [this message]
2015-08-10 19:15 ` [PATCH bluetooth-next 6/8] at86rf230: use STATE_TX_ARET mode only Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 7/8] ieee802154: add ack request default handling Alexander Aring
2015-08-10 19:15 ` [PATCH bluetooth-next 8/8] ieee802154: 6lowpan: fix error frag handling Alexander Aring
2015-08-10 19:30 ` [PATCH bluetooth-next 0/8] ieee802154: pending patches Marcel Holtmann
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=1439234159-11630-6-git-send-email-alex.aring@gmail.com \
--to=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.