Some AC actions added.

FossilOrigin-Name: 81ab5c5c07e3ed0b84527274f3c80314fc6411fdd9aede3dba3b2cb2ae0eef8c
This commit is contained in:
7u83@mail.ru
2015-04-26 10:36:53 +00:00
parent e1a6017211
commit f3a034122f
27 changed files with 216 additions and 1288 deletions

View File

@ -20,8 +20,8 @@ ifndef ARCH
endif
#CFLAGS += -O0 -Wall -g
CFLAGS += -Os -Wall
CFLAGS += -O0 -Werror -g
#CFLAGS += -Os -Wall
LDFLAGS += -L../contrib/jsmn -L../../src/capwap/$(ARCH)

View File

@ -193,7 +193,7 @@ int cfg_json_get_ac_ip_list(struct mbag_itemdef *idef, char *js, jsmntok_t * t,
}
return 0;
}
@ -430,7 +430,9 @@ struct mbag_itemdef board_data_cfg[] = {
struct mbag_itemdef radio_cfg[] = {
{CW_RADIO_ADMIN_STATE, "admin_state", cfg_json_get_byte, cfg_json_put_byte}
{CW_RADIO_ADMIN_STATE, "admin_state", cfg_json_get_byte, cfg_json_put_byte},
{CW_RADIO_TYPE, "radio_type", cfg_json_get_dword, cfg_json_put_dword},
{0,0,0}
};
@ -699,7 +701,7 @@ int cfg_json_save()
////printf("DST:%s\n",dst);
//exit(0);
cw_save_file("cfg.json", dst, n);
return 1;
}
struct mbag_itemdef *get_cfg(struct mbag_itemdef *cfg, const char *key)

View File

@ -27,10 +27,12 @@
"wtp_board_data_options":".x00010000",
"radios":{
"0":{
"admin_state":"2"
"admin_state":"2",
"radio_type":"0"
},
"1":{
"admin_state":"2"
"admin_state":"2",
"radio_type":"0"
}
},
"bssid":""

View File

@ -12,8 +12,9 @@ int changestate()
if ( !cw_rcok(rc) ) {
cw_strresult(rc);
return 0;
}
return 1;
}

View File

@ -27,6 +27,6 @@ int configure()
printf("Got change resp %p\n",cwrmsg);
*/
return 0;
}

View File

@ -161,7 +161,7 @@ static int run_discovery(struct conn *conn)
mbag_set_avltree(conn->local,CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST,list);
return 0;
return 1;
}
@ -228,5 +228,5 @@ int discovery()
struct conn *conn = get_conn();
cw_run_discovery(conn, "255.255.255.255");
conn->capwap_state=CW_STATE_JOIN;
return 0;
return 1;
}

View File

@ -20,7 +20,7 @@
#include "dot11.h"
/*
uint8_t * mk_frame( uint8_t *b)
{
@ -70,7 +70,7 @@ int dot11_get_beacon_head(struct apdata *ap, uint8_t *dst, int *len)
printf("t1\n");
/* set-up head */
// set-up head
struct dot11_mgmt_head head;
memset (&head,0,sizeof(head));
@ -79,11 +79,11 @@ printf("t2\n");
head.frame_control = htole16 (DOT11_FTYPE_MGMT | DOT11_STYPE_BEACON);
head.duration = htole16(0);
/* destination address */
// destination address
memset(head.da, 0xff, sizeof(head.da));
printf("t3\n");
/* source address */
// source address
memcpy (head.sa , ap->mac,6);
memcpy (head.bssid , ap->mac,6);
b += add_bytes(b,&head,sizeof(head));
@ -140,8 +140,9 @@ add_supp_rates_ie(uint8_t *buf,uint32_t * rates, int num_rates)
return b-buf;
}
*/
/*
dot11_get_beacon_data(struct apdata *ap,struct beacon_data *bd)
{
bd->head = malloc(256);
@ -165,5 +166,5 @@ printf ("done\n");
return 0;
}
*/

View File

@ -319,7 +319,7 @@ struct beacon_data{
};
dot11_get_beacon_data(struct apdata *ap,struct beacon_data *bd);
int dot11_get_beacon_data(struct apdata *ap,struct beacon_data *bd);

View File

@ -10,7 +10,7 @@
#include "nlt.h"
/*
static int error_handler(struct sockaddr_nl *nla, struct nlmsgerr *err, void *arg)
{
@ -362,3 +362,6 @@ int nlt_get_wiphy_list(struct nl_sock *sk)
}
}
*/

View File

@ -80,7 +80,7 @@ int run()
// cw_strresult(rc);
// }
return 0;
}

View File

@ -10,6 +10,10 @@ extern int join();
extern int discovery();
extern int image_update();
extern int setup_conf(struct conn * conn);
extern int configure();
extern int run();
extern int changestate();
struct conn * get_conn();

View File

@ -220,6 +220,7 @@ int wtpconf_preinit()
conf_board_id = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_ID);
conf_board_revision = bstr_create_from_cfgstr(CONF_DEFAULT_BOARD_REVISION);
return 0;
}
int wtpconf_init()

View File

@ -21,7 +21,7 @@
#include "jsmn.h"
#include "cfg.h"
@ -168,9 +168,12 @@ cw_set_msg_end_callback(conn,CW_STATE_CONFIGURE,CW_MSG_CONFIGURATION_STATUS_RESP
the_conn->strict_capwap=0;
discovery();
join();
the_conn->strict_capwap=1;
if (!discovery())
return -1;
if (!join())
return -1;
mavl_destroy(conn->incomming);
conn->incomming=conn->config;
configure();

File diff suppressed because it is too large Load Diff