|
42 | 42 |
|
43 | 43 | #define LLC_MESSAGE_QUEUE_LIST_SIZE_MAX 16 //Do not config over 30 never
|
44 | 44 | #define MPX_USER_SIZE 2
|
| 45 | +//#define ULAD_BT_IE |
45 | 46 |
|
46 | 47 | typedef struct {
|
47 | 48 | uint16_t user_id; /**< User ID for identify MPX User */
|
@@ -577,7 +578,11 @@ static uint16_t ws_mpx_header_size_get(llc_data_base_t *base, uint16_t user_id)
|
577 | 578 | //TODO add WS_WP_NESTED_IE support
|
578 | 579 | uint16_t header_size = 0;
|
579 | 580 | if (user_id == MPX_LOWPAN_ENC_USER_ID) {
|
| 581 | +#ifdef ULAD_BT_IE |
580 | 582 | header_size += 7 + 8 + 5 + 2; //UTT+BTT+ MPX + Padding
|
| 583 | +#else |
| 584 | + header_size += 7 + 5 + 2; //UTT+ MPX + Padding |
| 585 | +#endif |
581 | 586 | if (base->ie_params.vendor_header_length) {
|
582 | 587 | header_size += base->ie_params.vendor_header_length + 3;
|
583 | 588 | }
|
@@ -615,7 +620,9 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
|
615 | 620 | wp_nested_ie_sub_list_t nested_wp_id;
|
616 | 621 | memset(&nested_wp_id, 0, sizeof(wp_nested_ie_sub_list_t));
|
617 | 622 | ie_header_mask.utt_ie = true;
|
| 623 | +#ifdef ULAD_BT_IE |
618 | 624 | ie_header_mask.bt_ie = true;
|
| 625 | +#endif |
619 | 626 | if (base->ie_params.vendor_header_length && user_id == MPX_LOWPAN_ENC_USER_ID) {
|
620 | 627 | ie_header_mask.vh_ie = true;
|
621 | 628 | }
|
@@ -676,7 +683,9 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
|
676 | 683 | //Write UTT
|
677 | 684 |
|
678 | 685 | ptr = ws_wh_utt_write(ptr, message->messsage_type);
|
| 686 | +#ifdef ULAD_BT_IE |
679 | 687 | ptr = ws_wh_bt_write(ptr);
|
| 688 | +#endif |
680 | 689 |
|
681 | 690 | if (user_id == MPX_LOWPAN_ENC_USER_ID && ie_header_mask.vh_ie) {
|
682 | 691 | ptr = ws_wh_vh_write(ptr, base->ie_params.vendor_header_data, base->ie_params.vendor_header_length);
|
|
0 commit comments