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 23:06:22 UTC

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

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