Skip to content

Commit

Permalink
Impelement LLC reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Heiskanen authored and juhhei01 committed Feb 13, 2018
1 parent 47458c8 commit b48cda0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,19 @@ int8_t ws_llc_create(struct protocol_interface_info_entry *interface, ws_asynch_

void ws_llc_reset(struct protocol_interface_info_entry *interface)
{
(void)interface;
llc_data_base_t *base = ws_llc_discover_by_interface(interface);
if (!base) {
return;
}
//Clean Message queue's
mcps_purge_t purge_req;
ns_list_foreach_safe(llc_message_t, message, &base->llc_message_list) {
purge_req.msduHandle = message->msg_handle;
llc_message_free(message, base);
base->interface_ptr->mac_api->mcps_purge_req(base->interface_ptr->mac_api, &purge_req);

}
memset(&base->ie_params, 0, sizeof(llc_ie_params_t));
}

int8_t ws_llc_asynch_request(struct protocol_interface_info_entry *interface, asynch_request_t *request)
Expand Down

0 comments on commit b48cda0

Please sign in to comment.