void usr_mlme_set_conf(uint8_t status, uint8_t PIBAttribute,
		uint8_t PIBAttributeIndex)
{
	if (status != MAC_SUCCESS) {
		/* something went wrong; restart */
		wpan_mlme_reset_req(true);
	} else {
		if (mlme_set_conf_run_time) {
			usr_mlme_set_conf_run_time(status, PIBAttribute,
					PIBAttributeIndex);
			return;
		} else {
			init_secuity_pib(PIBAttribute, PIBAttributeIndex);
		}
	}

	/* Keep compiler happy. */
	PIBAttributeIndex = PIBAttributeIndex;
}
Esempio n. 2
0
/** @brief Callback function usr_mlme_set_conf
 *
 *  @param status        Result of requested PIB attribute set operation
 *  @param PIBAttribute  Updated PIB attribute
 *
 */
void usr_mlme_set_conf(uint8_t status, uint8_t PIBAttribute,
		uint8_t PIBAttributeIndex)
{
	if (status != MAC_SUCCESS) {
		/* something went wrong with mlme set request; restart */
		wpan_mlme_reset_req(true);
	} else {
		if (mlme_set_conf_run_time) {
			/* post initialization security pib callback */
			usr_mlme_set_conf_run_time(status, PIBAttribute,
					PIBAttributeIndex);
		} else {
			/* Initialize the mac security PIB before starting the
			 * network */
			init_secuity_pib(PIBAttribute, PIBAttributeIndex);
		}
	}

	/* Keep compiler happy. */
	PIBAttributeIndex = PIBAttributeIndex;
}