Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ROLE = dut
VERSION = "2.1.0.42"

OBJS = main.o eloop.o indigo_api.o indigo_packet.o utils.o wpa_ctrl.o
CFLAGS += -g
CFLAGS += -g -Wall -Wextra -Wpedantic -Werror

ifeq ($(TYPE),laptop)
CC = gcc
Expand Down
1 change: 1 addition & 0 deletions eloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ int eloop_cancel_timeout(void (*handler)(void *eloop_ctx, void *sock_ctx),
#ifndef CONFIG_NATIVE_WINDOWS
static void eloop_handle_alarm(int sig)
{
(void) sig;
fprintf(stderr, "eloop: could not process SIGINT or SIGTERM in two "
"seconds. Looks like there\n"
"is a bug that ends up in a busy loop that "
Expand Down
7 changes: 3 additions & 4 deletions hs2_profile.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* Copyright (c) 2021 Wi-Fi Alliance */

/* Permission to use, copy, modify, and/or distribute this software for any */
Expand Down Expand Up @@ -180,7 +179,7 @@ struct tlv_to_profile hs2_profile[] = {
};

struct tlv_to_profile* find_tlv_hs2_profile(int tlv_id) {
int i;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(hs2_profile); i++) {
if (tlv_id == hs2_profile[i].tlv_id) {
return &hs2_profile[i];
Expand All @@ -190,11 +189,11 @@ struct tlv_to_profile* find_tlv_hs2_profile(int tlv_id) {
}

void attach_hs20_icons(char * buffer) {
int i;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(hs20_icon); i++) {
strcat(buffer, hs20_icon[i]);
}
return;
}

#endif // _HS2_PROFILE
#endif // _HS2_PROFILE
6 changes: 3 additions & 3 deletions indigo_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ struct indigo_tlv indigo_tlv_list[] = {

/* Find the type of the API stucture by the ID from the list */
char* get_api_type_by_id(int id) {
int i = 0;
unsigned int i = 0;
for (i = 0; i < sizeof(indigo_api_list)/sizeof(struct indigo_api); i++) {
if (id == indigo_api_list[i].type) {
return indigo_api_list[i].name;
Expand All @@ -288,7 +288,7 @@ char* get_api_type_by_id(int id) {

/* Find the API stucture by the ID from the list */
struct indigo_api* get_api_by_id(int id) {
int i = 0;
unsigned int i = 0;
for (i = 0; i < sizeof(indigo_api_list)/sizeof(struct indigo_api); i++) {
if (id == indigo_api_list[i].type) {
return &indigo_api_list[i];
Expand All @@ -299,7 +299,7 @@ struct indigo_api* get_api_by_id(int id) {

/* Find the TLV by the ID from the list */
struct indigo_tlv* get_tlv_by_id(int id) {
int i = 0;
unsigned int i = 0;

for (i = 0; i < sizeof(indigo_tlv_list)/sizeof(struct indigo_tlv); i++) {
if (id == indigo_tlv_list[i].id) {
Expand Down
14 changes: 3 additions & 11 deletions indigo_api_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ struct anqp_tlv_to_config_name anqp_maps[] = {
};

char* find_tlv_config_name(int tlv_id) {
int i;
unsigned int i;
for (i = 0; i < sizeof(maps)/sizeof(struct tlv_to_config_name); i++) {
if (tlv_id == maps[i].tlv_id) {
return maps[i].config_name;
Expand All @@ -184,7 +184,7 @@ char* find_tlv_config_name(int tlv_id) {
}

struct tlv_to_config_name* find_tlv_config(int tlv_id) {
int i;
unsigned int i;
for (i = 0; i < sizeof(maps)/sizeof(struct tlv_to_config_name); i++) {
if (tlv_id == maps[i].tlv_id) {
return &maps[i];
Expand All @@ -211,7 +211,7 @@ struct tlv_to_config_name wpas_global_maps[] = {
};

struct tlv_to_config_name* find_wpas_global_config_name(int tlv_id) {
int i;
unsigned int i;
for (i = 0; i < sizeof(wpas_global_maps)/sizeof(struct tlv_to_config_name); i++) {
if (tlv_id == wpas_global_maps[i].tlv_id) {
return &wpas_global_maps[i];
Expand All @@ -234,8 +234,6 @@ struct tlv_to_config_name* find_generic_tlv_config(int tlv_id, struct tlv_to_con
static int get_control_app_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int start_loopback_server(struct packet_wrapper *req, struct packet_wrapper *resp);
static int stop_loop_back_server_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_loopback_data_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int stop_loopback_data_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int create_bridge_network_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int assign_static_ip_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int get_mac_addr_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
Expand All @@ -253,14 +251,12 @@ static int send_ap_disconnect_handler(struct packet_wrapper *req, struct packet_
static int set_ap_parameter_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_ap_btm_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int trigger_ap_channel_switch(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_ap_arp_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int start_wps_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int configure_ap_wsc_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
/* STA */
static int stop_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int associate_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int start_up_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_sta_disconnect_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_sta_reconnect_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_sta_btm_query_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
Expand All @@ -270,11 +266,7 @@ static int set_sta_parameter_handler(struct packet_wrapper *req, struct packet_w
static int set_sta_hs2_associate_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int sta_add_credential_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int set_sta_install_ppsmo_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int set_sta_phy_mode_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int set_sta_channel_width_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int set_sta_power_save_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int start_wps_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int send_sta_icon_req_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
static int enable_wsc_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
/* P2P */
static int start_up_p2p_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
Expand Down
Loading