void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb);
void mac802154_monitor_setup(struct net_device *dev);
-netdev_tx_t mac802154_monitor_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t
+ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
void mac802154_wpans_rx(struct ieee802154_local *local, struct sk_buff *skb);
void mac802154_wpan_setup(struct net_device *dev);
-netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t
+ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
/* MIB callbacks */
void mac802154_dev_set_short_addr(struct net_device *dev, __le16 val);
static const struct net_device_ops mac802154_wpan_ops = {
.ndo_open = mac802154_wpan_open,
.ndo_stop = mac802154_slave_close,
- .ndo_start_xmit = mac802154_wpan_xmit,
+ .ndo_start_xmit = ieee802154_subif_start_xmit,
.ndo_do_ioctl = mac802154_wpan_ioctl,
.ndo_set_mac_address = mac802154_wpan_mac_addr,
};
/* IEEE 802.15.4 transceivers can sleep during the xmit session, so process
* packets through the workqueue.
*/
-struct wpan_xmit_cb {
+struct ieee802154_xmit_cb {
struct sk_buff *skb;
struct work_struct work;
struct ieee802154_local *local;
};
-static inline struct wpan_xmit_cb *wpan_xmit_cb(const struct sk_buff *skb)
+static inline struct ieee802154_xmit_cb *
+ieee802154_xmit_cb(const struct sk_buff *skb)
{
- BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct wpan_xmit_cb));
+ BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct ieee802154_xmit_cb));
- return (struct wpan_xmit_cb *)skb->cb;
+ return (struct ieee802154_xmit_cb *)skb->cb;
}
-static void mac802154_xmit_worker(struct work_struct *work)
+static void ieee802154_xmit_worker(struct work_struct *work)
{
- struct wpan_xmit_cb *cb = container_of(work, struct wpan_xmit_cb, work);
+ struct ieee802154_xmit_cb *cb =
+ container_of(work, struct ieee802154_xmit_cb, work);
struct ieee802154_local *local = cb->local;
struct sk_buff *skb = cb->skb;
struct net_device *dev = skb->dev;
}
static netdev_tx_t
-mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
+ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
{
- struct wpan_xmit_cb *cb = wpan_xmit_cb(skb);
+ struct ieee802154_xmit_cb *cb = ieee802154_xmit_cb(skb);
struct net_device *dev = skb->dev;
int ret;
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
} else {
- INIT_WORK(&cb->work, mac802154_xmit_worker);
+ INIT_WORK(&cb->work, ieee802154_xmit_worker);
cb->skb = skb;
cb->local = local;
return NETDEV_TX_OK;
}
-netdev_tx_t mac802154_monitor_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t
+ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
skb->skb_iif = dev->ifindex;
- return mac802154_tx(sdata->local, skb);
+ return ieee802154_tx(sdata->local, skb);
}
-netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev)
+netdev_tx_t
+ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
int rc;
skb->skb_iif = dev->ifindex;
- return mac802154_tx(sdata->local, skb);
+ return ieee802154_tx(sdata->local, skb);
}