Commit fa5b303b authored by Anjan Chanda's avatar Anjan Chanda

use libeasy.so utility functions

parent f8cc609a
Pipeline #774 passed with stage
in 47 seconds
PROG = wifimngr
OBJS = wifimngr.o wps.o wifimngr_event.o utils.o main.o
OBJS = wifimngr.o wps.o wifimngr_event.o main.o
PROG_CFLAGS = $(CFLAGS) -Wall -fstrict-aliasing
PROG_LDFLAGS = $(LDFLAGS)
PROG_LIBS = -lwifi-5
PROG_LIBS = -leasy -lwifi-5
PROG_LIBS += -luci -lubus -lubox -ljson-c -lblobmsg_json -lnl-genl-3 -lnl-3
%.o: %.c
......
......@@ -37,7 +37,7 @@
#include <libubox/utils.h>
#include <libubus.h>
#include "utils.h"
#include <easy/easy.h>
#include "wifimngr.h"
#define DEFAULT_WIFI_EVMAP_JSON_FILE "/etc/wifi.json"
......
......@@ -32,7 +32,6 @@
#include <easy/easy.h>
#include <wifi.h>
#include "utils.h"
#include "wifimngr.h"
#include "version.h"
......@@ -917,7 +916,7 @@ static int wl_stations(struct ubus_context *ctx, struct ubus_object *obj,
{
struct blob_attr *tb[__STAINFO_MAX];
char sta_macstr[18] = {0};
unsigned char sta[6] = {0};
uint8_t sta[6] = {0};
const char *ifname;
struct blob_buf bb;
void *a;
......@@ -1057,7 +1056,7 @@ static int wl_scanresults(struct ubus_context *ctx, struct ubus_object *obj,
int num = 128; /* initial estimate for max APs in scanresults */
int i;
char bssid_str[18] = {0};
unsigned char bssid[6] = {0};
uint8_t bssid[6] = {0};
bool detail = false;
struct blob_buf bb;
......@@ -1267,7 +1266,7 @@ static int sta_disconnect(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *msg)
{
struct blob_attr *tb[__STA_DISCONNECT_MAX];
unsigned char sta[6] = {0};
uint8_t sta[6] = {0};
char sta_str[18] = {0};
const char *ifname;
......@@ -1301,7 +1300,7 @@ static int sta_monitor(struct ubus_context *ctx, struct ubus_object *obj,
void *t, *a;
const char *ifname;
char sta_str[18] = {0};
unsigned char sta[6] = {0};
uint8_t sta[6] = {0};
struct monitor_sta_ioreq {
uint8_t addr[6];
char rssi[4];
......@@ -1365,7 +1364,7 @@ static int nbr_add(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__NBR_ADD_MAX];
const char *ifname;
char bssid_str[18] = {0};
unsigned char bssid[6] = {0};
uint8_t bssid[6] = {0};
char binfo_str[12] = {0};
unsigned int bssid_info = 0;
unsigned int ch = 0;
......@@ -1426,7 +1425,7 @@ static int nbr_del(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__NBR_DEL_MAX];
const char *ifname;
char bssid_str[18] = {0};
unsigned char bssid[6] = {0};
uint8_t bssid[6] = {0};
ifname = ubus_ap_to_ifname(obj);
blobmsg_parse(nbr_del_policy, __NBR_DEL_MAX, tb,
......@@ -1539,7 +1538,7 @@ static int nbr_list(struct ubus_context *ctx, struct ubus_object *obj,
{
struct blob_attr *tb[__NBR_LIST_MAX];
char sta_macstr[18] = {0};
unsigned char sta[6] = {0};
uint8_t sta[6] = {0};
struct blob_buf bb;
const char *ifname;
......@@ -1575,7 +1574,7 @@ static int nbr_request(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__NBR_REQ_MAX];
const char *ifname;
char da_macstr[18] = {0};
unsigned char da[6] = {0};
uint8_t da[6] = {0};
ifname = ubus_ap_to_ifname(obj);
blobmsg_parse(nbr_req_policy, __NBR_REQ_MAX, tb,
......@@ -1601,8 +1600,8 @@ static int nbr_transition(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *tb[__NBR_TRANS_MAX];
const char *ifname;
char sta_macstr[18] = {0};
unsigned char sta[6] = {0};
unsigned char t_bss[6] = {0};
uint8_t sta[6] = {0};
uint8_t t_bss[6] = {0};
char bss_str[18] = {0};
unsigned int tmo = 0;
struct blob_attr *attr;
......
......@@ -31,8 +31,8 @@
#include <libubox/blobmsg_json.h>
#include "libubus.h"
#include <easy/easy.h>
#include <wifi.h>
#include "utils.h"
#define MAX_EVENT_RESPONSE_LEN 512
......
......@@ -32,7 +32,7 @@
#include <libubus.h>
#include <uci.h>
#include "utils.h"
#include <easy/easy.h>
#include <wifi.h>
#include "wifimngr.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment