summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-08-10 19:15:58 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2015-08-10 18:43:06 (GMT)
commitc91208d819c814e7f418c7a083059cf533ad0396 (patch)
treea74fb8a149dcdbecfd7ebcb7feefaeaa5d6764ce /include/net
parentfc0719e6a144402197a2147117f10b66ee623fbb (diff)
downloadlinux-c91208d819c814e7f418c7a083059cf533ad0396.tar.xz
ieee802154: add ack request default handling
This patch introduce a new mib entry which isn't part of 802.15.4 but useful as default behaviour to set the ack request bit or not if we don't know if the ack request bit should set. This is currently used for stacks like IEEE 802.15.4 6LoWPAN. Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg802154.h5
-rw-r--r--include/net/nl802154.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index e53b6bf..76b1ffa 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -63,6 +63,8 @@ struct cfg802154_ops {
s8 max_frame_retries);
int (*set_lbt_mode)(struct wpan_phy *wpan_phy,
struct wpan_dev *wpan_dev, bool mode);
+ int (*set_ackreq_default)(struct wpan_phy *wpan_phy,
+ struct wpan_dev *wpan_dev, bool ackreq);
};
static inline bool
@@ -196,6 +198,9 @@ struct wpan_dev {
bool lbt;
bool promiscuous_mode;
+
+ /* fallback for acknowledgment bit setting */
+ bool ackreq;
};
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
diff --git a/include/net/nl802154.h b/include/net/nl802154.h
index b0ab530..cf2713d 100644
--- a/include/net/nl802154.h
+++ b/include/net/nl802154.h
@@ -52,6 +52,8 @@ enum nl802154_commands {
NL802154_CMD_SET_LBT_MODE,
+ NL802154_CMD_SET_ACKREQ_DEFAULT,
+
/* add new commands above here */
/* used to define NL802154_CMD_MAX below */
@@ -104,6 +106,8 @@ enum nl802154_attrs {
NL802154_ATTR_SUPPORTED_COMMANDS,
+ NL802154_ATTR_ACKREQ_DEFAULT,
+
/* add attributes here, update the policy in nl802154.c */
__NL802154_ATTR_AFTER_LAST,