summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlags49_h2
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2011-09-16 00:20:48 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-16 20:34:52 +0200
commit543fd0a349dbb2f6ab896ec97cedbbd6fe4d1ee6 (patch)
tree5a16aab08f8966bb18d7e24697b8d881e18252de /drivers/staging/wlags49_h2
parent788c2bce7e06f9fd682a7a2db9d6b823e1d18d44 (diff)
staging: wlags49_h2: Reindent hcf.c
Untabify with tab-width set to 4 (to match VI header). Then reindent with tab-width reset to 8. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r--drivers/staging/wlags49_h2/hcf.c6070
1 files changed, 3035 insertions, 3035 deletions
diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c
index 85950d74f8f8..304258e20255 100644
--- a/drivers/staging/wlags49_h2/hcf.c
+++ b/drivers/staging/wlags49_h2/hcf.c
@@ -1,97 +1,96 @@
-// vim:tw=110:ts=4:
/************************************************************************************************************
-*
-* FILE : HCF.C
-*
-* DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.10 $
-* Original: 2004/06/02 10:22:22 Revision: 1.85 Tag: hcf7_t20040602_01
-* Original: 2004/04/15 09:24:41 Revision: 1.63 Tag: hcf7_t7_20040415_01
-* Original: 2004/04/13 14:22:44 Revision: 1.62 Tag: t7_20040413_01
-* Original: 2004/04/01 15:32:55 Revision: 1.59 Tag: t7_20040401_01
-* Original: 2004/03/10 15:39:27 Revision: 1.55 Tag: t20040310_01
-* Original: 2004/03/04 11:03:37 Revision: 1.53 Tag: t20040304_01
-* Original: 2004/03/02 14:51:21 Revision: 1.50 Tag: t20040302_03
-* Original: 2004/02/24 13:00:27 Revision: 1.43 Tag: t20040224_01
-* Original: 2004/02/19 10:57:25 Revision: 1.39 Tag: t20040219_01
-*
-* AUTHOR : Nico Valster
-*
-* SPECIFICATION: ........
-*
-* DESCRIPTION : HCF Routines for Hermes-II (callable via the Wireless Connection I/F or WCI)
-* Local Support Routines for above procedures
-*
-* Customizable via HCFCFG.H, which is included by HCF.H
-*
-*************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software. Using this
-* software indicates your acceptance of these terms and conditions. If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
-* COPYRIGHT © 1996 - 2000 by Lucent Technologies. All Rights Reserved
-* COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following Disclaimer as comments in the code as
-* well as in the documentation and/or other materials provided with the
-* distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following Disclaimer in the documentation
-* and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-************************************************************************************************************/
+ *
+ * FILE : HCF.C
+ *
+ * DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.10 $
+ * Original: 2004/06/02 10:22:22 Revision: 1.85 Tag: hcf7_t20040602_01
+ * Original: 2004/04/15 09:24:41 Revision: 1.63 Tag: hcf7_t7_20040415_01
+ * Original: 2004/04/13 14:22:44 Revision: 1.62 Tag: t7_20040413_01
+ * Original: 2004/04/01 15:32:55 Revision: 1.59 Tag: t7_20040401_01
+ * Original: 2004/03/10 15:39:27 Revision: 1.55 Tag: t20040310_01
+ * Original: 2004/03/04 11:03:37 Revision: 1.53 Tag: t20040304_01
+ * Original: 2004/03/02 14:51:21 Revision: 1.50 Tag: t20040302_03
+ * Original: 2004/02/24 13:00:27 Revision: 1.43 Tag: t20040224_01
+ * Original: 2004/02/19 10:57:25 Revision: 1.39 Tag: t20040219_01
+ *
+ * AUTHOR : Nico Valster
+ *
+ * SPECIFICATION: ........
+ *
+ * DESCRIPTION : HCF Routines for Hermes-II (callable via the Wireless Connection I/F or WCI)
+ * Local Support Routines for above procedures
+ *
+ * Customizable via HCFCFG.H, which is included by HCF.H
+ *
+ *************************************************************************************************************
+ *
+ *
+ * SOFTWARE LICENSE
+ *
+ * This software is provided subject to the following terms and conditions,
+ * which you should read carefully before using the software. Using this
+ * software indicates your acceptance of these terms and conditions. If you do
+ * not agree with these terms and conditions, do not use the software.
+ *
+ * COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
+ * COPYRIGHT © 1996 - 2000 by Lucent Technologies. All Rights Reserved
+ * COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
+ * All rights reserved.
+ *
+ * Redistribution and use in source or binary forms, with or without
+ * modifications, are permitted provided that the following conditions are met:
+ *
+ * . Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following Disclaimer as comments in the code as
+ * well as in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * . Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following Disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * . Neither the name of Agere Systems Inc. nor the names of the contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * Disclaimer
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
+ * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
+ * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ *
+ ************************************************************************************************************/
/************************************************************************************************************
-**
-** Implementation Notes
-**
-* - a leading marker of //! is used. The purpose of such a sequence is to help to understand the flow
-* An example is: //!rc = HCF_SUCCESS;
-* if this is superfluous because rc is already guaranteed to be 0 but it shows to the (maintenance)
-* programmer it is an intentional omission at the place where someone could consider it most appropriate at
-* first glance
-* - using near pointers in a model where ss!=ds is an invitation for disaster, so be aware of how you specify
-* your model and how you define variables which are used at interrupt time
-* - remember that sign extension on 32 bit platforms may cause problems unless code is carefully constructed,
-* e.g. use "(hcf_16)~foo" rather than "~foo"
-*
-************************************************************************************************************/
+ **
+ ** Implementation Notes
+ **
+ * - a leading marker of //! is used. The purpose of such a sequence is to help to understand the flow
+ * An example is: //!rc = HCF_SUCCESS;
+ * if this is superfluous because rc is already guaranteed to be 0 but it shows to the (maintenance)
+ * programmer it is an intentional omission at the place where someone could consider it most appropriate at
+ * first glance
+ * - using near pointers in a model where ss!=ds is an invitation for disaster, so be aware of how you specify
+ * your model and how you define variables which are used at interrupt time
+ * - remember that sign extension on 32 bit platforms may cause problems unless code is carefully constructed,
+ * e.g. use "(hcf_16)~foo" rather than "~foo"
+ *
+ ************************************************************************************************************/
-#include "hcf.h" // HCF and MSF common include file
-#include "hcfdef.h" // HCF specific include file
-#include "mmd.h" // MoreModularDriver common include file
+#include "hcf.h" // HCF and MSF common include file
+#include "hcfdef.h" // HCF specific include file
+#include "mmd.h" // MoreModularDriver common include file
#include <linux/kernel.h>
#if ! defined offsetof
@@ -102,56 +101,56 @@
/***********************************************************************************************************/
/*************************************** PROTOTYPES ******************************************************/
/***********************************************************************************************************/
-HCF_STATIC int cmd_exe( IFBP ifbp, hcf_16 cmd_code, hcf_16 par_0 );
-HCF_STATIC int init( IFBP ifbp );
-HCF_STATIC int put_info( IFBP ifbp, LTVP ltvp );
+HCF_STATIC int cmd_exe( IFBP ifbp, hcf_16 cmd_code, hcf_16 par_0 );
+HCF_STATIC int init( IFBP ifbp );
+HCF_STATIC int put_info( IFBP ifbp, LTVP ltvp );
#if (HCF_EXT) & HCF_EXT_MB
-HCF_STATIC int put_info_mb( IFBP ifbp, CFG_MB_INFO_STRCT FAR * ltvp );
+HCF_STATIC int put_info_mb( IFBP ifbp, CFG_MB_INFO_STRCT FAR * ltvp );
#endif // HCF_EXT_MB
#if (HCF_TYPE) & HCF_TYPE_WPA
-HCF_STATIC void calc_mic( hcf_32* p, hcf_32 M );
-void calc_mic_rx_frag( IFBP ifbp, wci_bufp p, int len );
-void calc_mic_tx_frag( IFBP ifbp, wci_bufp p, int len );
-HCF_STATIC int check_mic( IFBP ifbp );
+HCF_STATIC void calc_mic( hcf_32* p, hcf_32 M );
+void calc_mic_rx_frag( IFBP ifbp, wci_bufp p, int len );
+void calc_mic_tx_frag( IFBP ifbp, wci_bufp p, int len );
+HCF_STATIC int check_mic( IFBP ifbp );
#endif // HCF_TYPE_WPA
-HCF_STATIC void calibrate( IFBP ifbp );
-HCF_STATIC int cmd_cmpl( IFBP ifbp );
-HCF_STATIC hcf_16 get_fid( IFBP ifbp );
-HCF_STATIC void isr_info( IFBP ifbp );
+HCF_STATIC void calibrate( IFBP ifbp );
+HCF_STATIC int cmd_cmpl( IFBP ifbp );
+HCF_STATIC hcf_16 get_fid( IFBP ifbp );
+HCF_STATIC void isr_info( IFBP ifbp );
#if HCF_DMA
-HCF_STATIC DESC_STRCT* get_frame_lst(IFBP ifbp, int tx_rx_flag);
+HCF_STATIC DESC_STRCT* get_frame_lst(IFBP ifbp, int tx_rx_flag);
#endif // HCF_DMA
-HCF_STATIC void get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) ); //char*, byte count (usually even)
+HCF_STATIC void get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) ); //char*, byte count (usually even)
#if HCF_DMA
-HCF_STATIC void put_frame_lst( IFBP ifbp, DESC_STRCT *descp, int tx_rx_flag );
+HCF_STATIC void put_frame_lst( IFBP ifbp, DESC_STRCT *descp, int tx_rx_flag );
#endif // HCF_DMA
-HCF_STATIC void put_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) );
-HCF_STATIC void put_frag_finalize( IFBP ifbp );
-HCF_STATIC int setup_bap( IFBP ifbp, hcf_16 fid, int offset, int type );
+HCF_STATIC void put_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) );
+HCF_STATIC void put_frag_finalize( IFBP ifbp );
+HCF_STATIC int setup_bap( IFBP ifbp, hcf_16 fid, int offset, int type );
#if (HCF_ASSERT) & HCF_ASSERT_PRINTF
static int fw_printf(IFBP ifbp, CFG_FW_PRINTF_STRCT FAR *ltvp);
#endif // HCF_ASSERT_PRINTF
-HCF_STATIC int download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp );
+HCF_STATIC int download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp );
#if (HCF_ENCAP) & HCF_ENC
-HCF_STATIC hcf_8 hcf_encap( wci_bufp type );
+HCF_STATIC hcf_8 hcf_encap( wci_bufp type );
#endif // HCF_ENCAP
-HCF_STATIC hcf_8 null_addr[4] = { 0, 0, 0, 0 };
-#if ! defined IN_PORT_WORD //replace I/O Macros with logging facility
+HCF_STATIC hcf_8 null_addr[4] = { 0, 0, 0, 0 };
+#if ! defined IN_PORT_WORD //replace I/O Macros with logging facility
extern FILE *log_file;
-#define IN_PORT_WORD(port) in_port_word( (hcf_io)(port) )
+#define IN_PORT_WORD(port) in_port_word( (hcf_io)(port) )
static hcf_16 in_port_word( hcf_io port ) {
-hcf_16 i = (hcf_16)_inpw( port );
+ hcf_16 i = (hcf_16)_inpw( port );
if ( log_file ) {
fprintf( log_file, "\nR %2.2x %4.4x", (port)&0xFF, i);
}
return i;
} // in_port_word
-#define OUT_PORT_WORD(port, value) out_port_word( (hcf_io)(port), (hcf_16)(value) )
+#define OUT_PORT_WORD(port, value) out_port_word( (hcf_io)(port), (hcf_16)(value) )
static void out_port_word( hcf_io port, hcf_16 value ) {
_outpw( port, value );
@@ -160,12 +159,12 @@ static void out_port_word( hcf_io port, hcf_16 value ) {
}
}
-void IN_PORT_STRING_32( hcf_io prt, hcf_32 FAR * dst, int n) {
+void IN_PORT_STRING_32( hcf_io prt, hcf_32 FAR * dst, int n) {
int i = 0;
hcf_16 FAR * p;
if ( log_file ) {
fprintf( log_file, "\nread string_32 length %04x (%04d) at port %02.2x to addr %lp",
- (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst);
+ (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst);
}
while ( n-- ) {
p = (hcf_16 FAR *)dst;
@@ -178,12 +177,12 @@ void IN_PORT_STRING_32( hcf_io prt, hcf_32 FAR * dst, int n) {
}
} // IN_PORT_STRING_32
-void IN_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * dst, int n) { //also handles byte alignment problems
- hcf_16 FAR * p = (hcf_16 FAR *)dst; //this needs more elaborate code in non-x86 platforms
+void IN_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * dst, int n) { //also handles byte alignment problems
+ hcf_16 FAR * p = (hcf_16 FAR *)dst; //this needs more elaborate code in non-x86 platforms
int i = 0;
if ( log_file ) {
fprintf( log_file, "\nread string_16 length %04x (%04d) at port %02.2x to addr %lp",
- (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst );
+ (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst );
}
while ( n-- ) {
*p =(hcf_16)_inpw( prt);
@@ -198,12 +197,12 @@ void IN_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * dst, int n) { //also handles b
}
} // IN_PORT_STRING_8_16
-void OUT_PORT_STRING_32( hcf_io prt, hcf_32 FAR * src, int n) {
+void OUT_PORT_STRING_32( hcf_io prt, hcf_32 FAR * src, int n) {
int i = 0;
hcf_16 FAR * p;
if ( log_file ) {
fprintf( log_file, "\nwrite string_32 length %04x (%04d) at port %02.2x",
- (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF);
+ (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF);
}
while ( n-- ) {
p = (hcf_16 FAR *)src;
@@ -216,8 +215,8 @@ void OUT_PORT_STRING_32( hcf_io prt, hcf_32 FAR * src, int n) {
}
} // OUT_PORT_STRING_32
-void OUT_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * src, int n) { //also handles byte alignment problems
- hcf_16 FAR * p = (hcf_16 FAR *)src; //this needs more elaborate code in non-x86 platforms
+void OUT_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * src, int n) { //also handles byte alignment problems
+ hcf_16 FAR * p = (hcf_16 FAR *)src; //this needs more elaborate code in non-x86 platforms
int i = 0;
if ( log_file ) {
fprintf( log_file, "\nwrite string_16 length %04x (%04d) at port %04x", n, n, (hcf_16)prt);
@@ -238,27 +237,27 @@ void OUT_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * src, int n) { //also handles
#endif // IN_PORT_WORD
/************************************************************************************************************
-******************************* D A T A D E F I N I T I O N S ********************************************
-************************************************************************************************************/
+ ******************************* D A T A D E F I N I T I O N S ********************************************
+ ************************************************************************************************************/
#if HCF_ASSERT
-IFBP BASED assert_ifbp = NULL; //to make asserts easily work under MMD and DHF
+IFBP BASED assert_ifbp = NULL; //to make asserts easily work under MMD and DHF
#endif // HCF_ASSERT
#if HCF_ENCAP
/* SNAP header to be inserted in Ethernet-II frames */
-HCF_STATIC hcf_8 BASED snap_header[] = { 0xAA, 0xAA, 0x03, 0x00, 0x00, //5 bytes signature +
- 0 }; //1 byte protocol identifier
+HCF_STATIC hcf_8 BASED snap_header[] = { 0xAA, 0xAA, 0x03, 0x00, 0x00, //5 bytes signature +
+ 0 }; //1 byte protocol identifier
#endif // HCF_ENCAP
#if (HCF_TYPE) & HCF_TYPE_WPA
-HCF_STATIC hcf_8 BASED mic_pad[8] = { 0x5A, 0, 0, 0, 0, 0, 0, 0 }; //MIC padding of message
+HCF_STATIC hcf_8 BASED mic_pad[8] = { 0x5A, 0, 0, 0, 0, 0, 0, 0 }; //MIC padding of message
#endif // HCF_TYPE_WPA
#if defined MSF_COMPONENT_ID
CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
- sizeof(cfg_drv_identity)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_IDENTITY, // (0x0826)
+ sizeof(cfg_drv_identity)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_IDENTITY, // (0x0826)
MSF_COMPONENT_ID,
MSF_COMPONENT_VAR,
MSF_COMPONENT_MAJOR_VER,
@@ -266,186 +265,186 @@ CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
} ;
CFG_RANGES_STRCT BASED cfg_drv_sup_range = {
- sizeof(cfg_drv_sup_range)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_SUP_RANGE, // (0x0827)
+ sizeof(cfg_drv_sup_range)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_SUP_RANGE, // (0x0827)
COMP_ROLE_SUPL,
COMP_ID_DUI,
- {{ DUI_COMPAT_VAR,
- DUI_COMPAT_BOT,
- DUI_COMPAT_TOP
+ {{ DUI_COMPAT_VAR,
+ DUI_COMPAT_BOT,
+ DUI_COMPAT_TOP
}}
} ;
struct CFG_RANGE3_STRCT BASED cfg_drv_act_ranges_pri = {
- sizeof(cfg_drv_act_ranges_pri)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_ACT_RANGES_PRI, // (0x0828)
+ sizeof(cfg_drv_act_ranges_pri)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_ACT_RANGES_PRI, // (0x0828)
COMP_ROLE_ACT,
COMP_ID_PRI,
{
- { 0, 0, 0 }, // HCF_PRI_VAR_1 not supported by HCF 7
- { 0, 0, 0 }, // HCF_PRI_VAR_2 not supported by HCF 7
- { 3, //var_rec[2] - Variant number
- CFG_DRV_ACT_RANGES_PRI_3_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_PRI_3_TOP // - Top Compatibility
- }
+ { 0, 0, 0 }, // HCF_PRI_VAR_1 not supported by HCF 7
+ { 0, 0, 0 }, // HCF_PRI_VAR_2 not supported by HCF 7
+ { 3, //var_rec[2] - Variant number
+ CFG_DRV_ACT_RANGES_PRI_3_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_PRI_3_TOP // - Top Compatibility
+ }
}
} ;
struct CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_sta = {
- sizeof(cfg_drv_act_ranges_sta)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_ACT_RANGES_STA, // (0x0829)
+ sizeof(cfg_drv_act_ranges_sta)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_ACT_RANGES_STA, // (0x0829)
COMP_ROLE_ACT,
COMP_ID_STA,
{
#if defined HCF_STA_VAR_1
- { 1, //var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_STA_1_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_STA_1_TOP // - Top Compatibility
- },
+ { 1, //var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_STA_1_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_STA_1_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_STA_VAR_1
#if defined HCF_STA_VAR_2
- { 2, //var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_STA_2_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_STA_2_TOP // - Top Compatibility
- },
+ { 2, //var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_STA_2_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_STA_2_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_STA_VAR_2
// For Native_USB (Not used!)
#if defined HCF_STA_VAR_3
- { 3, //var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_STA_3_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_STA_3_TOP // - Top Compatibility
- },
+ { 3, //var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_STA_3_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_STA_3_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_STA_VAR_3
// Warp
#if defined HCF_STA_VAR_4
- { 4, //var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_STA_4_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_STA_4_TOP // - Top Compatibility
- }
+ { 4, //var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_STA_4_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_STA_4_TOP // - Top Compatibility
+ }
#else
- { 0, 0, 0 }
+ { 0, 0, 0 }
#endif // HCF_STA_VAR_4
}
} ;
struct CFG_RANGE6_STRCT BASED cfg_drv_act_ranges_hsi = {
- sizeof(cfg_drv_act_ranges_hsi)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_ACT_RANGES_HSI, // (0x082A)
+ sizeof(cfg_drv_act_ranges_hsi)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_ACT_RANGES_HSI, // (0x082A)
COMP_ROLE_ACT,
COMP_ID_HSI,
{
-#if defined HCF_HSI_VAR_0 // Controlled deployment
- { 0, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_HSI_0_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_HSI_0_TOP // - Top Compatibility
- },
+#if defined HCF_HSI_VAR_0 // Controlled deployment
+ { 0, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_HSI_0_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_HSI_0_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_HSI_VAR_0
- { 0, 0, 0 }, // HCF_HSI_VAR_1 not supported by HCF 7
- { 0, 0, 0 }, // HCF_HSI_VAR_2 not supported by HCF 7
- { 0, 0, 0 }, // HCF_HSI_VAR_3 not supported by HCF 7
-#if defined HCF_HSI_VAR_4 // Hermes-II all types
- { 4, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_HSI_4_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_HSI_4_TOP // - Top Compatibility
- },
+ { 0, 0, 0 }, // HCF_HSI_VAR_1 not supported by HCF 7
+ { 0, 0, 0 }, // HCF_HSI_VAR_2 not supported by HCF 7
+ { 0, 0, 0 }, // HCF_HSI_VAR_3 not supported by HCF 7
+#if defined HCF_HSI_VAR_4 // Hermes-II all types
+ { 4, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_HSI_4_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_HSI_4_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_HSI_VAR_4
-#if defined HCF_HSI_VAR_5 // WARP Hermes-2.5
- { 5, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_HSI_5_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_HSI_5_TOP // - Top Compatibility
- }
+#if defined HCF_HSI_VAR_5 // WARP Hermes-2.5
+ { 5, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_HSI_5_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_HSI_5_TOP // - Top Compatibility
+ }
#else
- { 0, 0, 0 }
+ { 0, 0, 0 }
#endif // HCF_HSI_VAR_5
}
} ;
CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_apf = {
- sizeof(cfg_drv_act_ranges_apf)/sizeof(hcf_16) - 1, //length of RID
- CFG_DRV_ACT_RANGES_APF, // (0x082B)
+ sizeof(cfg_drv_act_ranges_apf)/sizeof(hcf_16) - 1, //length of RID
+ CFG_DRV_ACT_RANGES_APF, // (0x082B)
COMP_ROLE_ACT,
COMP_ID_APF,
{
-#if defined HCF_APF_VAR_1 //(Fake) Hermes-I
- { 1, //var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_APF_1_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_APF_1_TOP // - Top Compatibility
- },
+#if defined HCF_APF_VAR_1 //(Fake) Hermes-I
+ { 1, //var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_APF_1_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_APF_1_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_APF_VAR_1
-#if defined HCF_APF_VAR_2 //Hermes-II
- { 2, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_APF_2_BOTTOM, // - Bottom Compatibility
- CFG_DRV_ACT_RANGES_APF_2_TOP // - Top Compatibility
- },
+#if defined HCF_APF_VAR_2 //Hermes-II
+ { 2, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_APF_2_BOTTOM, // - Bottom Compatibility
+ CFG_DRV_ACT_RANGES_APF_2_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_APF_VAR_2
-#if defined HCF_APF_VAR_3 // Native_USB
- { 3, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_APF_3_BOTTOM, // - Bottom Compatibility !!!!!see note below!!!!!!!
- CFG_DRV_ACT_RANGES_APF_3_TOP // - Top Compatibility
- },
+#if defined HCF_APF_VAR_3 // Native_USB
+ { 3, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_APF_3_BOTTOM, // - Bottom Compatibility !!!!!see note below!!!!!!!
+ CFG_DRV_ACT_RANGES_APF_3_TOP // - Top Compatibility
+ },
#else
- { 0, 0, 0 },
+ { 0, 0, 0 },
#endif // HCF_APF_VAR_3
-#if defined HCF_APF_VAR_4 // WARP Hermes 2.5
- { 4, // var_rec[1] - Variant number
- CFG_DRV_ACT_RANGES_APF_4_BOTTOM, // - Bottom Compatibility !!!!!see note below!!!!!!!
- CFG_DRV_ACT_RANGES_APF_4_TOP // - Top Compatibility
- }
+#if defined HCF_APF_VAR_4 // WARP Hermes 2.5
+ { 4, // var_rec[1] - Variant number
+ CFG_DRV_ACT_RANGES_APF_4_BOTTOM, // - Bottom Compatibility !!!!!see note below!!!!!!!
+ CFG_DRV_ACT_RANGES_APF_4_TOP // - Top Compatibility
+ }
#else
- { 0, 0, 0 }
+ { 0, 0, 0 }
#endif // HCF_APF_VAR_4
}
} ;
#define HCF_VERSION TEXT( "HCF$Revision: 1.10 $" )
static struct /*CFG_HCF_OPT_STRCT*/ {
- hcf_16 len; //length of cfg_hcf_opt struct
- hcf_16 typ; //type 0x082C
- hcf_16 v0; //offset HCF_VERSION
- hcf_16 v1; // MSF_COMPONENT_ID
- hcf_16 v2; // HCF_ALIGN
- hcf_16 v3; // HCF_ASSERT
- hcf_16 v4; // HCF_BIG_ENDIAN
- hcf_16 v5; // /* HCF_DLV | HCF_DLNV */
- hcf_16 v6; // HCF_DMA
- hcf_16 v7; // HCF_ENCAP
- hcf_16 v8; // HCF_EXT
- hcf_16 v9; // HCF_INT_ON
- hcf_16 v10; // HCF_IO
- hcf_16 v11; // HCF_LEGACY
- hcf_16 v12; // HCF_MAX_LTV
- hcf_16 v13; // HCF_PROT_TIME
- hcf_16 v14; // HCF_SLEEP
- hcf_16 v15; // HCF_TALLIES
- hcf_16 v16; // HCF_TYPE
- hcf_16 v17; // HCF_NIC_TAL_CNT
- hcf_16 v18; // HCF_HCF_TAL_CNT
- hcf_16 v19; // offset tallies
- TCHAR val[sizeof(HCF_VERSION)];
+ hcf_16 len; //length of cfg_hcf_opt struct
+ hcf_16 typ; //type 0x082C
+ hcf_16 v0; //offset HCF_VERSION
+ hcf_16 v1; // MSF_COMPONENT_ID
+ hcf_16 v2; // HCF_ALIGN
+ hcf_16 v3; // HCF_ASSERT
+ hcf_16 v4; // HCF_BIG_ENDIAN
+ hcf_16 v5; // /* HCF_DLV | HCF_DLNV */
+ hcf_16 v6; // HCF_DMA
+ hcf_16 v7; // HCF_ENCAP
+ hcf_16 v8; // HCF_EXT
+ hcf_16 v9; // HCF_INT_ON
+ hcf_16 v10; // HCF_IO
+ hcf_16 v11; // HCF_LEGACY
+ hcf_16 v12; // HCF_MAX_LTV
+ hcf_16 v13; // HCF_PROT_TIME
+ hcf_16 v14; // HCF_SLEEP
+ hcf_16 v15; // HCF_TALLIES
+ hcf_16 v16; // HCF_TYPE
+ hcf_16 v17; // HCF_NIC_TAL_CNT
+ hcf_16 v18; // HCF_HCF_TAL_CNT
+ hcf_16 v19; // offset tallies
+ TCHAR val[sizeof(HCF_VERSION)];
} BASED cfg_hcf_opt = {
sizeof(cfg_hcf_opt)/sizeof(hcf_16) -1,
- CFG_HCF_OPT, // (0x082C)
+ CFG_HCF_OPT, // (0x082C)
( sizeof(cfg_hcf_opt) - sizeof(HCF_VERSION) - 4 )/sizeof(hcf_16),
#if defined MSF_COMPONENT_ID
MSF_COMPONENT_ID,
@@ -455,7 +454,7 @@ static struct /*CFG_HCF_OPT_STRCT*/ {
HCF_ALIGN,
HCF_ASSERT,
HCF_BIG_ENDIAN,
- 0, // /* HCF_DLV | HCF_DLNV*/,
+ 0, // /* HCF_DLV | HCF_DLNV*/,
HCF_DMA,
HCF_ENCAP,
HCF_EXT,
@@ -488,208 +487,208 @@ HCF_STATIC LTV_STRCT BASED cfg_null = { 1, CFG_NULL, {0} };
#endif // HCF_EXT_MB
HCF_STATIC hcf_16* BASED xxxx[ ] = {
#if (HCF_EXT) & HCF_EXT_MB
- &cfg_null.len, //CFG_NULL 0x0820
+ &cfg_null.len, //CFG_NULL 0x0820
#endif // HCF_EXT_MB
#if defined MSF_COMPONENT_ID
- &cfg_drv_identity.len, //CFG_DRV_IDENTITY 0x0826
- &cfg_drv_sup_range.len, //CFG_DRV_SUP_RANGE 0x0827
- &cfg_drv_act_ranges_pri.len, //CFG_DRV_ACT_RANGES_PRI 0x0828
- &cfg_drv_act_ranges_sta.len, //CFG_DRV_ACT_RANGES_STA 0x0829
- &cfg_drv_act_ranges_hsi.len, //CFG_DRV_ACT_RANGES_HSI 0x082A
- &cfg_drv_act_ranges_apf.len, //CFG_DRV_ACT_RANGES_APF 0x082B
- &cfg_hcf_opt.len, //CFG_HCF_OPT 0x082C
- NULL, //IFB_PRIIdentity placeholder 0xFD02
- NULL, //IFB_PRISup placeholder 0xFD03
+ &cfg_drv_identity.len, //CFG_DRV_IDENTITY 0x0826
+ &cfg_drv_sup_range.len, //CFG_DRV_SUP_RANGE 0x0827
+ &cfg_drv_act_ranges_pri.len, //CFG_DRV_ACT_RANGES_PRI 0x0828
+ &cfg_drv_act_ranges_sta.len, //CFG_DRV_ACT_RANGES_STA 0x0829
+ &cfg_drv_act_ranges_hsi.len, //CFG_DRV_ACT_RANGES_HSI 0x082A
+ &cfg_drv_act_ranges_apf.len, //CFG_DRV_ACT_RANGES_APF 0x082B
+ &cfg_hcf_opt.len, //CFG_HCF_OPT 0x082C
+ NULL, //IFB_PRIIdentity placeholder 0xFD02
+ NULL, //IFB_PRISup placeholder 0xFD03
#endif // MSF_COMPONENT_ID
- NULL //endsentinel
- };
-#define xxxx_PRI_IDENTITY_OFFSET (ARRAY_SIZE(xxxx) - 3)
+ NULL //endsentinel
+};
+#define xxxx_PRI_IDENTITY_OFFSET (ARRAY_SIZE(xxxx) - 3)
#endif // MSF_COMPONENT_ID / HCF_EXT_MB
/************************************************************************************************************
-************************** T O P L E V E L H C F R O U T I N E S **************************************
-************************************************************************************************************/
+ ************************** T O P L E V E L H C F R O U T I N E S **************************************
+ ************************************************************************************************************/
#if (HCF_DL_ONLY) == 0
/************************************************************************************************************
-*
-*.MODULE int hcf_action( IFBP ifbp, hcf_16 action )
-*.PURPOSE Changes the run-time Card behavior.
-* Performs Miscellanuous actions.
-*
-*.ARGUMENTS
-* ifbp address of the Interface Block
-* action number identifying the type of change
-* - HCF_ACT_CCX_OFF disable CKIP
-* - HCF_ACT_CCX_ON enable CKIP
-* - HCF_ACT_INT_FORCE_ON enable interrupt generation by WaveLAN NIC
-* - HCF_ACT_INT_OFF disable interrupt generation by WaveLAN NIC
-* - HCF_ACT_INT_ON compensate 1 HCF_ACT_INT_OFF, enable interrupt generation if balance reached
-* - HCF_ACT_PRS_SCAN Hermes Probe Respons Scan (F102) command
-* - HCF_ACT_RX_ACK acknowledge non-DMA receiver to Hermes
-* - HCF_ACT_SCAN Hermes Inquire Scan (F101) command (non-WARP only)
-* - HCF_ACT_SLEEP DDS Sleep request
-* - HCF_ACT_TALLIES Hermes Inquire Tallies (F100) command
-*
-*.RETURNS
-* HCF_SUCCESS all (including invalid)
-* HCF_INT_PENDING HCF_ACT_INT_OFF, interrupt pending
-* HCF_ERR_NO_NIC HCF_ACT_INT_OFF, NIC presence check fails
-*
-*.CONDITIONS
-* Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O
-* address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceded by a call of hcf_action with
-* HCF_ACT_INT_OFF as parameter.
-* Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF )
-* was called.
-*
-*.DESCRIPTION
-* hcf_action supports the following mode changing action-code pairs that are antonyms
-* - HCF_ACT_CCX_OFF / HCF_ACT_CCX_ON
-* - HCF_ACT_INT_[FORCE_]ON / HCF_ACT_INT_OFF
-*
-* Additionally hcf_action can start the following actions in the NIC:
-* - HCF_ACT_PRS_SCAN
-* - HCF_ACT_RX_ACK
-* - HCF_ACT_SCAN
-* - HCF_ACT_SLEEP
-* - HCF_ACT_TALLIES
-*
-* o HCF_ACT_INT_OFF: Sets NIC Interrupts mode Disabled.
-* This command, and the associated [Force] Enable NIC interrupts command, are only available if the HCF_INT_ON
-* compile time option is not set at 0x0000.
-*
-* o HCF_ACT_INT_ON: Sets NIC Interrupts mode Enabled.
-* Enable NIC Interrupts, depending on the number of preceding Disable NIC Interrupt calls.
-*
-* o HCF_ACT_INT_FORCE_ON: Force NIC Interrupts mode Enabled.
-* Sets NIC Interrupts mode Enabled, regardless off the number of preceding Disable NIC Interrupt calls.
-*
-* The disabling and enabling of interrupts are antonyms.
-* These actions must be balanced.
-* For each "disable interrupts" there must be a matching "enable interrupts".
-* The disable interrupts may be executed multiple times in a row without intervening enable interrupts, in
-* other words, the disable interrupts may be nested.
-* The interrupt generation mechanism is disabled at the first call with HCF_ACT_INT_OFF.
-* The interrupt generation mechanism is re-enabled when the number of calls with HCF_ACT_INT_ON matches the
-* number of calls with INT_OFF.
-*
-* It is not allowed to have more Enable NIC Interrupts calls than Disable NIC Interrupts calls.
-* The interrupt generation mechanism is initially (i.e. after hcf_connect) disabled.
-* An MSF based on a interrupt strategy must call hcf_action with INT_ON in its initialization logic.
-*
-*! The INT_OFF/INT_ON housekeeping is initialized at 0x0000 by hcf_connect, causing the interrupt generation
-* mechanism to be disabled at first. This suits MSF implementation based on a polling strategy.
-*
-* o HCF_ACT_CCX_OFF / HCF_ACT_CCX_ON
-*!! This can use some more explanation;?
-* Disables and Enables support in the HCF runtime code for the CCX feature. Each time one of these action
-* codes is used, the effects of the preceding use cease.
-*
-* o HCF_ACT_SLEEP: Initiates the Disconnected DeepSleep process
-* This command is only available if the HCF_DDS compile time option is set. It triggers the F/W to start the
-* sleep handshaking. Regardless whether the Host initiates a Disconnected DeepSleep (DDS) or the F/W initiates
-* a Connected DeepSleep (CDS), the Host-F/W sleep handshaking is completed when the NIC Interrupts mode is
-* enabled (by means of the balancing HCF_ACT_INT_ON), i.e. at that moment the F/W really goes into sleep mode.
-* The F/W is wokenup by the HCF when the NIC Interrupts mode are disabled, i.e. at the first HCF_ACT_INT_OFF
-* after going into sleep.
-*
-* The following Miscellanuous actions are defined:
-*
-* o HCF_ACT_RX_ACK: Receiver Acknowledgement (non-DMA, non-USB mode only)
-* Acking the receiver, frees the NIC memory used to hold the Rx frame and allows the F/W to
-* report the existence of the next Rx frame.
-* If the MSF does not need access (any longer) to the current frame, e.g. because it is rejected based on the
-* look ahead or copied to another buffer, the receiver may be acked. Acking earlier is assumed to have the
-* potential of improving the performance.
-* If the MSF does not explitly ack te receiver, the acking is done implicitly if:
-* - the received frame fits in the look ahead buffer, by the hcf_service_nic call that reported the Rx frame
-* - if not in the above step, by hcf_rcv_msg (assuming hcf_rcv_msg is called)
-* - if neither of the above implicit acks nor an explicit ack by the MSF, by the first hcf_service_nic after
-* the hcf_service_nic that reported the Rx frame.
-* Note: If an Rx frame is already acked, an explicit ACK by the MSF acts as a NoOperation.
-*
-* o HCF_ACT_TALLIES: Inquire Tallies command
-* This command is only operational if the F/W is enabled.
-* The Inquire Tallies command requests the F/W to provide its current set of tallies.
-* See also hcf_get_info with CFG_TALLIES as parameter.
-*
-* o HCF_ACT_PRS_SCAN: Inquire Probe Respons Scan command
-* This command is only operational if the F/W is enabled.
-* The Probe Respons Scan command starts a scan sequence.
-* The HCF puts the result of this action in an MSF defined buffer (see CFG_RID_LOG_STRCT).
-*
-* o HCF_ACT_SCAN: Inquire Scan command
-* This command is only supported for HII F/W (i.e. pre-WARP) and it is operational if the F/W is enabled.
-* The Inquire Scan command starts a scan sequence.
-* The HCF puts the result of this action in an MSF defined buffer (see CFG_RID_LOG_STRCT).
-*
-* Assert fails if
-* - ifbp has a recognizable out-of-range value.
-* - NIC interrupts are not disabled while required by parameter action.
-* - an invalid code is specified in parameter action.
-* - HCF_ACT_INT_ON commands outnumber the HCF_ACT_INT_OFF commands.
-* - reentrancy, may be caused by calling hcf_functions without adequate protection against NIC interrupts or
-* multi-threading
-*
-* - Since the HCF does not maintain status information relative to the F/W enabled state, it is not asserted
-* whether HCF_ACT_SCAN, HCF_ACT_PRS_SCAN or HCF_ACT_TALLIES are only used while F/W is enabled.
-*
-*.DIAGRAM