Iniital commit.
FossilOrigin-Name: 444fd9c8b63e89e88d2ac7eb5f2139fa791d280dee3a47a9fa97c06b9378e236
This commit is contained in:
parent
d50b1b411a
commit
9915c579c8
28
src/cw/cw_radio_set_admin_state.c
Normal file
28
src/cw/cw_radio_set_admin_state.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include "cw.h"
|
||||
#include "dbg.h"
|
||||
|
||||
#include "capwap_items.h"
|
||||
|
||||
|
||||
|
||||
int cw_radio_set_admin_state(mbag_t radios,int rid, int state, int cause)
|
||||
{
|
||||
mbag_t radio = mbag_i_get_mbag(radios,rid,NULL);
|
||||
if (!radio) {
|
||||
cw_dbg(DBG_ELEM_ERR,"Can't set radio administrative state for radio %d - radio does't exists",rid);
|
||||
return 0;
|
||||
}
|
||||
mbag_set_byte(radio,CW_RADIOITEM_ADMIN_STATE,state);
|
||||
|
||||
if (cause < 0)
|
||||
return 1;
|
||||
|
||||
|
||||
/* Set operational state for next config update response. */
|
||||
|
||||
mbag_set_word(radio,CW_RADIOITEM_OPER_STATE, (state<<8) | 3);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user