www.usr.com/support/gpl/USR9107_release.1.4.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / inc / wldefs.h
index 52a2014..327f5ba 100755 (executable)
 
 /********************** Global Constants ************************************/
 
+#define WL_NUM_SSID    2
 #define WL_SIZE_2_MAX    2  
 #define WL_SIZE_4_MAX    4  
 #define WL_SIZE_8_MAX    8  
+#define WL_SIZE_132_MAX  132
 #define WL_SM_SIZE_MAX   16
 #define WL_MID_SIZE_MAX  32
 #define WL_SSID_SIZE_MAX 48
+#define WL_MIN_PSK_LEN 8
+#define WL_MAX_PSK_LEN 64
 #define WL_WPA_PSK_SIZE_MAX  72  // max 64 hex or 63 char
 #define WL_RADIUS_KEY_SIZE_MAX  88 // max is 80, limited by nas_wksp.h.  IAS allow up to 128 char
 #define WL_LG_SIZE_MAX   1024
 #define WL_AUTH_WPA2_PSK               "psk2"
 #define WL_AUTH_WPA2_MIX               "wpa2mix"
 #define WL_AUTH_WPA2_PSK_MIX   "psk2mix"
-#ifndef BCMWPA2
-#define WL_WPA_AUTH_DISABLED           0x00ff  /* Legacy (i.e., non-WPA) */
-#define WL_WPA_AUTH_NONE                       0x0000  /* none (IBSS) */
-#define WL_WPA_AUTH_UNSPECIFIED                0x0001  /* over 802.1x */
-#define WL_WPA_AUTH_PSK                                0x0002  /* Pre-shared key */
-#define WPA_AUTH_8021X                                 0x0020          /* 802.1x, reserved */
-#define WL_WPA2_AUTH_UNSPECIFIED       WL_WPA_AUTH_UNSPECIFIED /* over 802.1x */
-#define WL_WPA2_AUTH_PSK                       WL_WPA_AUTH_PSK         /* Pre-shared key */
-#else
 #define WL_WPA_AUTH_DISABLED           0x0000  /* Legacy (i.e., non-WPA) */
 #define WL_WPA_AUTH_NONE                       0x0001  /* none (IBSS) */
 #define WL_WPA_AUTH_UNSPECIFIED                0x0002  /* over 802.1x */
@@ -91,7 +86,6 @@
 #define WL_WPA_AUTH_8021X                      0x0020  /* 802.1x, reserved */
 #define WL_WPA2_AUTH_UNSPECIFIED       0x0040  /* over 802.1x */
 #define WL_WPA2_AUTH_PSK                       0x0080  /* Pre-shared key */
-#endif
 
 /* wireless security bitvec */
 #define WEP_ENABLED      1
@@ -99,6 +93,8 @@
 #define AES_ENABLED      4
 #define WSEC_SWFLAG      8
 
+#define        WPA_CAP_WPA2_PREAUTH            1
+
 #define WL_BIT_KEY_128   0
 #define WL_BIT_KEY_64    1
 
 
 #define WIRELESS_APPID          "WirelessCfg"
 #define WL_VARS_ID              1
-#define WL_FLT_MAC_NUM_ID       2
-#define WL_FLT_MAC_TBL_ID       3
-#define WL_WDS_MAC_NUM_ID       4
-#define WL_WDS_MAC_TBL_ID       5
-#define WL_SCAN_WDS_MAC_NUM_ID  6
-#define WL_SCAN_WDS_MAC_TBL_ID  7
+#define WL_MSSID_VARS_NUM_ID    2
+#define WL_MSSID_VARS_TBL_ID    3
+#define WL_FLT_MAC_NUM_ID       4
+#define WL_FLT_MAC_TBL_ID       5
+#define WL_WDS_MAC_NUM_ID       6
+#define WL_WDS_MAC_TBL_ID       7
+#define WL_SCAN_WDS_MAC_NUM_ID  8
+#define WL_SCAN_WDS_MAC_TBL_ID  9
 
 #define RESET_WLAN     "/var/reset.wlan"
 
 
 #define MAP_FROM_NVRAM 0
 #define MAP_TO_NVRAM   1
