This patch adds a new helper for calling the xmit callback from ieee802154_ops. Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx> --- net/mac802154/driver-ops.h | 6 ++++++ net/mac802154/tx.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h index edaf75f..00298d6 100644 --- a/net/mac802154/driver-ops.h +++ b/net/mac802154/driver-ops.h @@ -5,6 +5,12 @@ #include "ieee802154_i.h" +static inline int +drv_xmit(struct ieee802154_local *local, struct sk_buff *skb) +{ + return local->ops->xmit(&local->hw, skb); +} + static inline int drv_start(struct ieee802154_local *local) { might_sleep(); diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index c748080..5dc32dd 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -30,6 +30,7 @@ #include <net/wpan-phy.h> #include "ieee802154_i.h" +#include "driver-ops.h" /* IEEE 802.15.4 transceivers can sleep during the xmit session, so process * packets through the workqueue. @@ -52,7 +53,7 @@ static void mac802154_xmit_worker(struct work_struct *work) struct sk_buff *skb = cb->skb; int res; - res = local->ops->xmit(&cb->local->hw, skb); + res = drv_xmit(local, skb); if (res) pr_debug("transmission failed\n"); -- 2.0.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html