Re: [PATCH] Fix for Bluetooth SIG test L2CAP/COS/CFD/BV-14-C.

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

 



Hi Jimmy,

On Mon, Nov 2, 2020 at 5:33 AM Jimmy Wahlberg <jimmywa@xxxxxxxxxxx> wrote:
>
> This test case is meant to verify that multiple
> unknown options is included in the response.
>
> Unknown options shall be in the response if
> they are not hints according to Bluetooth Core
> Spec v5.2. See chapter 4.5 L2CAP_CONFIGURATION_RSP

Can you add the HCI trace (btmon) with and without the patch. Also
perhaps we should have a comment why this is needed on the code:

  'On an unknown option failure (Result=0x0003), the option(s) that contain an
  option type field that is not understood by the recipient of the
  L2CAP_CONFIGURATION_REQ packet shall be included in the
  L2CAP_CONFIGURATION_RSP packet unless they are hints.'

> Signed-off-by: Jimmy Wahlberg <jimmywa@xxxxxxxxxxx>
> ---
>  net/bluetooth/l2cap_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 1ab27b90ddcb..16956f323688 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -3627,7 +3627,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
>                         if (hint)
>                                 break;
>                         result = L2CAP_CONF_UNKNOWN;
> -                       *((u8 *) ptr++) = type;
> +                       l2cap_add_conf_opt(&ptr, (u8)type, sizeof(u8), type, endptr - ptr);
>                         break;
>                 }
>         }
> --
> 2.25.1
>
> Hi,
>
> While running tests I encountered this one test that I could not pass. After some troubleshooting I landed in this patch. Please let me know what you think.
>
> Best regards
> Jimmy



-- 
Luiz Augusto von Dentz



[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