summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-26 09:37:13 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-10-26 17:24:05 +0100
commite5e584fcc26b6b2225855b6fdba64d90dd8e2ea6 (patch)
tree3c77f4bd78f58062045793d7d48808c8293b53bd /net
parent409c3b0c5f030e36e9d6ca747dc3059eadde0cad (diff)
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: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac802154/ieee802154_i.h6
-rw-r--r--net/mac802154/iface.c2
-rw-r--r--net/mac802154/monitor.c2
-rw-r--r--net/mac802154/tx.c30
4 files changed, 23 insertions, 17 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index a9a9d8e1527..ef29c10eeb6 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -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_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);
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index f14e4365c4c..be45dc9257b 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -315,7 +315,7 @@ static struct header_ops mac802154_header_ops = {
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,
};
diff --git a/net/mac802154/monitor.c b/net/mac802154/monitor.c
index cb9600bcca5..575832231fd 100644
--- a/net/mac802154/monitor.c
+++ b/net/mac802154/monitor.c
@@ -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 = {
.ndo_open = mac802154_slave_open,
.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)
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index fe105d42ef8..74882c72b6c 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -31,22 +31,24 @@
/* 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;
@@ -80,9 +82,9 @@ err_tx:
}
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;
@@ -111,7 +113,7 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
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;
@@ -125,16 +127,18 @@ err_tx:
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;
@@ -148,5 +152,5 @@ netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev)
skb->skb_iif = dev->ifindex;
- return mac802154_tx(sdata->local, skb);
+ return ieee802154_tx(sdata->local, skb);
}