X-Git-Url: http://git.rot13.org/?p=bcm963xx.git;a=blobdiff_plain;f=userapps%2Fbroadcom%2Fcfm%2Finc%2Fwldefs.h;h=444a9569c178238c47aaf9aeecfab5638c228af0;hp=327f5baf0009179457c16da0449b038a7dc26f46;hb=6adeba4d92a546ebbadde2562283ee6b984b22c1;hpb=dacd86d83a9fb430cca42cb78a67f9d46e289f5c diff --git a/userapps/broadcom/cfm/inc/wldefs.h b/userapps/broadcom/cfm/inc/wldefs.h index 327f5baf..444a9569 100755 --- a/userapps/broadcom/cfm/inc/wldefs.h +++ b/userapps/broadcom/cfm/inc/wldefs.h @@ -1,14 +1,24 @@ +/* +<:copyright-gpl + Copyright 2004 Broadcom Corp. All Rights Reserved. + + This program is free software; you can distribute it and/or modify it + under the terms of the GNU General Public License (Version 2) as + published by the Free Software Foundation. + + This program is distributed in the hope it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +:> +*/ + /***************************************************************************** // -// Copyright (c) 2000-2002 Broadcom Corporation -// All Rights Reserved -// No portions of this material may be reproduced in any form without the -// written permission of: -// Broadcom Corporation -// 16215 Alton Parkway -// Irvine, California 92619 -// All information contained in this document is Broadcom Corporation -// company private, proprietary, and trade secret. // ****************************************************************************** // @@ -60,6 +70,7 @@ #define WL_KEY64_SIZE_CHAR 5 #define WL_KEY128_SIZE_HEX 26 #define WL_KEY128_SIZE_CHAR 13 +#define WL_MAX_ASSOC_STA 128 #define WL_FLT_MAC_OFF "disabled" #define WL_FLT_MAC_ALLOW "allow" @@ -93,6 +104,11 @@ #define AES_ENABLED 4 #define WSEC_SWFLAG 8 +#define TKIP_ONLY "tkip" +#define AES_ONLY "aes" +#define TKIP_AND_AES "tkip+aes" + + #define WPA_CAP_WPA2_PREAUTH 1 #define WL_BIT_KEY_128 0 @@ -101,6 +117,7 @@ #define WL_PHY_TYPE_A "a" #define WL_PHY_TYPE_B "b" #define WL_PHY_TYPE_G "g" +#define WL_PHY_TYPE_N "n" #define WL_BASIC_RATE_DEFAULT "default" #define WL_BASIC_RATE_ALL "all" @@ -127,6 +144,9 @@ #define BAND_A 1 #define BAND_B 2 +#define WL_CHANSPEC_2G 2 +#define WL_CHANSPEC_5G 5 + #define WIRELESS_APPID "WirelessCfg" #define WL_VARS_ID 1 #define WL_MSSID_VARS_NUM_ID 2 @@ -138,8 +158,10 @@ #define WL_SCAN_WDS_MAC_NUM_ID 8 #define WL_SCAN_WDS_MAC_TBL_ID 9 -#define RESET_WLAN "/var/reset.wlan" +#define RESET_WLAN "/var/reset.wlan" +#define RELOAD_VARS_WLAN "/var/reloadvars.wlan" +#define MAIN_BSS_IDX 0 #define MAP_FROM_NVRAM 0 #define MAP_TO_NVRAM 1 @@ -153,6 +175,84 @@ #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 */ + +#define WL_OPMODE_AP "ap" +#define WL_OPMODE_WDS "wds" +#define WL_PREAMBLE_LONG "long" +#define WL_PREAMBLE_SHORT "short" + +// TR69 overrides +#define WL_TR69_BEACONTYPE_NONE 0 +#define WL_TR69_BEACONTYPE_BASIC 1 +#define WL_TR69_BEACONTYPE_WPA 2 +#define WL_TR69_BEACONTYPE_11I 3 +#define WL_TR69_BEACONTYPE_BASIC_AND_WPA 4 +#define WL_TR69_BEACONTYPE_BASIC_AND_11I 5 +#define WL_TR69_BEACONTYPE_WPA_AND_11I 6 +#define WL_TR69_BEACONTYPE_BASIC_AND_WPA_AND_11I 7 + +#define WL_TR69_BASIC_ENCRYPTIONMODE_NONE 0 +#define WL_TR69_BASIC_ENCRYPTIONMODE_WEP 1 + +#define WL_TR69_BASIC_AUTHENTICATION_NONE 0 +#define WL_TR69_BASIC_AUTHENTICATION_EAP 1 + +#define WL_TR69_WPA_ENCRYPTION_MODES_WEP 0 +#define WL_TR69_WPA_ENCRYPTION_MODES_TKIP 1 +#define WL_TR69_WPA_ENCRYPTION_MODES_WEP_AND_TKIP 2 +#define WL_TR69_WPA_ENCRYPTION_MODES_AES 3 +#define WL_TR69_WPA_ENCRYPTION_MODES_WEP_AND_AES 4 +#define WL_TR69_WPA_ENCRYPTION_MODES_TKIP_AND_AES 5 +#define WL_TR69_WPA_ENCRYPTION_MODES_WEP_AND_TKIP_AES 6 + +#define WL_TR69_WPA_AUTHENTICATION_MODE_PSK 0 +#define WL_TR69_WPA_AUTHENTICATION_MODE_EAP 1 + +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_WEP 0 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_TKIP 1 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_WEP_AND_TKIP 2 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_AES 3 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_WEP_AND_AES 4 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_TKIP_AND_AES 5 +#define WL_TR69_IEEE11I_ENCRYPTION_MODES_WEP_AND_TKIP_AES 6 + +#define WL_TR69_IEEE11I_AUTHENTICATION_MODE_PSK 0 +#define WL_TR69_IEEE11I_AUTHENTICATION_MODE_EAP 1 + +/* mimo */ +#define WL_CTL_SB_LOWER -1 +#define WL_CTL_SB_NONE 0 +#define WL_CTL_SB_UPPER 1 +/* defines used by the nrate iovar */ +#define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */ +#define NRATE_STF_SHIFT 8 /* stf mode shift */ +#define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */ +#define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */ +/* notify the average dma xfer rate (in kbps) to the driver */ +#define AVG_DMA_XFER_RATE 100000 + +/* A chanspec holds the channel number, band, bandwidth and control sideband */ +typedef int chanspec_t; +#define WL_CHANSPEC_CHAN_MASK 0x00ff + +#define WL_CHANSPEC_CTL_SB_MASK 0x0300 +#define WL_CHANSPEC_CTL_SB_SHIFT 8 +#define WL_CHANSPEC_CTL_SB_LOWER 0x0100 +#define WL_CHANSPEC_CTL_SB_UPPER 0x0200 +#define WL_CHANSPEC_CTL_SB_NONE 0x0300 + +#define WL_CHANSPEC_BW_MASK 0x0C00 +#define WL_CHANSPEC_BW_SHIFT 10 +#define WL_CHANSPEC_BW_10 0x0400 +#define WL_CHANSPEC_BW_20 0x0800 +#define WL_CHANSPEC_BW_40 0x0C00 + +#define WL_CHANSPEC_BAND_MASK 0xf000 +#define WL_CHANSPEC_BAND_SHIFT 12 +#define WL_CHANSPEC_BAND_5G 0x1000 +#define WL_CHANSPEC_BAND_2G 0x2000 +#define INVCHANSPEC 255 + /********************** Global Structs ****************************************/ typedef enum { @@ -205,6 +305,13 @@ typedef struct { int wlAntDiv; int wlWme; int wlWmeNoAck; + int wlTxPwrPcnt; + int wlRegMode; + int wlDfsPreIsm; + int wlDfsPostIsm; + int wlTpcDb; + int wlCsScanTimer; + int wlMaxAssoc; #ifdef SUPPORT_SES int wlSesEnable; int wlSesEvent; @@ -219,13 +326,20 @@ typedef struct { int wlSesWdsMode; int wlSesClEnable; int wlSesClEvent; - char wlWdsWsec[WL_SIZE_132_MAX]; + char wlWdsWsec[WL_SIZE_132_MAX]; #endif - int wlTxPwrPcnt; - int wlRegMode; - int wlDfsPreIsm; - int wlDfsPostIsm; - int wlTpcDb; +#ifdef SUPPORT_MIMO + int wlNBw; + int wlNCtrlsb; + int wlNBand; + int wlNMcsidx; + char wlNProtection[WL_SIZE_8_MAX]; + char wlRifs[WL_SIZE_8_MAX]; + char wlAmpdu[WL_SIZE_8_MAX]; + char wlAmsdu[WL_SIZE_8_MAX]; + char wlNmode[WL_SIZE_8_MAX]; + int wlNReqd; +#endif } WIRELESS_VAR, *PWIRELESS_VAR; typedef struct { @@ -251,6 +365,15 @@ typedef struct { int wlNetReauth; int wlNasWillrun; /*runtime*/ char wlSecurity[WL_SSID_SIZE_MAX]; // USR9108 Quick setup security. +#ifdef SUPPORT_TR69C + int tr69cBeaconType; + int tr69cBasicEncryptionModes; + int tr69cBasicAuthenticationMode; + int tr69cWPAEncryptionModes; + int tr69cWPAAuthenticationMode; + int tr69cIEEE11iEncryptionModes; + int tr69cIEEE11iAuthenticationMode; +#endif } WIRELESS_MSSID_VAR, *PWIRELESS_MSSID_VAR; @@ -274,5 +397,10 @@ typedef struct { char authorized; } WL_STATION_LIST_ENTRY, *PWL_STATION_LIST_ENTRY; +// PSI Data +typedef struct { + WIRELESS_VAR wlVar; + WIRELESS_MSSID_VAR wlMssidVar[WL_NUM_SSID]; +} WIRELESS_PSI_VARS; #endif