Message ID | 20170411192103.3209-2-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Hi Luiz, On Tue, 2017-04-11 at 22:20 +0300, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > > Since l2cap_chan_send will now queue the packets there is no point in > checking the credits anymore. > > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> > --- > net/bluetooth/6lowpan.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c > index 5b91e85..22bd936 100644 > --- a/net/bluetooth/6lowpan.c > +++ b/net/bluetooth/6lowpan.c > @@ -478,15 +478,8 @@ static int send_pkt(struct l2cap_chan *chan, > struct sk_buff *skb, > return 0; > } > > - if (!err) > - err = (!chan->tx_credits ? -EAGAIN : 0); > - > - if (err < 0) { > - if (err == -EAGAIN) > - netdev->stats.tx_dropped++; > - else > - netdev->stats.tx_errors++; > - } > + if (err < 0) > + netdev->stats.tx_errors++; > > return err; > } Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Cheers, Jukka -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 5b91e85..22bd936 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -478,15 +478,8 @@ static int send_pkt(struct l2cap_chan *chan, struct sk_buff *skb, return 0; } - if (!err) - err = (!chan->tx_credits ? -EAGAIN : 0); - - if (err < 0) { - if (err == -EAGAIN) - netdev->stats.tx_dropped++; - else - netdev->stats.tx_errors++; - } + if (err < 0) + netdev->stats.tx_errors++; return err; }