framer-802154: do away with "type" of create_frame()

The argument, "type", is not used effectively in create_frame(). In
addition, it's confusing because create() calls create_frame() with
FRAME802154_DATAFRAME as "type" though it does not always create a data
frame.
This commit is contained in:
Yasuyuki Tanaka 2017-01-06 22:23:58 +01:00 committed by Yasuyuki Tanaka
parent 4ba8b2e684
commit e9951e9341

View File

@ -57,7 +57,7 @@ static uint8_t initialized = 0;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
create_frame(int type, int do_create) create_frame(int do_create)
{ {
frame802154_t params; frame802154_t params;
int hdr_len; int hdr_len;
@ -218,13 +218,13 @@ framer_802154_setup_params(packetbuf_attr_t (*get_attr)(uint8_t type),
static int static int
hdr_length(void) hdr_length(void)
{ {
return create_frame(FRAME802154_DATAFRAME, 0); return create_frame(0);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
create(void) create(void)
{ {
return create_frame(FRAME802154_DATAFRAME, 1); return create_frame(1);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int