diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-26 04:37:13 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-26 12:24:05 -0400 |
commit | e5e584fcc26b6b2225855b6fdba64d90dd8e2ea6 (patch) | |
tree | 3c77f4bd78f58062045793d7d48808c8293b53bd | |
parent | 409c3b0c5f030e36e9d6ca747dc3059eadde0cad (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>
-rw-r--r-- | net/mac802154/ieee802154_i.h | 6 | ||||
-rw-r--r-- | net/mac802154/iface.c | 2 | ||||
-rw-r--r-- | net/mac802154/monitor.c | 2 | ||||
-rw-r--r-- | net/mac802154/tx.c | 30 |
4 files changed, 23 insertions, 17 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h index a9a9d8e15278..ef29c10eeb66 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); | |||
121 | 121 | ||
122 | void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb); | 122 | void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb); |
123 | void mac802154_monitor_setup(struct net_device *dev); | 123 | void mac802154_monitor_setup(struct net_device *dev); |
124 | netdev_tx_t mac802154_monitor_xmit(struct sk_buff *skb, struct net_device *dev); | 124 | netdev_tx_t |
125 | ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev); | ||
125 | 126 | ||
126 | void mac802154_wpans_rx(struct ieee802154_local *local, struct sk_buff *skb); | 127 | void mac802154_wpans_rx(struct ieee802154_local *local, struct sk_buff *skb); |
127 | void mac802154_wpan_setup(struct net_device *dev); | 128 | void mac802154_wpan_setup(struct net_device *dev); |
128 | netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev); | 129 | netdev_tx_t |
130 | ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev); | ||
129 | 131 | ||
130 | /* MIB callbacks */ | 132 | /* MIB callbacks */ |
131 | void mac802154_dev_set_short_addr(struct net_device *dev, __le16 val); | 133 | 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 f14e4365c4c7..be45dc9257b3 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c | |||
@@ -315,7 +315,7 @@ static struct header_ops mac802154_header_ops = { | |||
315 | static const struct net_device_ops mac802154_wpan_ops = { | 315 | static const struct net_device_ops mac802154_wpan_ops = { |
316 | .ndo_open = mac802154_wpan_open, | 316 | .ndo_open = mac802154_wpan_open, |
317 | .ndo_stop = mac802154_slave_close, | 317 | .ndo_stop = mac802154_slave_close, |
318 | .ndo_start_xmit = mac802154_wpan_xmit, | 318 | .ndo_start_xmit = ieee802154_subif_start_xmit, |
319 | .ndo_do_ioctl = mac802154_wpan_ioctl, | 319 | .ndo_do_ioctl = mac802154_wpan_ioctl, |
320 | .ndo_set_mac_address = mac802154_wpan_mac_addr, | 320 | .ndo_set_mac_address = mac802154_wpan_mac_addr, |
321 | }; | 321 | }; |
diff --git a/net/mac802154/monitor.c b/net/mac802154/monitor.c index cb9600bcca51..575832231fd6 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) | |||
58 | static const struct net_device_ops mac802154_monitor_ops = { | 58 | static const struct net_device_ops mac802154_monitor_ops = { |
59 | .ndo_open = mac802154_slave_open, | 59 | .ndo_open = mac802154_slave_open, |
60 | .ndo_stop = mac802154_slave_close, | 60 | .ndo_stop = mac802154_slave_close, |
61 | .ndo_start_xmit = mac802154_monitor_xmit, | 61 | .ndo_start_xmit = ieee802154_monitor_start_xmit, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | void mac802154_monitor_setup(struct net_device *dev) | 64 | void mac802154_monitor_setup(struct net_device *dev) |
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index fe105d42ef83..74882c72b6c3 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c | |||
@@ -31,22 +31,24 @@ | |||
31 | /* IEEE 802.15.4 transceivers can sleep during the xmit session, so process | 31 | /* IEEE 802.15.4 transceivers can sleep during the xmit session, so process |
32 | * packets through the workqueue. | 32 | * packets through the workqueue. |
33 | */ | 33 | */ |
34 | struct wpan_xmit_cb { | 34 | struct ieee802154_xmit_cb { |
35 | struct sk_buff *skb; | 35 | struct sk_buff *skb; |
36 | struct work_struct work; | 36 | struct work_struct work; |
37 | struct ieee802154_local *local; | 37 | struct ieee802154_local *local; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static inline struct wpan_xmit_cb *wpan_xmit_cb(const struct sk_buff *skb) | 40 | static inline struct ieee802154_xmit_cb * |
41 | ieee802154_xmit_cb(const struct sk_buff *skb) | ||
41 | { | 42 | { |
42 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct wpan_xmit_cb)); | 43 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(struct ieee802154_xmit_cb)); |
43 | 44 | ||
44 | return (struct wpan_xmit_cb *)skb->cb; | 45 | return (struct ieee802154_xmit_cb *)skb->cb; |
45 | } | 46 | } |
46 | 47 | ||
47 | static void mac802154_xmit_worker(struct work_struct *work) | 48 | static void ieee802154_xmit_worker(struct work_struct *work) |
48 | { | 49 | { |
49 | struct wpan_xmit_cb *cb = container_of(work, struct wpan_xmit_cb, work); | 50 | struct ieee802154_xmit_cb *cb = |
51 | container_of(work, struct ieee802154_xmit_cb, work); | ||
50 | struct ieee802154_local *local = cb->local; | 52 | struct ieee802154_local *local = cb->local; |
51 | struct sk_buff *skb = cb->skb; | 53 | struct sk_buff *skb = cb->skb; |
52 | struct net_device *dev = skb->dev; | 54 | struct net_device *dev = skb->dev; |
@@ -80,9 +82,9 @@ err_tx: | |||
80 | } | 82 | } |
81 | 83 | ||
82 | static netdev_tx_t | 84 | static netdev_tx_t |
83 | mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) | 85 | ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb) |
84 | { | 86 | { |
85 | struct wpan_xmit_cb *cb = wpan_xmit_cb(skb); | 87 | struct ieee802154_xmit_cb *cb = ieee802154_xmit_cb(skb); |
86 | struct net_device *dev = skb->dev; | 88 | struct net_device *dev = skb->dev; |
87 | int ret; | 89 | int ret; |
88 | 90 | ||
@@ -111,7 +113,7 @@ mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb) | |||
111 | dev->stats.tx_packets++; | 113 | dev->stats.tx_packets++; |
112 | dev->stats.tx_bytes += skb->len; | 114 | dev->stats.tx_bytes += skb->len; |
113 | } else { | 115 | } else { |
114 | INIT_WORK(&cb->work, mac802154_xmit_worker); | 116 | INIT_WORK(&cb->work, ieee802154_xmit_worker); |
115 | cb->skb = skb; | 117 | cb->skb = skb; |
116 | cb->local = local; | 118 | cb->local = local; |
117 | 119 | ||
@@ -125,16 +127,18 @@ err_tx: | |||
125 | return NETDEV_TX_OK; | 127 | return NETDEV_TX_OK; |
126 | } | 128 | } |
127 | 129 | ||
128 | netdev_tx_t mac802154_monitor_xmit(struct sk_buff *skb, struct net_device *dev) | 130 | netdev_tx_t |
131 | ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
129 | { | 132 | { |
130 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); | 133 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); |
131 | 134 | ||
132 | skb->skb_iif = dev->ifindex; | 135 | skb->skb_iif = dev->ifindex; |
133 | 136 | ||
134 | return mac802154_tx(sdata->local, skb); | 137 | return ieee802154_tx(sdata->local, skb); |
135 | } | 138 | } |
136 | 139 | ||
137 | netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev) | 140 | netdev_tx_t |
141 | ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
138 | { | 142 | { |
139 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); | 143 | struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); |
140 | int rc; | 144 | int rc; |
@@ -148,5 +152,5 @@ netdev_tx_t mac802154_wpan_xmit(struct sk_buff *skb, struct net_device *dev) | |||
148 | 152 | ||
149 | skb->skb_iif = dev->ifindex; | 153 | skb->skb_iif = dev->ifindex; |
150 | 154 | ||
151 | return mac802154_tx(sdata->local, skb); | 155 | return ieee802154_tx(sdata->local, skb); |
152 | } | 156 | } |