summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-25 17:16:34 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 21:55:37 +0200
commit5a50439775853a8d565115edb63a5ab4bb780479 (patch)
tree8c2186840f6c46198a46234dede46a5e990f93fa /net
parent36426484fcaca2153616d6f3496b389a5b11bd9f (diff)
downloadlinux-5a50439775853a8d565115edb63a5ab4bb780479.tar.bz2
ieee802154: rename ieee802154_dev to ieee802154_hw
The identical struct of the wireless stack implementation is named ieee80211_hw. This is useful to name the variable hw instead of get confusing with netdev dev variable. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac802154/ieee802154_i.h2
-rw-r--r--net/mac802154/main.c34
-rw-r--r--net/mac802154/rx.c12
3 files changed, 24 insertions, 24 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index 970b621fc50b..0cb98e87645a 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -27,7 +27,7 @@
/* mac802154 device private data */
struct mac802154_priv {
- struct ieee802154_dev hw;
+ struct ieee802154_hw hw;
struct ieee802154_ops *ops;
/* ieee802154 phy */
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 9798c741739c..b0bcc063e9af 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -235,8 +235,8 @@ static int mac802154_set_frame_retries(struct wpan_phy *phy, s8 retries)
return priv->ops->set_frame_retries(&priv->hw, retries);
}
-struct ieee802154_dev *
-ieee802154_alloc_device(size_t priv_data_len, struct ieee802154_ops *ops)
+struct ieee802154_hw *
+ieee802154_alloc_hw(size_t priv_data_len, struct ieee802154_ops *ops)
{
struct wpan_phy *phy;
struct mac802154_priv *priv;
@@ -285,9 +285,9 @@ ieee802154_alloc_device(size_t priv_data_len, struct ieee802154_ops *ops)
return &priv->hw;
}
-EXPORT_SYMBOL(ieee802154_alloc_device);
+EXPORT_SYMBOL(ieee802154_alloc_hw);
-void ieee802154_free_device(struct ieee802154_dev *hw)
+void ieee802154_free_hw(struct ieee802154_hw *hw)
{
struct mac802154_priv *priv = mac802154_to_priv(hw);
@@ -297,49 +297,49 @@ void ieee802154_free_device(struct ieee802154_dev *hw)
wpan_phy_free(priv->phy);
}
-EXPORT_SYMBOL(ieee802154_free_device);
+EXPORT_SYMBOL(ieee802154_free_hw);
-int ieee802154_register_device(struct ieee802154_dev *dev)
+int ieee802154_register_hw(struct ieee802154_hw *hw)
{
- struct mac802154_priv *priv = mac802154_to_priv(dev);
+ struct mac802154_priv *priv = mac802154_to_priv(hw);
int rc = -ENOSYS;
- if (dev->flags & IEEE802154_HW_TXPOWER) {
+ if (hw->flags & IEEE802154_HW_TXPOWER) {
if (!priv->ops->set_txpower)
goto out;
priv->phy->set_txpower = mac802154_set_txpower;
}
- if (dev->flags & IEEE802154_HW_LBT) {
+ if (hw->flags & IEEE802154_HW_LBT) {
if (!priv->ops->set_lbt)
goto out;
priv->phy->set_lbt = mac802154_set_lbt;
}
- if (dev->flags & IEEE802154_HW_CCA_MODE) {
+ if (hw->flags & IEEE802154_HW_CCA_MODE) {
if (!priv->ops->set_cca_mode)
goto out;
priv->phy->set_cca_mode = mac802154_set_cca_mode;
}
- if (dev->flags & IEEE802154_HW_CCA_ED_LEVEL) {
+ if (hw->flags & IEEE802154_HW_CCA_ED_LEVEL) {
if (!priv->ops->set_cca_ed_level)
goto out;
priv->phy->set_cca_ed_level = mac802154_set_cca_ed_level;
}
- if (dev->flags & IEEE802154_HW_CSMA_PARAMS) {
+ if (hw->flags & IEEE802154_HW_CSMA_PARAMS) {
if (!priv->ops->set_csma_params)
goto out;
priv->phy->set_csma_params = mac802154_set_csma_params;
}
- if (dev->flags & IEEE802154_HW_FRAME_RETRIES) {
+ if (hw->flags & IEEE802154_HW_FRAME_RETRIES) {
if (!priv->ops->set_frame_retries)
goto out;
@@ -377,11 +377,11 @@ out_wq:
out:
return rc;
}
-EXPORT_SYMBOL(ieee802154_register_device);
+EXPORT_SYMBOL(ieee802154_register_hw);
-void ieee802154_unregister_device(struct ieee802154_dev *dev)
+void ieee802154_unregister_hw(struct ieee802154_hw *hw)
{
- struct mac802154_priv *priv = mac802154_to_priv(dev);
+ struct mac802154_priv *priv = mac802154_to_priv(hw);
struct mac802154_sub_if_data *sdata, *next;
flush_workqueue(priv->dev_workqueue);
@@ -405,7 +405,7 @@ void ieee802154_unregister_device(struct ieee802154_dev *dev)
wpan_phy_unregister(priv->phy);
}
-EXPORT_SYMBOL(ieee802154_unregister_device);
+EXPORT_SYMBOL(ieee802154_unregister_hw);
MODULE_DESCRIPTION("IEEE 802.15.4 implementation");
MODULE_LICENSE("GPL v2");
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index bc6cffd51f94..62b5c7dfe7f3 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -42,12 +42,12 @@
struct rx_work {
struct sk_buff *skb;
struct work_struct work;
- struct ieee802154_dev *dev;
+ struct ieee802154_hw *hw;
u8 lqi;
};
static void
-mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi)
+mac802154_subif_rx(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
{
struct mac802154_priv *priv = mac802154_to_priv(hw);
@@ -83,14 +83,14 @@ static void mac802154_rx_worker(struct work_struct *work)
{
struct rx_work *rw = container_of(work, struct rx_work, work);
- mac802154_subif_rx(rw->dev, rw->skb, rw->lqi);
+ mac802154_subif_rx(rw->hw, rw->skb, rw->lqi);
kfree(rw);
}
void
-ieee802154_rx_irqsafe(struct ieee802154_dev *dev, struct sk_buff *skb, u8 lqi)
+ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
{
- struct mac802154_priv *priv = mac802154_to_priv(dev);
+ struct mac802154_priv *priv = mac802154_to_priv(hw);
struct rx_work *work;
if (!skb)
@@ -102,7 +102,7 @@ ieee802154_rx_irqsafe(struct ieee802154_dev *dev, struct sk_buff *skb, u8 lqi)
INIT_WORK(&work->work, mac802154_rx_worker);
work->skb = skb;
- work->dev = dev;
+ work->hw = hw;
work->lqi = lqi;
queue_work(priv->dev_workqueue, &work->work);