Commit 89c7d788 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

mac802154: change frame_retries behaviour

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: default avatarStefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 91f02b3d
...@@ -498,8 +498,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata, ...@@ -498,8 +498,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
wpan_dev->min_be = 3; wpan_dev->min_be = 3;
wpan_dev->max_be = 5; wpan_dev->max_be = 5;
wpan_dev->csma_retries = 4; wpan_dev->csma_retries = 4;
/* for compatibility, actual default is 3 */ wpan_dev->frame_retries = 3;
wpan_dev->frame_retries = -1;
wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST); wpan_dev->pan_id = cpu_to_le16(IEEE802154_PANID_BROADCAST);
wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST); wpan_dev->short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST);
......
...@@ -111,7 +111,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops) ...@@ -111,7 +111,7 @@ ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
phy->supported.max_minbe = 8; phy->supported.max_minbe = 8;
phy->supported.min_maxbe = 3; phy->supported.min_maxbe = 3;
phy->supported.max_maxbe = 8; 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_frame_retries = 7;
phy->supported.max_csma_backoffs = 5; phy->supported.max_csma_backoffs = 5;
phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE; phy->supported.lbt = NL802154_SUPPORTED_BOOL_FALSE;
...@@ -177,11 +177,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw) ...@@ -177,11 +177,8 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
} }
if (!(hw->flags & IEEE802154_HW_FRAME_RETRIES)) { if (!(hw->flags & IEEE802154_HW_FRAME_RETRIES)) {
/* TODO should be 3, but our default value is -1 which means local->phy->supported.min_frame_retries = 3;
* no ARET handling. local->phy->supported.max_frame_retries = 3;
*/
local->phy->supported.min_frame_retries = -1;
local->phy->supported.max_frame_retries = -1;
} }
if (hw->flags & IEEE802154_HW_PROMISCUOUS) if (hw->flags & IEEE802154_HW_PROMISCUOUS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment