* pull-request: wpan-next 2014-08-11
@ 2014-08-11 11:25 Alexander Aring
2014-08-11 11:25 ` [PATCH 1/4] mac802154: cleanup in rx path Alexander Aring
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: marcel, linux-wpan, kernel
Hi Marcel,
this is a pull request for the bluetooth-next tree. The pull request contains
some cleanup patches for mac802154 and the ieee802154 6lowpan part.
- Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] mac802154: cleanup in rx path
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
@ 2014-08-11 11:25 ` Alexander Aring
2014-08-11 19:18 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 2/4] mac802154: common error path Alexander Aring
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, linux-wpan, kernel, Varka Bhadram, Alexander Aring
From: Varka Bhadram <varkab@cdac.in>
This patch replace the sizeof(struct rx_work) with sizeof(*work)
and directly passing the skb in mac802154_subif_rx()
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/rx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 7f820a1..a14cf9e 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -86,9 +86,8 @@ fail:
static void mac802154_rx_worker(struct work_struct *work)
{
struct rx_work *rw = container_of(work, struct rx_work, work);
- struct sk_buff *skb = rw->skb;
- mac802154_subif_rx(rw->dev, skb, rw->lqi);
+ mac802154_subif_rx(rw->dev, rw->skb, rw->lqi);
kfree(rw);
}
@@ -101,7 +100,7 @@ ieee802154_rx_irqsafe(struct ieee802154_dev *dev, struct sk_buff *skb, u8 lqi)
if (!skb)
return;
- work = kzalloc(sizeof(struct rx_work), GFP_ATOMIC);
+ work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work)
return;
--
2.0.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] mac802154: common error path
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
2014-08-11 11:25 ` [PATCH 1/4] mac802154: cleanup in rx path Alexander Aring
@ 2014-08-11 11:25 ` Alexander Aring
2014-08-11 19:18 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 3/4] ieee802154: 6lowpan: remove unused function Alexander Aring
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, linux-wpan, kernel, Varka Bhadram, Alexander Aring
From: Varka Bhadram <varkab@cdac.in>
By introducing label fail, making the common error path for
mac802154_llsec_decrypt() and packet type default case.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/wpan.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c
index 3c3069f..ce17570 100644
--- a/net/mac802154/wpan.c
+++ b/net/mac802154/wpan.c
@@ -472,8 +472,7 @@ mac802154_subif_frame(struct mac802154_sub_if_data *sdata, struct sk_buff *skb,
rc = mac802154_llsec_decrypt(&sdata->sec, skb);
if (rc) {
pr_debug("decryption failed: %i\n", rc);
- kfree_skb(skb);
- return NET_RX_DROP;
+ goto fail;
}
sdata->dev->stats.rx_packets++;
@@ -485,9 +484,12 @@ mac802154_subif_frame(struct mac802154_sub_if_data *sdata, struct sk_buff *skb,
default:
pr_warn("ieee802154: bad frame received (type = %d)\n",
mac_cb(skb)->type);
- kfree_skb(skb);
- return NET_RX_DROP;
+ goto fail;
}
+
+fail:
+ kfree_skb(skb);
+ return NET_RX_DROP;
}
static void mac802154_print_addr(const char *name,
--
2.0.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] ieee802154: 6lowpan: remove unused function
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
2014-08-11 11:25 ` [PATCH 1/4] mac802154: cleanup in rx path Alexander Aring
2014-08-11 11:25 ` [PATCH 2/4] mac802154: common error path Alexander Aring
@ 2014-08-11 11:25 ` Alexander Aring
2014-08-11 19:17 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 4/4] mac802154: common tx error path Alexander Aring
2014-08-11 11:39 ` pull-request: wpan-next 2014-08-11 Alexander Aring
4 siblings, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:25 UTC (permalink / raw)
To: linux-bluetooth; +Cc: marcel, linux-wpan, kernel, Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/ieee802154/6lowpan_rtnl.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index 016b77e..509d7a6 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -77,14 +77,6 @@ lowpan_dev_info *lowpan_dev_info(const struct net_device *dev)
return netdev_priv(dev);
}
-static inline void lowpan_address_flip(u8 *src, u8 *dest)
-{
- int i;
-
- for (i = 0; i < IEEE802154_ADDR_LEN; i++)
- (dest)[IEEE802154_ADDR_LEN - i - 1] = (src)[i];
-}
-
static int lowpan_header_create(struct sk_buff *skb, struct net_device *dev,
unsigned short type, const void *_daddr,
const void *_saddr, unsigned int len)
--
2.0.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] mac802154: common tx error path
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
` (2 preceding siblings ...)
2014-08-11 11:25 ` [PATCH 3/4] ieee802154: 6lowpan: remove unused function Alexander Aring
@ 2014-08-11 11:25 ` Alexander Aring
2014-08-11 19:17 ` Marcel Holtmann
2014-08-11 11:39 ` pull-request: wpan-next 2014-08-11 Alexander Aring
4 siblings, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:25 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, linux-wpan, kernel, Varka Bhadram, Alexander Aring
From: Varka Bhadram <varkab@cdac.in>
This patch introduce the common error path on failure of Tx by
inserting the label 'err_tx'.
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/tx.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 8124353..fdf4c0e6 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -89,8 +89,7 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
if (!(priv->phy->channels_supported[page] & (1 << chan))) {
WARN_ON(1);
- kfree_skb(skb);
- return NETDEV_TX_OK;
+ goto err_tx;
}
mac802154_monitors_rx(mac802154_to_priv(&priv->hw), skb);
@@ -103,12 +102,10 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
data[1] = crc >> 8;
}
- if (skb_cow_head(skb, priv->hw.extra_tx_headroom)) {
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
+ if (skb_cow_head(skb, priv->hw.extra_tx_headroom))
+ goto err_tx;
- work = kzalloc(sizeof(struct xmit_work), GFP_ATOMIC);
+ work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work) {
kfree_skb(skb);
return NETDEV_TX_BUSY;
@@ -129,4 +126,8 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
queue_work(priv->dev_workqueue, &work->work);
return NETDEV_TX_OK;
+
+err_tx:
+ kfree_skb(skb);
+ return NETDEV_TX_OK;
}
--
2.0.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: pull-request: wpan-next 2014-08-11
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
` (3 preceding siblings ...)
2014-08-11 11:25 ` [PATCH 4/4] mac802154: common tx error path Alexander Aring
@ 2014-08-11 11:39 ` Alexander Aring
2014-08-11 19:24 ` Marcel Holtmann
4 siblings, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-08-11 11:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: marcel, linux-wpan, kernel
Hi Marcel,
On Mon, Aug 11, 2014 at 01:25:06PM +0200, Alexander Aring wrote:
> Hi Marcel,
>
> this is a pull request for the bluetooth-next tree. The pull request contains
> some cleanup patches for mac802154 and the ieee802154 6lowpan part.
I fight with my git setup and this was a complete fail.
Sorry, for the noise.
- Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] mac802154: common tx error path
2014-08-11 11:25 ` [PATCH 4/4] mac802154: common tx error path Alexander Aring
@ 2014-08-11 19:17 ` Marcel Holtmann
0 siblings, 0 replies; 11+ messages in thread
From: Marcel Holtmann @ 2014-08-11 19:17 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-bluetooth, linux-wpan, kernel, Varka Bhadram
Hi Alex,
> From: Varka Bhadram <varkab@cdac.in>
>
> This patch introduce the common error path on failure of Tx by
> inserting the label 'err_tx'.
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> net/mac802154/tx.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] ieee802154: 6lowpan: remove unused function
2014-08-11 11:25 ` [PATCH 3/4] ieee802154: 6lowpan: remove unused function Alexander Aring
@ 2014-08-11 19:17 ` Marcel Holtmann
0 siblings, 0 replies; 11+ messages in thread
From: Marcel Holtmann @ 2014-08-11 19:17 UTC (permalink / raw)
To: Alexander Aring; +Cc: BlueZ development, linux-wpan, kernel
Hi Alex,
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> net/ieee802154/6lowpan_rtnl.c | 8 --------
> 1 file changed, 8 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] mac802154: common error path
2014-08-11 11:25 ` [PATCH 2/4] mac802154: common error path Alexander Aring
@ 2014-08-11 19:18 ` Marcel Holtmann
0 siblings, 0 replies; 11+ messages in thread
From: Marcel Holtmann @ 2014-08-11 19:18 UTC (permalink / raw)
To: Alexander Aring; +Cc: BlueZ development, linux-wpan, kernel, Varka Bhadram
Hi Alex,
> From: Varka Bhadram <varkab@cdac.in>
>
> By introducing label fail, making the common error path for
> mac802154_llsec_decrypt() and packet type default case.
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> net/mac802154/wpan.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] mac802154: cleanup in rx path
2014-08-11 11:25 ` [PATCH 1/4] mac802154: cleanup in rx path Alexander Aring
@ 2014-08-11 19:18 ` Marcel Holtmann
0 siblings, 0 replies; 11+ messages in thread
From: Marcel Holtmann @ 2014-08-11 19:18 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-bluetooth, linux-wpan, kernel, Varka Bhadram
Hi Alex,
> From: Varka Bhadram <varkab@cdac.in>
>
> This patch replace the sizeof(struct rx_work) with sizeof(*work)
> and directly passing the skb in mac802154_subif_rx()
>
> Signed-off-by: Varka Bhadram <varkab@cdac.in>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> net/mac802154/rx.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: pull-request: wpan-next 2014-08-11
2014-08-11 11:39 ` pull-request: wpan-next 2014-08-11 Alexander Aring
@ 2014-08-11 19:24 ` Marcel Holtmann
0 siblings, 0 replies; 11+ messages in thread
From: Marcel Holtmann @ 2014-08-11 19:24 UTC (permalink / raw)
To: Alexander Aring; +Cc: BlueZ development, linux-wpan, kernel
Hi Alex,
>> this is a pull request for the bluetooth-next tree. The pull request contains
>> some cleanup patches for mac802154 and the ieee802154 6lowpan part.
>
> I fight with my git setup and this was a complete fail.
>
> Sorry, for the noise.
no problem. And I am totally fine if you just send patch series using git send-email. I can as easily apply them as a pull request.
Regards
Marcel
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-08-11 19:24 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 11:25 pull-request: wpan-next 2014-08-11 Alexander Aring
2014-08-11 11:25 ` [PATCH 1/4] mac802154: cleanup in rx path Alexander Aring
2014-08-11 19:18 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 2/4] mac802154: common error path Alexander Aring
2014-08-11 19:18 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 3/4] ieee802154: 6lowpan: remove unused function Alexander Aring
2014-08-11 19:17 ` Marcel Holtmann
2014-08-11 11:25 ` [PATCH 4/4] mac802154: common tx error path Alexander Aring
2014-08-11 19:17 ` Marcel Holtmann
2014-08-11 11:39 ` pull-request: wpan-next 2014-08-11 Alexander Aring
2014-08-11 19:24 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).