Re: [PATCH 2/6] Bluetooth: 6lowpan: Don't drop packets when run out of credits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Tue, 2017-04-11 at 22:20 +0300, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx>


Cheers,
Jukka

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux