Commit e5e584fc authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

mac802154: tx: change naming convention

This patch changes the naming convention of the tx functions like
mac80211. Just with an 802154 instead 80211 inside the name.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 409c3b0c
...@@ -121,11 +121,13 @@ int mac802154_slave_close(struct net_device *dev); ...@@ -121,11 +121,13 @@ int mac802154_slave_close(struct net_device *dev);
void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb); void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb);
void mac802154_monitor_setup(struct net_device *dev); 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_wpans_rx(struct ieee802154_local *local, struct sk_buff *skb);
void mac802154_wpan_setup(struct net_device *dev); 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 */ /* MIB callbacks */
void mac802154_dev_set_short_addr(struct net_device *dev, __le16 val); void mac802154_dev_set_short_addr(struct net_device *dev, __le16 val);
......
...@@ -315,7 +315,7 @@ static struct header_ops mac802154_header_ops = { ...@@ -315,7 +315,7 @@ static struct header_ops mac802154_header_ops = {
static const struct net_device_ops mac802154_wpan_ops = { static const struct net_device_ops mac802154_wpan_ops = {
.ndo_open = mac802154_wpan_open, .ndo_open = mac802154_wpan_open,
.ndo_stop = mac802154_slave_close, .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_do_ioctl = mac802154_wpan_ioctl,
.ndo_set_mac_address = mac802154_wpan_mac_addr, .ndo_set_mac_address = mac802154_wpan_mac_addr,
}; };
......
...@@ -58,7 +58,7 @@ void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb) ...@@ -58,7 +58,7 @@ void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
static const struct net_device_ops mac802154_monitor_ops = { static const struct net_device_ops mac802154_monitor_ops = {
.ndo_open = mac802154_slave_open, .ndo_open = mac802154_slave_open,
.ndo_stop = mac802154_slave_close, .ndo_stop = mac802154_slave_close,
.ndo_start_xmit = mac802154_monitor_xmit, .ndo_start_xmit = ieee802154_monitor_start_xmit,
}; };
void mac802154_monitor_setup(struct net_device *dev) void mac802154_monitor_setup(struct net_device *dev)
......
...@@ -31,22 +31,24 @@ ...@@ -31,22 +31,24 @@
/* IEEE 802.15.4 transceivers can sleep during the xmit session, so process /* IEEE 802.15.4 transceivers can sleep during the xmit session, so process
* packets through the workqueue. * packets through the workqueue.
*/ */
struct wpan_xmit_cb { struct ieee802154_xmit_cb {
struct sk_buff *skb; struct sk_buff *skb;
struct work_struct work; struct work_struct work;
struct ieee802154_local *local; 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 ieee802154_local *local = cb->local;
struct sk_buff *skb = cb->skb; struct sk_buff *skb = cb->skb;
struct net_device *dev = skb->dev; struct net_device *dev = skb->dev;
...@@ -80,9 +82,9 @@ static void mac802154_xmit_worker(struct work_struct *work) ...@@ -80,9 +82,9 @@ static void mac802154_xmit_worker(struct work_struct *work)
} }
static netdev_tx_t 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; struct net_device *dev = skb->dev;
int ret; int ret;
...@@ -111,7 +113,7 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) ...@@ -111,7 +113,7 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
dev->stats.tx_packets++; dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
} else { } else {
INIT_WORK(&cb->work, mac802154_xmit_worker); INIT_WORK(&cb->work, ieee802154_xmit_worker);
cb->skb = skb; cb->skb = skb;
cb->local = local; cb->local = local;
...@@ -125,16 +127,18 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) ...@@ -125,16 +127,18 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
return NETDEV_TX_OK; 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); struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
skb->skb_iif = dev->ifindex; 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); struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
int rc; int rc;
...@@ -148,5 +152,5 @@ netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -148,5 +152,5 @@ netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev)
skb->skb_iif = dev->ifindex; skb->skb_iif = dev->ifindex;
return mac802154_tx(sdata->local, skb); return ieee802154_tx(sdata->local, skb);
} }
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