Commit 905c0db8 authored by Anjan Chanda's avatar Anjan Chanda

remove legacy and unused code

parent 00e29842
Pipeline #457 passed with stage
in 32 seconds
PROG = wifimngr
OBJS = wifimngr.o wps.o wifimngr_event.o utils.o main.o
PROG_CFLAGS = $(CFLAGS) -fstrict-aliasing
PROG_LDFLAGS = $(LDFLAGS) -lwifi-5 -pthread
PROG_LDFLAGS += -luci -lubus -lubox -ljson-c -lblobmsg_json -lnl-genl-3 -lnl-3
PROG_CFLAGS = $(CFLAGS) -Wall -fstrict-aliasing
PROG_LDFLAGS = $(LDFLAGS)
PROG_LIBS = -lwifi-5
PROG_LIBS += -luci -lubus -lubox -ljson-c -lblobmsg_json -lnl-genl-3 -lnl-3
%.o: %.c
$(CC) $(PROG_CFLAGS) $(FPIC) -c -o $@ $<
......@@ -29,7 +30,7 @@ files.md5:
@md5sum *.c > $@
wifimngr: $(OBJS)
$(CC) $(PROG_LDFLAGS) -o $@ $^
$(CC) $(PROG_LDFLAGS) -o $@ $^ $(PROG_LIBS)
clean:
rm -f *.o $(PROG)
......@@ -112,6 +112,7 @@ static int wifimngr_cmd_main(struct ubus_context *ctx)
out_exit:
wifimngr_exit(wmngr);
return -1;
}
void wifimngr_clean_exit(void)
......
This diff is collapsed.
......@@ -42,8 +42,6 @@ static int _uci_get_wifi_devices(char iflist[][16])
struct uci_context *ctx;
struct uci_package *pkg;
struct uci_element *e;
const char *device;
int ret = 0;
int n = 0;
ctx = uci_alloc_context();
......@@ -181,7 +179,7 @@ char *wifi_get_main_interface(int freq_band, char *ifmain)
n = _uci_get_wifi_devices(wdevs);
for (i = 0; i < n; i++) {
int ch = 0;
uint32_t ch = 0;
if (!wifi_get_channel(wdevs[i], &ch, &bw)) {
if (freq_band == 5 && (ch >= 36 && ch < 200)) {
......@@ -442,7 +440,6 @@ int add_wps_methods(struct ubus_object *wifix)
{
int n_methods = 0;
struct ubus_method *wps_methods;
int i;
wps_methods = calloc(MAX_WPS_METHODS, sizeof(struct ubus_method));
if (!wps_methods)
......@@ -479,4 +476,6 @@ int add_wps_methods(struct ubus_object *wifix)
wifix->methods = wps_methods;
wifix->n_methods = n_methods;
return 0;
}
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