* [PATCH wpan-tools 0/2] mac: phy: change to new nl802154 cmds
@ 2015-03-18 13:27 Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 1/2] phy: use NL802154_CMD_SET_WPAN_PHY Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 2/2] mac: use NL802154_CMD_SET_INTERFACE Alexander Aring
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Aring @ 2015-03-18 13:27 UTC (permalink / raw)
To: linux-wpan; +Cc: Alexander Aring
Hi,
this patch series contains patches to change all netlink phy and mac settings
into one phy/interface command. I will applu this series mainline to wpan-tools
and make a new release when the corresponding kernel nl802154 are mainline.
There is one maybe _some_ cleaner solution to make something like:
#include <linux/version.h>
#if LINUX_VERSION_CODE <= KERNEL_VERSION(foo)
...
#else
...
#endif
this would rescue newer wpan-tools with older kernels. But requires the right
kernel-headers while cross-compiling and such things. I don't think that this
is really necessary here now. We make a simple cut now.
- Alex
Alexander Aring (2):
phy: use NL802154_CMD_SET_WPAN_PHY
mac: use NL802154_CMD_SET_INTERFACE
src/mac.c | 12 ++++++------
src/phy.c | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
--
2.3.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH wpan-tools 1/2] phy: use NL802154_CMD_SET_WPAN_PHY
2015-03-18 13:27 [PATCH wpan-tools 0/2] mac: phy: change to new nl802154 cmds Alexander Aring
@ 2015-03-18 13:27 ` Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 2/2] mac: use NL802154_CMD_SET_INTERFACE Alexander Aring
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Aring @ 2015-03-18 13:27 UTC (permalink / raw)
To: linux-wpan; +Cc: Alexander Aring
This patch change all set commands for phy settings to
NL802154_CMD_SET_WPAN_PHY which is the new command. The decision which
setting should be set is now determined which attribute is set.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/phy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/phy.c b/src/phy.c
index 2e25013..ff38a42 100644
--- a/src/phy.c
+++ b/src/phy.c
@@ -45,7 +45,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, channel, "<page> <channel>",
- NL802154_CMD_SET_CHANNEL, 0, CIB_PHY, handle_channel_set, NULL);
+ NL802154_CMD_SET_WPAN_PHY, 0, CIB_PHY, handle_channel_set, NULL);
static int handle_tx_power_set(struct nl802154_state *state,
struct nl_cb *cb,
@@ -72,7 +72,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, tx_power, "<dBm>",
- NL802154_CMD_SET_TX_POWER, 0, CIB_PHY, handle_tx_power_set, NULL);
+ NL802154_CMD_SET_WPAN_PHY, 0, CIB_PHY, handle_tx_power_set, NULL);
static int handle_cca_mode_set(struct nl802154_state *state,
struct nl_cb *cb,
@@ -113,7 +113,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, cca_mode, "<mode|3 <1|0>>",
- NL802154_CMD_SET_CCA_MODE, 0, CIB_PHY, handle_cca_mode_set, NULL);
+ NL802154_CMD_SET_WPAN_PHY, 0, CIB_PHY, handle_cca_mode_set, NULL);
static int handle_cca_ed_level(struct nl802154_state *state,
struct nl_cb *cb,
@@ -140,4 +140,4 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, cca_ed_level, "<level>",
- NL802154_CMD_SET_CCA_ED_LEVEL, 0, CIB_PHY, handle_cca_ed_level, NULL);
+ NL802154_CMD_SET_WPAN_PHY, 0, CIB_PHY, handle_cca_ed_level, NULL);
--
2.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH wpan-tools 2/2] mac: use NL802154_CMD_SET_INTERFACE
2015-03-18 13:27 [PATCH wpan-tools 0/2] mac: phy: change to new nl802154 cmds Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 1/2] phy: use NL802154_CMD_SET_WPAN_PHY Alexander Aring
@ 2015-03-18 13:27 ` Alexander Aring
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Aring @ 2015-03-18 13:27 UTC (permalink / raw)
To: linux-wpan; +Cc: Alexander Aring
This patch change all set commands for mac interface settings to
NL802154_CMD_SET_INTERFACE which is the new command. The decision which
setting should be set is now determined which attribute is set.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/mac.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mac.c b/src/mac.c
index 703d09f..9dd8456 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -38,7 +38,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, pan_id, "<pan_id>",
- NL802154_CMD_SET_PAN_ID, 0, CIB_NETDEV, handle_pan_id_set, NULL);
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_pan_id_set, NULL);
static int handle_short_addr_set(struct nl802154_state *state,
struct nl_cb *cb,
@@ -65,7 +65,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, short_addr, "<short_addr>",
- NL802154_CMD_SET_SHORT_ADDR, 0, CIB_NETDEV, handle_short_addr_set, NULL);
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_short_addr_set, NULL);
static int handle_max_frame_retries_set(struct nl802154_state *state,
struct nl_cb *cb,
@@ -92,7 +92,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, max_frame_retries, "<retries>",
- NL802154_CMD_SET_MAX_FRAME_RETRIES, 0, CIB_NETDEV,
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV,
handle_max_frame_retries_set, NULL);
static int handle_backoff_exponent(struct nl802154_state *state,
@@ -127,7 +127,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, backoff_exponents, "<min_be> <max_be>",
- NL802154_CMD_SET_BACKOFF_EXPONENT, 0, CIB_NETDEV,
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV,
handle_backoff_exponent, NULL);
static int handle_max_csma_backoffs(struct nl802154_state *state,
@@ -155,7 +155,7 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, max_csma_backoffs, "<backoffs>",
- NL802154_CMD_SET_MAX_CSMA_BACKOFFS, 0, CIB_NETDEV,
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV,
handle_max_csma_backoffs, NULL);
@@ -184,4 +184,4 @@ nla_put_failure:
return -ENOBUFS;
}
COMMAND(set, lbt, "<1|0>",
- NL802154_CMD_SET_LBT_MODE, 0, CIB_NETDEV, handle_lbt_mode, NULL);
+ NL802154_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_lbt_mode, NULL);
--
2.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-18 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 13:27 [PATCH wpan-tools 0/2] mac: phy: change to new nl802154 cmds Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 1/2] phy: use NL802154_CMD_SET_WPAN_PHY Alexander Aring
2015-03-18 13:27 ` [PATCH wpan-tools 2/2] mac: use NL802154_CMD_SET_INTERFACE Alexander Aring
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.