Skip to content

Commit

Permalink
Merge pull request ARMmbed#1834 from ARMmbed/enable_bt_ie_ulad
Browse files Browse the repository at this point in the history
Revert "Disable wi-sun features temporary"
  • Loading branch information
Juha Heiskanen authored Sep 26, 2018
2 parents 02af1a8 + dd082a0 commit 9e22831
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ uint16_t ws_etx_read(protocol_interface_info_entry_t *interface, addrtype_t addr
return 0xffff;
}

#if 0
//If we are not following gbobal Broadcast synch
if (!interface->ws_info->pan_information.use_parent_bs) {
//We must know both information's here
Expand All @@ -551,7 +550,6 @@ uint16_t ws_etx_read(protocol_interface_info_entry_t *interface, addrtype_t addr
return 0xffff;
}
}
#endif
}

etx = etx_local_etx_read(interface->id,attribute_index);
Expand Down
9 changes: 0 additions & 9 deletions source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

#define LLC_MESSAGE_QUEUE_LIST_SIZE_MAX 16 //Do not config over 30 never
#define MPX_USER_SIZE 2
//#define ULAD_BT_IE

typedef struct {
uint16_t user_id; /**< User ID for identify MPX User */
Expand Down Expand Up @@ -578,11 +577,7 @@ static uint16_t ws_mpx_header_size_get(llc_data_base_t *base, uint16_t user_id)
//TODO add WS_WP_NESTED_IE support
uint16_t header_size = 0;
if (user_id == MPX_LOWPAN_ENC_USER_ID) {
#ifdef ULAD_BT_IE
header_size += 7 + 8 + 5 + 2; //UTT+BTT+ MPX + Padding
#else
header_size += 7 + 5 + 2; //UTT+ MPX + Padding
#endif
if (base->ie_params.vendor_header_length) {
header_size += base->ie_params.vendor_header_length + 3;
}
Expand Down Expand Up @@ -620,9 +615,7 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
wp_nested_ie_sub_list_t nested_wp_id;
memset(&nested_wp_id, 0, sizeof(wp_nested_ie_sub_list_t));
ie_header_mask.utt_ie = true;
#ifdef ULAD_BT_IE
ie_header_mask.bt_ie = true;
#endif
if (base->ie_params.vendor_header_length && user_id == MPX_LOWPAN_ENC_USER_ID) {
ie_header_mask.vh_ie = true;
}
Expand Down Expand Up @@ -683,9 +676,7 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
//Write UTT

ptr = ws_wh_utt_write(ptr, message->messsage_type);
#ifdef ULAD_BT_IE
ptr = ws_wh_bt_write(ptr);
#endif

if (user_id == MPX_LOWPAN_ENC_USER_ID && ie_header_mask.vh_ie) {
ptr = ws_wh_vh_write(ptr, base->ie_params.vendor_header_data, base->ie_params.vendor_header_length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,18 @@ bool test_mpx_msg_send()
uint8_t vendor_test[10];
//Test OverHead check
uint16_t test_length = mpx_api->mpx_headroom_size_get(mpx_api, 0xA0ED);
if (test_length != 26) {
if (test_length != 34) {
return false;
}
ws_llc_set_vendor_header_data(&interface, vendor_test, 10);
test_length = mpx_api->mpx_headroom_size_get(mpx_api, 0xA0ED);
if (test_length != 26 + 13) {
if (test_length != 34 + 13) {
return false;
}

ws_llc_set_vendor_payload_data(&interface, vendor_test, 10);
test_length = mpx_api->mpx_headroom_size_get(mpx_api, 0xA0ED);
if (test_length != 26 + 13 + 12) {
if (test_length != 34 + 13 + 12) {
return false;
}

Expand Down

0 comments on commit 9e22831

Please sign in to comment.