You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/04/22 22:31:33 UTC

[GitHub] [mynewt-nimble] rymanluk opened a new pull request #806: nimble/ll: Some LL fixes, cleaning and improvements

rymanluk opened a new pull request #806:
URL: https://github.com/apache/mynewt-nimble/pull/806


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on issue #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618371590


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	    rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG       (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42         \
   -(                                        \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   -    BLE_SUPP_CMD_LE_CREATE_CIS         | \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG         | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   -)
   +    (                                        \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   +        BLE_SUPP_CMD_LE_CREATE_CIS         | \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG         | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-623721819


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG       (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42         \
   -(                                        \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   -    BLE_SUPP_CMD_LE_CREATE_CIS         | \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG         | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   -)
   +    (                                        \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   +        BLE_SUPP_CMD_LE_CREATE_CIS         | \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG         | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on issue #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618084446


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_iso.c
   <details>
   
   ```diff
   @@ -93,7 +93,8 @@
        return BLE_ERR_UNSUPPORTED;
    }
    
   -int ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len)
   +int
   +ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len)
    {
        return BLE_ERR_UNSUPPORTED;
    }
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_conn_hci.c
   <details>
   
   ```diff
   @@ -1563,7 +1563,7 @@
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
    int
    ble_ll_conn_req_peer_sca(const uint8_t *cmdbuf, uint8_t len,
   -                          uint8_t *rspbuf, uint8_t *rsplen)
   +                         uint8_t *rspbuf, uint8_t *rsplen)
    {
        const struct ble_hci_le_request_peer_sca_cp *params = (const void *)cmdbuf;
        struct ble_ll_conn_sm *connsm;
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS |         \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 |                  \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC |                  \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS |         \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 |                  \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC |                  \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST |                \
   -    BLE_SUPP_CMD_LE_CREATE_CIS |                        \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG |                        \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ |                    \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ |                    \
   -    BLE_SUPP_CMD_LE_CREATE_BIG  |                       \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST |                   \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST |                \
   +        BLE_SUPP_CMD_LE_CREATE_CIS |                        \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG |                        \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ |                    \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ |                    \
   +        BLE_SUPP_CMD_LE_CREATE_BIG  |                       \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST |                   \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG                       \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618434827


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	    rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG       (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42         \
   -(                                        \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   -    BLE_SUPP_CMD_LE_CREATE_CIS         | \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG         | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   -)
   +    (                                        \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   +        BLE_SUPP_CMD_LE_CREATE_CIS         | \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG         | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618371590


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	    rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG       (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42         \
   -(                                        \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   -    BLE_SUPP_CMD_LE_CREATE_CIS         | \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG         | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   -)
   +    (                                        \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   +        BLE_SUPP_CMD_LE_CREATE_CIS         | \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG         | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#discussion_r419360684



##########
File path: nimble/controller/src/ble_ll_ctrl.c
##########
@@ -1040,7 +1060,44 @@ ble_ll_ctrl_rx_periodic_sync_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
                                  connsm->sync_transfer_skip,
                                  connsm->sync_transfer_sync_timeout);
     }
+    return BLE_ERR_MAX;
+}
+#endif
 
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_REQ PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ * @param rsp Pointer to CtrData of BLE_LL_CTRL_CLOCK_ACCURACY_RSP.
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
+                       uint8_t *rsp)
+{
+    ble_ll_ctrl_sca_req_rsp_make(connsm, rsp);
+    return BLE_LL_CTRL_CLOCK_ACCURACY_RSP;
+}
+
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_RSP PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
+{
+    if (!(connsm->cur_ctrl_proc == BLE_LL_CTRL_PROC_SCA_UPDATE)) {

Review comment:
       if (foo != BAR)  maybe ?:)

##########
File path: nimble/syscfg.yml
##########
@@ -77,6 +77,19 @@ syscfg.defs:
             integer for easy comparison.
         range: 50, 51, 52
         value: 50
+    BLE_ISO:

Review comment:
       I think we should have BLE_LL_FEAT_ISO (or similar) for controller configuration that defaults to BLE_ISO (which should set both host and controller support). This should keep this similar to other LL config options

##########
File path: nimble/controller/include/controller/ble_ll_conn.h
##########
@@ -58,6 +58,8 @@ extern "C" {
 /* Definition for RSSI when the RSSI is unknown */
 #define BLE_LL_CONN_UNKNOWN_RSSI        (127)
 
+#define BLE_LL_CONN_ISO_HANDLE_OFFSET   (0x0100)

Review comment:
       I'd name this BLE_LL_CONN_HANDLE_ISO_OFFSET (so that is it similar to BLE_HS_CONN_HANDLE_*)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618434827


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	    rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS         | \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2                  | \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC                  | \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG       (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42         \
   -(                                        \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   -    BLE_SUPP_CMD_LE_CREATE_CIS         | \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG         | \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   -)
   +    (                                        \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
   +        BLE_SUPP_CMD_LE_CREATE_CIS         | \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG         | \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ     | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG         | \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST    | \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG        \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #806: nimble/ll: Some LL fixes, cleaning and improvements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#issuecomment-618084446


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/controller/src/ble_ll_iso.c
   <details>
   
   ```diff
   @@ -93,7 +93,8 @@
        return BLE_ERR_UNSUPPORTED;
    }
    
   -int ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len)
   +int
   +ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len)
    {
        return BLE_ERR_UNSUPPORTED;
    }
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_conn_hci.c
   <details>
   
   ```diff
   @@ -1563,7 +1563,7 @@
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
    int
    ble_ll_conn_req_peer_sca(const uint8_t *cmdbuf, uint8_t len,
   -                          uint8_t *rspbuf, uint8_t *rsplen)
   +                         uint8_t *rspbuf, uint8_t *rsplen)
    {
        const struct ble_hci_le_request_peer_sca_cp *params = (const void *)cmdbuf;
        struct ble_ll_conn_sm *connsm;
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_hci.c
   <details>
   
   ```diff
   @@ -1183,7 +1184,7 @@
            rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
            break;
        case BLE_HCI_OCF_LE_SET_CIG_PARAM:
   -	rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
   +        rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
            break;
        case BLE_HCI_OCF_LE_CREATE_CIS:
            rc = ble_ll_iso_create_cis(cmdbuf, len);
   ```
   
   </details>
   
   #### nimble/controller/src/ble_ll_supp_cmd.c
   <details>
   
   ```diff
   @@ -415,13 +415,13 @@
    #endif
    
    #define BLE_LL_SUPP_CMD_OCTET_41                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS |         \
   -    BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   -    BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 |                  \
   -    BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC |                  \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS |         \
   +        BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
   +        BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 |                  \
   +        BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC |                  \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM                       \
   +    )
    
    /* Octet 42 */
    #if MYNEWT_VAL(BLE_ISO)
   @@ -444,16 +444,16 @@
    #define BLE_SUPP_CMD_LE_TERMINATE_BIG (0 << 7)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_42                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST |                \
   -    BLE_SUPP_CMD_LE_CREATE_CIS |                        \
   -    BLE_SUPP_CMD_LE_REMOVE_CIG |                        \
   -    BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ |                    \
   -    BLE_SUPP_CMD_LE_REJECT_CIS_REQ |                    \
   -    BLE_SUPP_CMD_LE_CREATE_BIG  |                       \
   -    BLE_SUPP_CMD_LE_CREATE_BIG_TEST |                   \
   -    BLE_SUPP_CMD_LE_TERMINATE_BIG                       \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST |                \
   +        BLE_SUPP_CMD_LE_CREATE_CIS |                        \
   +        BLE_SUPP_CMD_LE_REMOVE_CIG |                        \
   +        BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ |                    \
   +        BLE_SUPP_CMD_LE_REJECT_CIS_REQ |                    \
   +        BLE_SUPP_CMD_LE_CREATE_BIG  |                       \
   +        BLE_SUPP_CMD_LE_CREATE_BIG_TEST |                   \
   +        BLE_SUPP_CMD_LE_TERMINATE_BIG                       \
   +    )
    
    /* Octet 43 */
    #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
   @@ -462,9 +462,9 @@
    #define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_43                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_REQUEST_PEER_SCA  \
   +    )
    
    /* Octet 44 */
    #if MYNEWT_VAL(BLE_VERSION) >= 52
   @@ -473,13 +473,12 @@
    #define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
    #endif
    #define BLE_LL_SUPP_CMD_OCTET_44                        \
   -(                                                       \
   -    BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   -)
   +    (                                                       \
   +        BLE_SUPP_CMD_LE_SET_HOST_FEATURE  \
   +    )
    
    /* Defines the array of supported commands */
   -const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
   -{
   +const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = {
        BLE_LL_SUPP_CMD_OCTET_0,            /* Octet 0 */
        0,
        0,
   ```
   
   </details>
   
   #### nimble/include/nimble/hci_common.h
   <details>
   
   ```diff
   @@ -198,15 +198,15 @@
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE                  (0x0002)
    struct ble_hci_le_rd_buf_size_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2                    (0x0060)
    struct ble_hci_le_rd_buf_size_v2_rp {
        uint16_t data_len;
   -    uint8_t  data_packets;
   +    uint8_t data_packets;
        uint16_t iso_data_len;
   -    uint8_t  iso_data_packets;
   +    uint8_t iso_data_packets;
    } __attribute__((packed));
    
    #define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT             (0x0003)
   @@ -1661,17 +1661,17 @@
    
    #define BLE_HCI_LE_SUBEV_PERIODIC_ADV_SYNC_TRANSFER   (0x18)
    struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
   -    uint8_t  subev_code;
   -    uint8_t  status;
   +    uint8_t subev_code;
   +    uint8_t status;
        uint16_t conn_handle;
        uint16_t service_data;
        uint16_t sync_handle;
   -    uint8_t  sid;
   -    uint8_t  peer_addr_type;
   -    uint8_t  peer_addr[6];
   -    uint8_t  phy;
   +    uint8_t sid;
   +    uint8_t peer_addr_type;
   +    uint8_t peer_addr[6];
   +    uint8_t phy;
        uint16_t interval;
   -    uint8_t  aca;
   +    uint8_t aca;
    } __attribute__((packed));
    
    #define BLE_HCI_LE_SUBEV_CIS_ESTAB              (0x19)
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org