2015-04-19 16:45:44 +02:00
|
|
|
|
2016-03-11 22:23:00 +01:00
|
|
|
#include "cw.h"
|
2015-04-19 16:45:44 +02:00
|
|
|
#include "capwap_items.h"
|
2016-03-08 20:06:42 +01:00
|
|
|
#include "capwap80211.h"
|
2016-03-31 19:22:26 +02:00
|
|
|
#include "capwap80211_items.h"
|
|
|
|
|
2015-04-19 16:45:44 +02:00
|
|
|
#include "radio.h"
|
|
|
|
|
|
|
|
#include "dbg.h"
|
|
|
|
#include "log.h"
|
|
|
|
|
|
|
|
#include "mbag.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int cw_put_elem_radio_info(uint8_t*dst,int radio_id,mbag_t radio)
|
|
|
|
{
|
|
|
|
cw_put_byte(dst+4,radio_id);
|
2016-04-02 09:05:07 +02:00
|
|
|
cw_put_dword(dst+5,mbag_get_dword(radio,CW_RADIOITEM80211_WTP_RADIO_INFORMATION,0));
|
2015-04-19 16:45:44 +02:00
|
|
|
return 5 + cw_put_elem_hdr(dst,CW_ELEM80211_WTP_RADIO_INFORMATION,5);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-04-26 08:41:12 +02:00
|
|
|
|
2015-04-19 16:45:44 +02:00
|
|
|
int cw_out_radio_infos(struct conn *conn, struct cw_action_out *a, uint8_t * dst)
|
|
|
|
{
|
2016-03-09 09:09:28 +01:00
|
|
|
|
2015-04-19 16:45:44 +02:00
|
|
|
int l=0;
|
|
|
|
MAVLITER_DEFINE(it,conn->radios);
|
|
|
|
mavliter_foreach(&it){
|
|
|
|
struct mbag_item *i = mavliter_get(&it);
|
|
|
|
if ( i->type != MBAG_MBAG ) {
|
|
|
|
continue;
|
|
|
|
}
|
2018-03-03 17:42:28 +01:00
|
|
|
l+=cw_put_elem_radio_info(dst+l,i->u1.iid,i->u2.data);
|
2015-04-19 16:45:44 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
return l;
|
|
|
|
}
|
|
|
|
|
2015-04-26 08:41:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|