-
-
+#define WL_SES_ENTRY   99
+#define MAX_NVPARSE 100
+#define SES_WDS_MODE_DISABLED           0 /* disabled */
+#define SES_WDS_MODE_AUTO               1 /* dynamic cf/cl selection */
+#define SES_WDS_MODE_ENABLED_ALWAYS     2 /* enabled always */
+#define SES_WDS_MODE_ENABLED_EXCL       3 /* WDS-only i.e no regular STAs */
+#define SES_WDS_MODE_CLIENT             4 /* always wds client mode */
+#define REG_MODE_OFF                    0 /* disabled 11h/d mode */
+#define REG_MODE_H                      1 /* use 11h mode */
+#define REG_MODE_D                      2 /* use 11d mode */
 /********************** Global Structs ****************************************/
 
 typedef enum {
@@ -167,40 +173,26 @@ typedef enum {
 } WL_SETUP_TYPE;
 
 typedef struct {
-   char wlSsid[WL_SSID_SIZE_MAX];
-   char wlCountry[WL_SM_SIZE_MAX];
-   char wlKeys128[WL_KEY_NUM][WL_MID_SIZE_MAX];
-   char wlKeys64[WL_KEY_NUM][WL_SM_SIZE_MAX];
-   char wlPreambleType[WL_SM_SIZE_MAX];
-   char wlWpaPsk[WL_WPA_PSK_SIZE_MAX];
-   char wlRadiusKey[WL_RADIUS_KEY_SIZE_MAX];
-   char wlWep[WL_SM_SIZE_MAX];
-   char wlWpa[WL_SM_SIZE_MAX];
-   char wlWds[WL_WDS_NUM][WL_MID_SIZE_MAX];
+   int wlSsidIdx;
    char wlMode[WL_SM_SIZE_MAX];
+   char wlCountry[WL_SM_SIZE_MAX];
    char wlFltMacMode[WL_SM_SIZE_MAX];
    char wlPhyType[WL_SIZE_2_MAX];
    char wlBasicRate[WL_SIZE_8_MAX];
    char wlProtection[WL_SIZE_8_MAX];
+   char wlPreambleType[WL_SM_SIZE_MAX];
    char wlAfterBurnerEn[WL_SIZE_8_MAX];
    char wlFrameBurst[WL_SIZE_4_MAX];
    char wlWlanIfName[WL_SIZE_4_MAX];
-   char wlAuthMode[WL_SIZE_8_MAX];
-   struct in_addr wlRadiusServerIP;
+   char wlWds[WL_WDS_NUM][WL_MID_SIZE_MAX];
    int  wlCoreRev;
-   int  wlWpaGTKRekey;
-   int  wlRadiusPort;
-   int  wlAuth;
    int  wlHide;
    int  wlEnbl;
-   int  wlKeyIndex128;
-   int  wlKeyIndex64;
    int  wlChannel;
    int  wlFrgThrshld;
    int  wlRtsThrshld;
    int  wlDtmIntvl;
    int  wlBcnIntvl;
-   int  wlKeyBit;
    long wlRate;
    int  wlgMode;
    int  wlLazyWds;
@@ -209,14 +201,10 @@ typedef struct {
    int  wlMCastRate;
    int  ezc_version;
    int  ezc_enable;
-   int  is_default;
-   int  is_modified;
    int  wlInfra;
    int  wlAntDiv;
    int wlWme;
    int  wlWmeNoAck;
-   int  wlPreauth;
-   int  wlNetReauth;
 #ifdef SUPPORT_SES   
    int wlSesEnable;
    int  wlSesEvent;
@@ -228,9 +216,44 @@ typedef struct {
    char wlSesAuthMode[WL_SIZE_8_MAX]; 
    char wlSesWep[WL_SM_SIZE_MAX];   
    char wlSesWpa[WL_SM_SIZE_MAX];      
+   int  wlSesWdsMode;      
+   int wlSesClEnable;   
+   int  wlSesClEvent;   
+   char wlWdsWsec[WL_SIZE_132_MAX];      
 #endif   
+   int  wlTxPwrPcnt;
+   int  wlRegMode;
+   int  wlDfsPreIsm;
+   int  wlDfsPostIsm; 
+   int  wlTpcDb;       
 } WIRELESS_VAR, *PWIRELESS_VAR;
 
+typedef struct {
+   char wlSsid[WL_SSID_SIZE_MAX];
+   char wlKeys128[WL_KEY_NUM][WL_MID_SIZE_MAX];
+   char wlKeys64[WL_KEY_NUM][WL_SM_SIZE_MAX];
+   char wlWpaPsk[WL_WPA_PSK_SIZE_MAX];
+   char wlRadiusKey[WL_RADIUS_KEY_SIZE_MAX];
+   char wlWep[WL_SM_SIZE_MAX];
+   char wlWpa[WL_SM_SIZE_MAX];
+   struct in_addr wlRadiusServerIP;
+   char wlAuthMode[WL_SIZE_8_MAX];
+   int  wlWpaGTKRekey;
+   int  wlRadiusPort;
+   int  wlAuth;
+   int  wlEnblSsid;
+   int  wlKeyIndex128;
+   int  wlKeyIndex64;
+   int  wlKeyBit;
+   int  is_default;
+   int  is_modified;
+   int  wlPreauth;
+   int  wlNetReauth;
+   int  wlNasWillrun; /*runtime*/
+   char wlSecurity[WL_SSID_SIZE_MAX];  // USR9108 Quick setup security.
+} WIRELESS_MSSID_VAR, *PWIRELESS_MSSID_VAR;
+
+
 typedef struct {
    char *varName;
    char *varValue;