linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ieee802154: cc2520: add rc code in cc2520_tx()
@ 2022-08-29  7:12 Li Qiong
  2022-08-29  8:55 ` Stefan Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Li Qiong @ 2022-08-29  7:12 UTC (permalink / raw)
  To: Varka Bhadram, Alexander Aring, Stefan Schmidt, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-wpan, netdev, linux-kernel, Yu Zhe, Li Qiong

The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW".
Assign rc code with '-EINVAL' at this error path to fix it.

Signed-off-by: Li Qiong <liqiong@nfschina.com>
---
 drivers/net/ieee802154/cc2520.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
index 1e1f40f628a0..c69b87d3837d 100644
--- a/drivers/net/ieee802154/cc2520.c
+++ b/drivers/net/ieee802154/cc2520.c
@@ -504,6 +504,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb)
 		goto err_tx;
 
 	if (status & CC2520_STATUS_TX_UNDERFLOW) {
+		rc = -EINVAL;
 		dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n");
 		goto err_tx;
 	}
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ieee802154: cc2520: add rc code in cc2520_tx()
  2022-08-29  7:12 [PATCH] ieee802154: cc2520: add rc code in cc2520_tx() Li Qiong
@ 2022-08-29  8:55 ` Stefan Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schmidt @ 2022-08-29  8:55 UTC (permalink / raw)
  To: Li Qiong, Varka Bhadram, Alexander Aring, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-wpan, netdev, linux-kernel, Yu Zhe


Hello Qiong.

On 29.08.22 09:12, Li Qiong wrote:
> The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW".
> Assign rc code with '-EINVAL' at this error path to fix it.
> 
> Signed-off-by: Li Qiong <liqiong@nfschina.com>
> ---
>   drivers/net/ieee802154/cc2520.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
> index 1e1f40f628a0..c69b87d3837d 100644
> --- a/drivers/net/ieee802154/cc2520.c
> +++ b/drivers/net/ieee802154/cc2520.c
> @@ -504,6 +504,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb)
>   		goto err_tx;
>   
>   	if (status & CC2520_STATUS_TX_UNDERFLOW) {
> +		rc = -EINVAL;
>   		dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n");
>   		goto err_tx;
>   	}

This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!

regards
Stefan Schmidt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29  7:12 [PATCH] ieee802154: cc2520: add rc code in cc2520_tx() Li Qiong
2022-08-29  8:55 ` Stefan Schmidt

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).