
* DATE    :	$Date: 2004/03/18 12:09:40 $   $Revision: 1.4 $
* Original:	2004/03/18 12:09:40    Revision: 1.4      Tag: t20040318_02
* Original:	2004/02/16 10:32:08    Revision: 1.3      Tag: t20040318_01

	make sure to check your customized hcfcfg.h against the new template hcfcfg.h

MSFs can be build in 3 different versions
 - Hermes I
 - Hermes I with WPA F/W
 - Hermes II
The definition of HCF_TYPE must match the F/W, i.e.
 - HCF_TYPE specified without HCF_TYPE_WPA does not run on Hermes-I with    WPA
 - HCF_TYPE specified with    HCF_TYPE_WPA does not run on Hermes-I without WPA

DCP (DataCorruptionProtection) in WPA mode
	apparently we can not get this right so the decision is to leave it alone and disable
	this workaround by defining HCMD_DCP as 0x0000, although it is needed for H_I.
	Note that in case of DataCorruption in case of WPA, the MIC at the receiving side will not 
	match, hence the corrupted frame is discarded anyway

==================== Change History  ==================== 2004-03-18 ====================

===== HCF.C
  - hcf_connect, the "dynamic" binding to the IFB of the "statically" linked msf_assert routine
	is removed from the disconnect phase of hcf_connect
  -	hcf_send_msg flow for CCX is modified
	
===== DHF.H
  -	dhf_download_binary prototype is changed (see dhf.c)

===== DHF.C
  -	ifbp is removed as parameter from dhf_download_binary. It was only used for MDDASSERT, which can
	not be called anyway if dhf_download_binary is called before hcf_connect
  -	assert are removed from dhf_download_binary

===== MDD.H
  -	The kludge to add "#define HCF_LEGACY_ON  1" to MDD.H rather than the appropriate place (i.e.
	a subsection of hcfcfg.h) is removed
	likewise the definition of HCF_CNTL_ENABLE and HCF_CNTL_DISABLE, which were present already in the
	mdd.h legacy section are removed from the place they were thrown in, apparently as part of the process
	which led to just mentioned kludge
  
===== HCFDEF.H
  -	DCP (DataCorruptionProtection) in WPA mode
	apparently we can not get this right so the decision is to leave it alone and disable
	this workaround by defining HCMD_DCP as 0x0000, although it is needed for H_I 
  -	the unnecessary complication of mixing HCF_STATIC and _DEBUG is removed



==================== Change History  ==================== 2004-02-12 ====================

===== General
  -	the protection timer mechanism has become a compile time option controlled by HCF_PROT_TIME,
	impacting the routines:
		hcf_connect, hcf_send_msg, aux_cntl, calibrate, cmd_cmpl, get_fid, init, strio_16
  	This impact is resolved via the macro PROT_CNT_INI.
	Simultanuously is a bug in the scaling logic in the calibration resolved, which impacted the routine
	calibrate.
  -	the LLB logic is removed, impacting hcf_send_msg and hcf_service_nic. LLB was an engineering mechanism to
	verify the MIC calculation logic
  -	DCP (DataCorruptionProtection) in WPA mode, impacting hcf_service_nic and send_mic_dcp.
  -	assert logic has been unified for the files hcf.c, mmd.c and dhf.c.
	  -	routine hcf_assert is replace by mdd_assert
	  -	file name is no longer supplied to msf_assert
	  -	line number encodes file name ( hcf.c, mmd.c, dhf.c ) 
  -	BigEndian problems in WPA mode, impacting hcf_send_msg and check_mic
  -	the macro STATIC is repleaced with HCF_STATIC ( to diminish the chance on name space pollution ) 
  - names containing the legacy term SSN are replaced with names based on WPA	
  -	the routine hcf_cntl_port is replaced with hcf_cntl to cater for the connect/disconnect logic featured by
	H-II F/W. As a consequence the HCF_PORT_.... macros are replaced with HCF_CNTL_.... macros
  -	introduction of macros to access DESCP_STRCT fields
	  - replaced hard coded 0/1 with DESC_STRCT_CNT and DESC_STRCT_SIZE macros
	  -	replaced GET_BUFCOUNT with GET_BUF_CNT and analoguous for SET
  -	BigEndian related problems
	  -	byte/word access in hcf_rcv_msg, hcf_send_msg, check_mic and send_mic_dcp
	  -	
	

===== HCF.C
  -	the macro STATIC is repleaced with HCF_STATIC 
  -	I/O logging facilty removed. This engineering facility is supposed to be embedded in the MSF.
  -	introduction of CFG_HCF_OPT, a mechanism to retrieve via hcf_get_info the compile time settings during
	runtime, intended as an engineering aid
  -	hcf_action: correction in DDS (DisconnectedDeepSleep) logic 
  -	hcf_connect:
	  -	restructured the logic to clear the IFB to remove the complications caused by timing constraints in
		the engineering specific FAT NIC H/W.
	  -	reordered Assert related logic
	  -	restored the facilty to statically link an MSF-routine msf_assert.
  	-	compile time option HCF_PROT_TIME,
  -	debug_trigger: removed ( engineering only facility ) 
  -	init: 
	  -	corrected test to determine whether Primary F/W is running. As a side effect the retrieval of
		Configuration Management logic is re-ordered

===== HCFDEF.H
  -	added HCF_ENTRY macro ( announced in WCI spec as HCF_ENTRY_IF macro ) 
  -	modified HCFTRACE macros ( part of removal of hcf_debug_trigger ) 

===== HCF.H
  -	restructuring IFB to conditionally expand fields based on the selected compile time options
  -	removal of _ in names of 3 tallies
  -	addition/modification of macros to access DESCP_STRCT fields
  -	the routine hcf_cntl_port is replaced with hcf_cntl 
  -	assert unification

===== DHF.H
  -	no changes

===== DHF.C
  -	assert unification
  -	removal superfluous retrieval PRI Information
  -	introduced PSEUDO_CHAR macro to resolve large pointer arithmetic problems on 80x86 small memory model

===== MDD.H
  -	addition of macros:
	CFG_HCF_OPT
	CFG_POWER_MODE

===== HCFDEF.H
  -	the macro STATIC is repleaced with HCF_STATIC 
  -	assert unification
  -	compile time option HCF_PROT_TIME
  -	Modification to support scaling logic in the calibration 
  -	replacement of enum with macro defintions for TRACE logic to resolve some compiler issues
  -	removal of (some) obsolete macros 


==================== Change History  ==================== 2003-11-28 ====================

===== HCF.C
  - extension of the CFG_HCF_OPT_STRCT to reflect all System Constants
  - addition of Deepsleep and Disconnected Deepsleep
	 - hcf_action
	 - hcf_connect
  - addition of CCX
	 - hcf_action
	 - hcf_send_msg
  - new download strategy where most of the intelligence is moved to FUPU
	 - hcf_put_info
	 - download
  - addition of BigEndian logic, correction of BigEndian problem
	 - hcf_rcv_msg:
	 - hcf_send_msg:
	 - hcf_service_nic:
	 - check_mic
	 - rcv_msg_frag
	 - send_msg_frag
	 - send_mic_dcp
  - addition of compile time control of tally logic:
	 - cmd_cmpl
	 - put_info_mb
  - optimizing the TxFS allocation logic:
	 - hcf_service_nic
	 - get_fid
  - hcf_connect / hcf_disconnect:
	 - integrating disconnect logic into hcf_connect
	 - restructuring of the flow to simplify the flow for the different compile time options
  - hcf_get_info:
	 - changed the flow to be more directly LTV based
  - hcf_put_info:
	 - added special interpretation of WPA related RIDs
	 - added CFG_CMD_HCF as an engineering aid
  - init:
	 - restructuring of the flow to simplify the flow for the different compile time options

===== HCF.H
  - addition of Deepsleep and Disconnected Deepsleep aspects
  - addition of Engineering support for "F/W under development" tallies
  - replacing the strategy to keep the IFB-layout independent of the selected compile time options
	to a "packed" IFB
  - migration support to transform the obsolete hcf_disconnect to the new hcf_connect strategy

