Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Varka Bhadram <varkabhadram@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: alex.aring@gmail.com
Subject: [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling
Date: Tue,  7 Jul 2015 10:50:43 +0530	[thread overview]
Message-ID: <1436246443-8243-2-git-send-email-varkabhadram@gmail.com> (raw)
In-Reply-To: <1436246443-8243-1-git-send-email-varkabhadram@gmail.com>

Instead of passing ieee802154_hw pointer to ieee802154_rx,
we can directly pass the ieee802154_local pointer.

Signed-off-by: Varka Bhadram <varkabhadram@gmail.com>
---
 net/mac802154/ieee802154_i.h |    2 +-
 net/mac802154/main.c         |    2 +-
 net/mac802154/rx.c           |    3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index eb8502a..6810d7a 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -124,7 +124,7 @@ ieee802154_sdata_running(struct ieee802154_sub_if_data *sdata)
 
 extern struct ieee802154_mlme_ops mac802154_mlme_wpan;
 
-void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb);
+void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb);
 netdev_tx_t
 ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
 netdev_tx_t
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 4caf04b..91f1208 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -40,7 +40,7 @@ static void ieee802154_tasklet_handler(unsigned long data)
 			 * netstack.
 			 */
 			skb->pkt_type = 0;
-			ieee802154_rx(&local->hw, skb);
+			ieee802154_rx(local, skb);
 			break;
 		default:
 			WARN(1, "mac802154: Packet is of unknown type %d\n",
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 7791c9b..d1c33c1 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -246,9 +246,8 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
 	}
 }
 
-void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb)
+void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb)
 {
-	struct ieee802154_local *local = hw_to_local(hw);
 	u16 crc;
 
 	WARN_ON_ONCE(softirq_count() == 0);
-- 
1.7.9.5


  reply	other threads:[~2015-07-07  5:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  5:20 [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx() Varka Bhadram
2015-07-07  5:20 ` Varka Bhadram [this message]
2015-07-07 12:15   ` [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling Marcel Holtmann
2015-07-07  6:39 ` [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx() Alexander Aring
2015-07-07 12:15 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436246443-8243-2-git-send-email-varkabhadram@gmail.com \
    --to=varkabhadram@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox