Skip to content

Commit

Permalink
Removed dead code part
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Heiskanen committed Jun 1, 2020
1 parent fc644f5 commit 0d4eb7a
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,78 +838,6 @@ static void ws_llc_mac_indication_cb(const mac_api_t *api, const mcps_data_ind_t
if (ws_utt.message_type == WS_FT_EAPOL) {
ws_llc_eapol_indication_cb(api, data, ie_ext, ws_utt);
return;
llc_data_base_t *base = ws_llc_mpx_frame_common_validates(api, data, ws_utt);
if (!base) {
return;
}

//Discover MPX header and handler
mac_payload_IE_t mpx_ie;
mpx_msg_t mpx_frame;
mpx_user_t *user_cb = ws_llc_mpx_header_parse(base, ie_ext, &mpx_frame, &mpx_ie);
if (!user_cb) {
return;
}

mac_payload_IE_t ws_wp_nested;
ws_us_ie_t us_ie;
bool us_ie_inline = false;
bool bs_ie_inline = false;
ws_wp_nested.id = WS_WP_NESTED_IE;
ws_bs_ie_t ws_bs_ie;
if (mac_ie_payload_discover(ie_ext->payloadIeList, ie_ext->payloadIeListLength, &ws_wp_nested) > 2) {
us_ie_inline = ws_wp_nested_us_read(ws_wp_nested.content_ptr, ws_wp_nested.length, &us_ie);
bs_ie_inline = ws_wp_nested_bs_read(ws_wp_nested.content_ptr, ws_wp_nested.length, &ws_bs_ie);
}

//Validate Unicast shedule Channel Plan
if (us_ie_inline && !ws_bootstrap_validate_channel_plan(&us_ie, base->interface_ptr)) {
//Channel plan configuration mismatch
return;
}

llc_neighbour_req_t neighbor_info;

if (!base->ws_neighbor_info_request_cb(base->interface_ptr, data->SrcAddr, &neighbor_info, true)) {
//tr_debug("Drop message no neighbor");
return;
}

ws_neighbor_class_neighbor_unicast_time_info_update(neighbor_info.ws_neighbor, &ws_utt, data->timestamp);
if (us_ie_inline) {
ws_neighbor_class_neighbor_unicast_schedule_set(neighbor_info.ws_neighbor, &us_ie);
}
//Update BS if it is part of message
if (bs_ie_inline) {
ws_neighbor_class_neighbor_broadcast_schedule_set(neighbor_info.ws_neighbor, &ws_bs_ie);
}

uint8_t auth_eui64[8];
//Discover and write Auhtenticator EUI-64
if (ws_wh_ea_read(ie_ext->headerIeList, ie_ext->headerIeListLength, auth_eui64)) {
ws_pae_controller_border_router_addr_write(base->interface_ptr, auth_eui64);
}


//Update BT if it is part of message
ws_bt_ie_t ws_bt;
if (ws_wh_bt_read(ie_ext->headerIeList, ie_ext->headerIeListLength, &ws_bt)) {
ws_neighbor_class_neighbor_broadcast_time_info_update(neighbor_info.ws_neighbor, &ws_bt, data->timestamp);
if (neighbor_info.neighbor) {
if (neighbor_info.neighbor->link_role == PRIORITY_PARENT_NEIGHBOUR) {
// We have broadcast schedule set up set the broadcast parent schedule
ns_fhss_ws_set_parent(base->interface_ptr->ws_info->fhss_api, neighbor_info.neighbor->mac64, &neighbor_info.ws_neighbor->fhss_data.bc_timing_info, false);
} else {
ws_bootstrap_eapol_parent_synch(base->interface_ptr, &neighbor_info);
}
}
}

mcps_data_ind_t data_ind = *data;
data_ind.msdu_ptr = mpx_frame.frame_ptr;
data_ind.msduLength = mpx_frame.frame_length;
user_cb->data_ind(&base->mpx_data_base.mpx_api, &data_ind);
return;
}
}

Expand Down

0 comments on commit 0d4eb7a

Please sign in to comment.