* [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx()
@ 2015-07-07 5:20 Varka Bhadram
2015-07-07 5:20 ` [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling Varka Bhadram
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Varka Bhadram @ 2015-07-07 5:20 UTC (permalink / raw)
To: linux-wpan; +Cc: alex.aring
Right now there are no other users for ieee802154_rx()
in kernel. So lets remove EXPORT_SYMBOL() for this.
Also it moves the function prototype from global header
file to local header file.
Signed-off-by: Varka Bhadram <varkabhadram@gmail.com>
---
include/net/mac802154.h | 17 -----------------
net/mac802154/ieee802154_i.h | 1 +
net/mac802154/rx.c | 1 -
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index f534a46..b7f9961 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -321,23 +321,6 @@ int ieee802154_register_hw(struct ieee802154_hw *hw);
void ieee802154_unregister_hw(struct ieee802154_hw *hw);
/**
- * ieee802154_rx - receive frame
- *
- * Use this function to hand received frames to mac802154. The receive
- * buffer in @skb must start with an IEEE 802.15.4 header. In case of a
- * paged @skb is used, the driver is recommended to put the ieee802154
- * header of the frame on the linear part of the @skb to avoid memory
- * allocation and/or memcpy by the stack.
- *
- * This function may not be called in IRQ context. Calls to this function
- * for a single hardware must be synchronized against each other.
- *
- * @hw: the hardware this frame came in on
- * @skb: the buffer to receive, owned by mac802154 after this call
- */
-void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb);
-
-/**
* ieee802154_rx_irqsafe - receive frame
*
* Like ieee802154_rx() but can be called in IRQ context
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index 0054f39..eb8502a 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -124,6 +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);
netdev_tx_t
ieee802154_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 5a258c1..7791c9b 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -290,7 +290,6 @@ void ieee802154_rx(struct ieee802154_hw *hw, struct sk_buff *skb)
drop:
kfree_skb(skb);
}
-EXPORT_SYMBOL(ieee802154_rx);
void
ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling
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
2015-07-07 12:15 ` 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
2 siblings, 1 reply; 5+ messages in thread
From: Varka Bhadram @ 2015-07-07 5:20 UTC (permalink / raw)
To: linux-wpan; +Cc: alex.aring
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx()
2015-07-07 5:20 [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx() Varka Bhadram
2015-07-07 5:20 ` [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling Varka Bhadram
@ 2015-07-07 6:39 ` Alexander Aring
2015-07-07 12:15 ` Marcel Holtmann
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Aring @ 2015-07-07 6:39 UTC (permalink / raw)
To: Varka Bhadram; +Cc: linux-wpan
Hi,
On Tue, Jul 07, 2015 at 10:50:42AM +0530, Varka Bhadram wrote:
> Right now there are no other users for ieee802154_rx()
> in kernel. So lets remove EXPORT_SYMBOL() for this.
>
> Also it moves the function prototype from global header
> file to local header file.
>
> Signed-off-by: Varka Bhadram <varkabhadram@gmail.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
on the complete serie.
- Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx()
2015-07-07 5:20 [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx() Varka Bhadram
2015-07-07 5:20 ` [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling Varka Bhadram
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
2 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2015-07-07 12:15 UTC (permalink / raw)
To: Varka Bhadram; +Cc: linux-wpan, alex.aring
Hi Varka,
> Right now there are no other users for ieee802154_rx()
> in kernel. So lets remove EXPORT_SYMBOL() for this.
>
> Also it moves the function prototype from global header
> file to local header file.
>
> Signed-off-by: Varka Bhadram <varkabhadram@gmail.com>
> ---
> include/net/mac802154.h | 17 -----------------
> net/mac802154/ieee802154_i.h | 1 +
> net/mac802154/rx.c | 1 -
> 3 files changed, 1 insertion(+), 18 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-07 12:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07 5:20 [PATCH bluetooth-next 1/2] mac802154: do not export ieee802154_rx() Varka Bhadram
2015-07-07 5:20 ` [PATCH bluetooth-next 2/2] mac802154: fix ieee802154_rx handling Varka Bhadram
2015-07-07 12:15 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox