]> git.decadent.org.uk Git - ap-utils.git/blobdiff - src/ap-config.c
Imported Upstream version 1.5~pre1
[ap-utils.git] / src / ap-config.c
index 4ef92872b66cd571cb90848d2fcb9f26023e6f3c..c41525e89b6d640d95ada9b0d585dd4fcff4dd4e 100644 (file)
 #include <sys/ioctl.h>
 #include "ap-utils.h"
 
-char *ap_types[3] = {
-    "ATMEL410",
-    "NWN",
-    "ATMEL12350"
-};
-
 WINDOW *win_for_menu, *sub_for_menu, *win_for_help, *main_win, *main_sub;
-short ap_type;
 char *community;
-int sockfd, atmel410_filter=0;
+int sockfd, atmel410_filter = 0, wait_mode = WAIT_FOREVER;
 struct in_addr ap_ip;
 char *prog_title = "Wireless Access Point Configurator";
-
-extern char IS_ATMEL410_SBRIDGES;
-extern char IS_ATMEL12350_TELLUS;
-extern char IS_ATMEL12350_VERNET;
+char set_oeminfo_allowed = 0;
+extern short ap_type;
 
 void config_menu()
 {
@@ -72,7 +63,9 @@ void config_menu()
     switch (ap_type) {
        case ATMEL410:
        case ATMEL12350:
+           set_oeminfo_allowed++;
            uni_menu(umenu_atmel, sizeof(umenu_atmel) / sizeof(umenu_atmel[0]));
+           set_oeminfo_allowed--;
            break;
        case NWN:
            uni_menu(umenu_nwn, sizeof(umenu_nwn) / sizeof(umenu_nwn[0]));
@@ -84,11 +77,10 @@ void config_menu()
 void command_menu()
 {
     struct umitems command_umenu_atmel[] = {
-       {_("Upload"), _("Make current configuration active"), upload, 0},
+       {_("Upload"), _("Activate current configuration"), upload, 0},
        {_("Defaults"), _("Restore factory default settings"), defaults, 0},
        {_("Reset"),
-        _("Reset AP. All not uploaded configuration will be lost"),
-        reset, 0},
+        _("Reset AP. All not uploaded configuration will be lost"), reset, 0},
        {_("TestMode"), _("Put Access Point in test mode"), test, 0},
        {"..", MAIN_MENU, NULL, 0},
        {0, 0, NULL, 0}
@@ -118,8 +110,7 @@ void stat_menu()
        {_("SysInfo"), MENU_SYSINFO, atmel_sysinfo, 0},
        {_("Ethernet"), _("Get ethernet port statistics"), EthStat, 0},
        {_("Wireless"), MENU_WIRELESS, WirelessStat, 0},
-       {_("Stations"), MENU_STAS, stations,
-        0},
+       {_("Stations"), MENU_STAS, atmel_stations, 0},
        {_("KnownAPs"), _("Get info about known Access Points"), APs, 0},
        {"..", MAIN_MENU, NULL, 0},
        {0, 0, NULL, 0}
@@ -133,7 +124,7 @@ void stat_menu()
         {0, 0, NULL, 0}
     };
     
-     switch (ap_type) {
+    switch (ap_type) {
        case ATMEL410:
        case ATMEL12350:
            uni_menu(umenu_atmel, sizeof(umenu_atmel) / sizeof(umenu_atmel[0]));
@@ -146,7 +137,7 @@ void stat_menu()
 
 void _auth()
 {
-    if(get_opts() == 0)
+    if (get_opts() == 0)
        connect_options((unsigned long) NULL, (int) NULL);
 }
 
@@ -164,6 +155,7 @@ void main_menu()
        {_("Exit"), MENU_EXIT, exit_program, 0},
        {0, 0, NULL, 0}
     };
+
     uni_menu(config_umenu, sizeof(config_umenu) / sizeof(config_umenu[0]));
 }