===== HCFCFG.TPL
  - deletion of HCF_TYPE_STA
  - addition of
	 - HCF_TYPE_NONE (as a non-empty replacement of the superfluous HCF_TYPE_STA
	 - HCF_TYPE_HII5
	 - HCF_TYPE_CCX
  - replacement of HCF_TYPE_SSN with HCF_TYPE_WPA
  - migration supporting manipulation of
	 - HCF_ASSERT
	 - HCF_DDS/HCF_DEEPSLEEP
	 - HCF_DLV/HCF_DLNV
	 - HCF_INT_ON/HCF_INT_OFF
	 - HCF_LEGACY
	 - HCF_LITTLE_ENDIAN/HCF_BIG_ENDIAN
	 - HCF_MONITOR_MODE
	 - HCF_TYPE

===== HCFDEF.H
  - implementation changes related to preparing for DMA support:
	 - removal of BAP0,
	 - extension of io_range to 0x80
  - addition of H-II specific aspects
  - addition of Deepsleep and Disconnected Deepsleep aspects
  - H-I / H-II depending specification of Configuration Management values
  - IPW: adding casting to prevent unwanted promotion in case of IN_PORT_WORD defined with the wrong
		return type
  - migration supporting manipulation of HCF_MB_ON and HCF_MB_OFF

===== HCFIO.C
	no changes

===== MDD.H
  - cleanup of macro definitions and prototypes
	  Note that (most of) the old definitions are still available via a section at the end of the file
	  This section is conditionally enabled under control of HCF_LEGACY_ON.
	  This compile time option defaults to on. It is advised once the migration to this version of the
	  HCF is completed, to set HCF_LEGACY_ON to 0 and proceed till an error free compilation is achieved.
	- addition of macro definitions
	- modifications to adhere to coding standards
  - new													old
	CFG_CNF_ENCRYPTION                                  CFG_CNF_ENCRYPTION_ENABLED
	CFG_CNF_GROUP_ADDR_FILTER                           CFG_CNF_GROUP_ADDRESS_FILTER
	CFG_CUR_SSID										CFG_CURRENT_SSID
	CFG_CUR_BSSID										CFG_CURRENT_BSSID
	CFG_CUR_TX_RATE										CFG_CURRENT_TX_RATE
	CFG_CUR_REMOTE_RATES								CFG_CURRENT_REMOTE_RATES
	CFG_CUR_USED_RATES									CFG_CURRENT_USED_RATES
	CFG_CUR_SYSTEM_SCALE								CFG_CURRENT_SYSTEM_SCALE
	CFG_CUR_TX_RATE1									CFG_CURRENT_TX_RATE1
	CFG_CUR_TX_RATE2									CFG_CURRENT_TX_RATE2
	CFG_CUR_TX_RATE3									CFG_CURRENT_TX_RATE3
	CFG_CUR_TX_RATE4									CFG_CURRENT_TX_RATE4
	CFG_CUR_TX_RATE5									CFG_CURRENT_TX_RATE5
	CFG_CUR_TX_RATE6									CFG_CURRENT_TX_RATE6
	CFG_OWN_MAC_ADDR									CFG_OWN_MAC_ADDRESS
	CFG_CUR_SSN_INFO_ELEMENT							CFG_CURRENT_SSN_INFO_ELEMENT
	CFG_CUR_TKIP_IV_INFO								CFG_CURRENT_TKIP_IV_INFO
	CFG_CUR_ASSOC_REQ_INFO								CFG_CURRENT_ASSOC_REQ_INFO
	CFG_CUR_ASSOC_RESP_INFO								CFG_CURRENT_ASSOC_RESP_INFO
	CFG_CUR_CHANNEL										CFG_CURRENT_CHANNEL
	CFG_CUR_POWER_STATE									CFG_CURRENT_POWER_STATE
	CFG_CNF_RX_ALL_GROUP_ADDR							CFG_CNF_RX_ALL_GROUP_ADDRESS
	CFG_SET_WPA_AUTH_KEY_MGMT_SUITE						CFG_SET_SSN_AUTH_KEY_MGMT_SUITE
	CFG_CUR_SSID										CFG_CURRENT_SSID
	CFG_CUR_BSSID										CFG_CURRENT_BSSID
	CFG_CUR_TX_RATE										CFG_CURRENT_TX_RATE
	CFG_CUR_BEACON_INTERVAL								CFG_CURRENT_BEACON_INTERVAL
	CFG_CUR_SCALE_THRH									CFG_CURRENT_SCALE_THRH
	CFG_CUR_SHORT_RETRY_LIMIT							CFG_CURRENT_SHORT_RETRY_LIMIT
	CFG_CUR_LONG_RETRY_LIMIT							CFG_CURRENT_LONG_RETRY_LIMIT
	CFG_CUR_REMOTE_RATES								CFG_CURRENT_REMOTE_RATES
	CFG_CUR_USED_RATES									CFG_CURRENT_USED_RATES
	CFG_CUR_SYSTEM_SCALE								CFG_CURRENT_SYSTEM_SCALE
	CFG_CUR_TX_RATE1									CFG_CURRENT_TX_RATE1
	CFG_CUR_TX_RATE2									CFG_CURRENT_TX_RATE2
	CFG_CUR_TX_RATE3									CFG_CURRENT_TX_RATE3
	CFG_CUR_TX_RATE4									CFG_CURRENT_TX_RATE4
	CFG_CUR_TX_RATE5									CFG_CURRENT_TX_RATE5
	CFG_CUR_TX_RATE6									CFG_CURRENT_TX_RATE6
	CFG_CUR_COUNTRY_INFO								CFG_CURRENT_COUNTRY_INFO
	CFG_CUR_SSN_INFO_ELEMENT							CFG_CURRENT_SSN_INFO_ELEMENT
	CFG_CUR_TKIP_IV_INFO								CFG_CURRENT_TKIP_IV_INFO
	CFG_CUR_ASSOC_REQ_INFO								CFG_CURRENT_ASSOC_REQ_INFO
	CFG_CUR_ASSOC_RESP_INFO								CFG_CURRENT_ASSOC_RESP_INFO
	CFG_CUR_LOAD										CFG_CURRENT_LOAD
	CFG_CUR_CHANNEL										CFG_CURRENT_CHANNEL
	CFG_CUR_POWER_STATE									CFG_CURRENT_POWER_STATE
	CFG_CCA_MODE										CFG_CCA_MODE

===== MMD.C
  - addition of ASSERT logic

===== MMD.H
  - cleanup of macro definitions and prototypes


==================== Change History  ==================== 2003-05-12 ====================


===== hcf.c
  -	hcf_send_msg
	removed superfluous assert: HCFASSERT( bufp, len )
	removed incorrect lenght test of assert: HCFASSERT( 0 < len && len < HCF_MAX_MSG, len )

===== mmd.c
  -	mmd_check_comp
	removed incorrect asserts (ifbp is not known within mmd_check_comp)

==================== Change History  ==================== 2003-05-09 ====================

===== hcf.c
  -	hcf_get_info
	- corrected pointer type from 'hcf_16*' to 'hcf_16 FAR *' or wci_recordp
  	  this change is only relevant on those platforms where the FAR macro is not dummy (e.g DOS)
	- restored access to PDA for Hermes-II (this feature isa used by some engineering tools)


==================== Change History  ==================== 2003-04-28 ====================

===== hcf.c
  -	hcf_rcv_msg, corrected MIC flow for USB
  - replaced #if HCF_ASSERT with #if defined HCF_ASSERT to accomodate Archimedes compiler

===== mdd.h
 - restored HCF_ERR_MIC at value of 0x000D

===== hcfcfg.tpl
 - added some sanity checks on PRI and HSI settings

==================== Change History  ==================== 2003-04-25 ====================

===== hcf.c
 - hcf_send_msg, restuctured to cope with splicing in 4 NULL-bytes in case of WPA without
	encapsulation support


===== hcfdef.h
 - added convenience macros: MIC_TX_RTN( mic, dw ), IF_SSN(x), IF_NOT_SSN(x) x

==================== Change History  ==================== 2003-04-09 ====================

===== mmd.c
 - replaced MMDASSERT with HCFASSERT as part of the process to promote mmd.c as part of the HCF-file set

===== hcf.h
 - added IFB_MSFSup as MSF convenience to the IFB. This void pointer can be freely used by the MSF.

========== download cleanup
===== mdd.h
 - added CFG_MFI_ACT_RANGES_STA_STRCT definition
 - added LOF maco
===== hcf.c
 - changed congiguration management structures cfg_drv_identity, cfg_drv_act_ranges_hsi and
   cfg_drv_act_ranges_pri to extern so they are directly accessible in addition to access via
   hcf_get_info
 - limited access of CFG_PROD_DATA via hcf_get_info to H-I environment


========== bug resolution
===== hcf.c
 - hcf_action: rearranged conditional compilation of interrupt related assert logic
 - hcf_connect: removed invokation of I/O macros in USB environment
 - hcf_get_info: corrected defintion of i from 16 to 32 bits size to accomodate platforms
   with 32-bits io-base



==================== Change History  ==================== 2003-03-21 ====================
This is the initial release corresponding with the WCI-spec 025726

===================== changes relative to the WCI-spec (025726) ==========================
The DESC_STRCT structure as defined in the WCI-spec:
	typedef struct DESC_STRCT{
		hcf_16				cntl_stat;
		hcf_32				next_desc_phys_addr;
		hcf_32				buf_phys_addr;
		hcf_16				buf_size;
		hcf_16				buf_cnt;
		struct DESC_STRCT	*next_desc_addr;
		hcf_8	FAR			*buf_addr;
	} DESC_STRCT;

is replaced with:
	typedef struct DESC_STRCT{
		union {
			hcf_32				cntl_stat;
			hcf_16				buf_dim[2];				// 0: cnt, 1: size
		} buf_cntl;
		hcf_32					buf_phys_addr;
		hcf_32					next_desc_phys_addr;
		struct DESC_STRCT FAR	*next_desc_addr;
		hcf_8	FAR				*buf_addr;
	} DESC_STRCT;

The new structure is defined by the H/W implementation of the PCI Busmastering.
The MSF code needs to be changed as follows:
 - replace all accesses of buf_cnt  with buf_cntl[0]
 - replace all accesses of buf_size with buf_cntl[1]
 Note that as long as Busmastering is not available, the next_desc_phys_addr buf_phys_addr are not used.
 Note that the MSF should not access the cntl_stat field

