Search Linux Wireless

Re: [PATCH v3 3/3] NFC: Check if NCI data flow control is used

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

 



2011/11/1  <ilanelias78@xxxxxxxxx>:
> From: Ilan Elias <ilane@xxxxxx>
>
> Check if NCI data flow control is used in nci_tx_work.
>
> Signed-off-by: Ilan Elias <ilane@xxxxxx>
> ---
>  net/nfc/nci/core.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
> index 9d0b530..056cd37 100644
> --- a/net/nfc/nci/core.c
> +++ b/net/nfc/nci/core.c
> @@ -722,7 +722,9 @@ static void nci_tx_work(struct work_struct *work)
>                if (!skb)
>                        return;
>
> -               atomic_dec(&ndev->credits_cnt);
> +               /* Check if data flow control is used */
> +               if (atomic_read(&ndev->credits_cnt) != 0xff)
> +                       atomic_dec(&ndev->credits_cnt);

It would be better to replace the 0xff by a define.

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux