95 #include <linux/kernel.h>
97 #if ! defined offsetof
98 #define offsetof(s,m) ((unsigned int)&(((s *)0)->m))
109 #if (HCF_TYPE) & HCF_TYPE_WPA
114 #endif // HCF_TYPE_WPA
130 #if (HCF_ASSERT) & HCF_ASSERT_PRINTF
132 #endif // HCF_ASSERT_PRINTF
137 #if ! defined IN_PORT_WORD //replace I/O Macros with logging facility
140 #define IN_PORT_WORD(port) in_port_word( (hcf_io)(port) )
145 fprintf( log_file,
"\nR %2.2x %4.4x", (port)&0xFF, i);
150 #define OUT_PORT_WORD(port, value) out_port_word( (hcf_io)(port), (hcf_16)(value) )
153 _outpw( port, value );
155 fprintf( log_file,
"\nW %2.02x %4.04x", (port)&0xFF, value );
163 fprintf( log_file,
"\nread string_32 length %04x (%04d) at port %02.2x to addr %lp",
168 *p++ = (
hcf_16)_inpw( prt );
169 *p = (
hcf_16)_inpw( prt );
171 fprintf( log_file,
"%s%08lx ", i++ % 0x08 ?
" " :
"\n", *dst);
181 fprintf( log_file,
"\nread string_16 length %04x (%04d) at port %02.2x to addr %lp",
188 fprintf( log_file,
"%04x ", *p);
190 fprintf( log_file,
"\n%04x ", *p);
201 fprintf( log_file,
"\nwrite string_32 length %04x (%04d) at port %02.2x",
209 fprintf( log_file,
"%s%08lx ", i++ % 0x08 ?
" " :
"\n", *src);
219 fprintf( log_file,
"\nwrite string_16 length %04x (%04d) at port %04x", n, n, (
hcf_16)prt);
222 (
void)_outpw( prt, *p);
225 fprintf( log_file,
"%04x ", *p);
227 fprintf( log_file,
"\n%04x ", *p);
234 #endif // IN_PORT_WORD
248 #if (HCF_TYPE) & HCF_TYPE_WPA
250 #endif // HCF_TYPE_WPA
252 #if defined MSF_COMPONENT_ID
253 CFG_IDENTITY_STRCT
BASED cfg_drv_identity = {
254 sizeof(cfg_drv_identity)/
sizeof(
hcf_16) - 1,
258 MSF_COMPONENT_MAJOR_VER,
259 MSF_COMPONENT_MINOR_VER
262 CFG_RANGES_STRCT
BASED cfg_drv_sup_range = {
263 sizeof(cfg_drv_sup_range)/
sizeof(
hcf_16) - 1,
275 sizeof(cfg_drv_act_ranges_pri)/
sizeof(
hcf_16) - 1,
276 CFG_DRV_ACT_RANGES_PRI,
291 struct CFG_RANGE4_STRCT
BASED cfg_drv_act_ranges_sta = {
292 sizeof(cfg_drv_act_ranges_sta)/
sizeof(
hcf_16) - 1,
293 CFG_DRV_ACT_RANGES_STA,
298 #if defined HCF_STA_VAR_1
300 CFG_DRV_ACT_RANGES_STA_1_BOTTOM,
301 CFG_DRV_ACT_RANGES_STA_1_TOP
305 #endif // HCF_STA_VAR_1
306 #if defined HCF_STA_VAR_2
313 #endif // HCF_STA_VAR_2
315 #if defined HCF_STA_VAR_3
322 #endif // HCF_STA_VAR_3
324 #if defined HCF_STA_VAR_4
331 #endif // HCF_STA_VAR_4
336 struct CFG_RANGE6_STRCT
BASED cfg_drv_act_ranges_hsi = {
337 sizeof(cfg_drv_act_ranges_hsi)/
sizeof(
hcf_16) - 1,
338 CFG_DRV_ACT_RANGES_HSI,
342 #if defined HCF_HSI_VAR_0 // Controlled deployment
344 CFG_DRV_ACT_RANGES_HSI_0_BOTTOM,
345 CFG_DRV_ACT_RANGES_HSI_0_TOP
349 #endif // HCF_HSI_VAR_0
353 #if defined HCF_HSI_VAR_4 // Hermes-II all types
360 #endif // HCF_HSI_VAR_4
361 #if defined HCF_HSI_VAR_5 // WARP Hermes-2.5
368 #endif // HCF_HSI_VAR_5
373 CFG_RANGE4_STRCT
BASED cfg_drv_act_ranges_apf = {
374 sizeof(cfg_drv_act_ranges_apf)/
sizeof(
hcf_16) - 1,
375 CFG_DRV_ACT_RANGES_APF,
380 #if defined HCF_APF_VAR_1 //(Fake) Hermes-I
387 #endif // HCF_APF_VAR_1
388 #if defined HCF_APF_VAR_2 //Hermes-II
395 #endif // HCF_APF_VAR_2
396 #if defined HCF_APF_VAR_3 // Native_USB
403 #endif // HCF_APF_VAR_3
404 #if defined HCF_APF_VAR_4 // WARP Hermes 2.5
411 #endif // HCF_APF_VAR_4
414 #define HCF_VERSION TEXT( "HCF$Revision: 1.10 $" )
439 char val[
sizeof(HCF_VERSION)];
440 }
BASED cfg_hcf_opt = {
441 sizeof(cfg_hcf_opt)/
sizeof(
hcf_16) -1,
443 (
sizeof(cfg_hcf_opt) -
sizeof(HCF_VERSION) - 4 )/
sizeof(
hcf_16),
444 #if defined MSF_COMPONENT_ID
448 #endif // MSF_COMPONENT_ID
464 #if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
470 #endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
473 #endif // MSF_COMPONENT_ID
479 #if defined MSF_COMPONENT_ID
480 &cfg_drv_identity.len,
481 &cfg_drv_sup_range.len,
482 &cfg_drv_act_ranges_pri.len,
483 &cfg_drv_act_ranges_sta.len,
484 &cfg_drv_act_ranges_hsi.len,
485 &cfg_drv_act_ranges_apf.len,
489 #endif // MSF_COMPONENT_ID
492 #define xxxx_PRI_IDENTITY_OFFSET (ARRAY_SIZE(xxxx) - 3)
668 #if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
669 #if CFG_SCAN != CFG_TALLIES - HCF_ACT_TALLIES + HCF_ACT_SCAN
670 err:
"maintenance" apparently inviolated
the underlying assumption about
the numerical
values of these macros
672 #endif // HCF_TYPE_HII5
673 #if CFG_PRS_SCAN != CFG_TALLIES - HCF_ACT_TALLIES + HCF_ACT_PRS_SCAN
674 err:
"maintenance" apparently inviolated
the underlying assumption about
the numerical
values of these macros
691 action == HCF_ACT_INT_OFF || action == HCF_ACT_INT_FORCE_ON, action );
699 case HCF_ACT_INT_OFF:
727 case HCF_ACT_INT_FORCE_ON:
761 #if (HCF_SLEEP) & HCF_DDS
790 #if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
792 #endif // HCF_TYPE_HII5
938 #if (HCF_SLEEP) & HCF_DDS
939 ifbp->IFB_TickCnt = 0;
950 OUT_PORT_DWORD( (io_port + HREG_DMA_CTRL), DMA_CTRLSTAT_RESET);
954 OUT_PORT_DWORD( (io_port + HREG_DMA_CTRL), DMA_CTRLSTAT_GO);
961 p = ifbp->IFB_FirstDesc[
DMA_RX];
965 put_frame_lst( ifbp, ifbp->IFB_FirstDesc[
DMA_RX],
DMA_RX );
966 if ( ifbp->IFB_FirstDesc[
DMA_RX] ) {
967 put_frame_lst( ifbp, ifbp->IFB_FirstDesc[
DMA_RX]->next_desc_addr,
DMA_RX );
972 p->BUF_CNT |= DESC_DMA_OWNED;
976 p = ifbp->IFB_FirstDesc[
DMA_RX];
1131 #endif // HCF_ASSERT
1140 #if 0 //;? if a subsequent hcf_connect is preceded by an hcf_disconnect the wakeup is not needed !!
1145 so be careful
if this code is restored
1149 #if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0 //switch clock back for SEEPROM access !!!
1154 #endif // HCF_TYPE_PRELOADED
1158 #if defined MSF_COMPONENT_ID //a new IFB demonstrates how dirty the solution is
1161 #endif // MSF_COMPONENT_ID
1162 #if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
1165 #endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
1171 ifbp->IFB_AssertLvl = 1;
1172 #if (HCF_ASSERT) & HCF_ASSERT_LNK_MSF_RTN
1174 ifbp->IFB_AssertRtn = (MSF_ASSERT_RTNP)
msf_assert;
1176 #endif // HCF_ASSERT_LNK_MSF_RTN
1177 #if (HCF_ASSERT) & HCF_ASSERT_MB //build the structure to pass the assert info to hcf_put_info
1178 ifbp->IFB_AssertStrct.len =
sizeof(ifbp->IFB_AssertStrct)/
sizeof(
hcf_16) - 1;
1181 ifbp->IFB_AssertStrct.frag_cnt = 1;
1182 ifbp->IFB_AssertStrct.frag_buf[0].frag_len =
1184 ifbp->IFB_AssertStrct.frag_buf[0].frag_addr = &ifbp->IFB_AssertLine;
1185 #endif // HCF_ASSERT_MB
1186 #endif // HCF_ASSERT
1188 #if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0
1194 #endif // HCF_TYPE_PRELOADED
1199 HCFASSERT( (io_addr & 0x003F) == 0, io_addr );
1210 #if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0
1212 #endif // HCF_TYPE_PRELOADED
1221 if ( x.len == 0 || x.val[0] == 0x0002 || x.val[0] == 0x0003 ) {
1222 #if (HCF_IO) & HCF_IO_32BITS
1224 #endif // HCF_IO_32BITS
1271 get_frame_lst(
IFBP ifbp,
int tx_rx_flag )
1304 ifbp->IFB_FirstDesc[tx_rx_flag] =
NULL;
1316 #if (HCF_EXT) & HCF_DESC_STRCT_EXT
1317 copy->DESC_MSFSup = p->DESC_MSFSup;
1318 #endif // HCF_DESC_STRCT_EXT
1327 ifbp->IFB_FirstDesc[tx_rx_flag] =
p;
1387 p->BUF_CNT |= DESC_DMA_OWNED;
1388 if ( p->next_desc_addr ) {
1390 HCFASSERT( p->next_desc_addr->desc_phys_addr, (
hcf_32)p->next_desc_addr );
1391 p->next_desc_phys_addr = p->next_desc_addr->desc_phys_addr;
1393 p->next_desc_phys_addr = 0;
1394 if ( p->buf_addr ==
NULL ) {
1396 HCFASSERT( ifbp->IFB_FirstDesc[tx_rx_flag] ==
NULL, (
hcf_32)ifbp->IFB_FirstDesc[tx_rx_flag]);
1397 HCFASSERT( ifbp->IFB_LastDesc[tx_rx_flag] ==
NULL, (
hcf_32)ifbp->IFB_LastDesc[tx_rx_flag]);
1399 ifbp->IFB_FirstDesc[tx_rx_flag] = descp;
1408 HCFASSERT( ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr ==
NULL,
1409 (
hcf_32)ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr);
1411 ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr = descp;
1412 ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_phys_addr = descp->
desc_phys_addr;
1413 port = HREG_RXDMA_PTR32;
1415 p->BUF_SIZE |= DESC_EOP;
1416 descp->BUF_SIZE |= DESC_SOP;
1417 port = HREG_TXDMA_PTR32;
1421 ifbp->IFB_LastDesc[tx_rx_flag] =
p;
1423 p = p->next_desc_addr;
1477 hcf_dma_rx_get (
IFBP ifbp)
1481 descp = get_frame_lst( ifbp,
DMA_RX );
1485 #if (HCF_ENCAP) == HCF_ENC
1497 HCFASSERT(p->BUF_SIZE >=8, p->BUF_SIZE);
1507 if ( descp ==
NULL ) ifbp->IFB_DmaPackets &= (
hcf_16)~HREG_EV_RDMAD;
1566 put_frame_lst( ifbp, descp,
DMA_RX );
1567 #if HCF_ASSERT && (HCF_ENCAP) == HCF_ENC
1569 HCFASSERT( descp->BUF_SIZE == HCF_DMA_RX_BUF1_SIZE, descp->BUF_SIZE );
1574 #endif // HCFASSERT / HCF_ENC
1606 hcf_dma_tx_get(
IFBP ifbp )
1610 descp = get_frame_lst( ifbp,
DMA_TX );
1613 #if (HCF_ENCAP) == HCF_ENC
1614 if ( ( descp->BUF_CNT ==
HFS_TYPE )) {
1621 if ( descp ==
NULL ) {
1622 ifbp->IFB_DmaPackets &= (
hcf_16)~HREG_EV_TDMAD;
1752 HCFASSERT( (x & ~HCF_TX_CNTL_MASK ) == 0, tx_cntl );
1753 #endif // HCF_ASSERT
1761 #if (HCF_ENCAP) == HCF_ENC
1764 HCFASSERT( descp->BUF_SIZE >= HCF_DMA_TX_BUF1_SIZE, descp->BUF_SIZE );
1765 HCFASSERT( p->BUF_CNT >= 14, p->BUF_CNT );
1784 put_frame_lst( ifbp, descp,
DMA_TX );
1836 if ( t == 0x8137 || t == 0x80F3 ) {
1971 for ( i = 0; ( q = xxxx[
i] ) !=
NULL && q[1] != type; i++ ) ;
1978 #endif // HCF_TALLIES
1995 i =
min( len, *q ) + 1;
1998 #if (HCF_TALLIES) & HCF_TALLIES_RESET
2002 #endif // HCF_TALLIES_RESET
2009 #if (HCF_EXT) & HCF_EXT_NIC_ACCESS
2023 #define P ((CFG_CMD_HCF_STRCT FAR *)ltvp)
2027 ltvp->len =
min( len, 4 );
2028 P->add_info =
IPW(
P->mode );
2031 #endif // HCF_EXT_NIC_ACCESS
2032 #if (HCF_ASSERT) & HCF_ASSERT_PRINTF
2035 #endif // HCF_ASSERT_PRINTF
2050 if ( len < ltvp->len ) {
2145 #if (HCF_TYPE) & HCF_TYPE_WPA
2159 ifbp->IFB_MICTxCntl = (
hcf_16)( HFS_TX_CNTL_MIC | (i &
KEY_ID )<<8 );
2167 #define P ((CFG_REMOVE_TKIP_DEFAULT_KEY_STRCT FAR *)ltvp)
2172 ) { ifbp->IFB_MICTxCntl = 0; }
2175 #endif // HCF_TYPE_WPA
2179 }
else switch (ltvp->typ) {
2180 #if (HCF_ASSERT) & HCF_ASSERT_RT_MSF_RTN
2182 #define P ((CFG_REG_ASSERT_RTNP_STRCT FAR *)ltvp)
2183 ifbp->IFB_AssertRtn =
P->rtnp;
2188 #endif // HCF_ASSERT_RT_MSF_RTN
2189 #if (HCF_EXT) & HCF_EXT_INFO_LOG
2190 case CFG_REG_INFO_LOG:
2191 ifbp->IFB_RIDLogp = ((CFG_RID_LOG_STRCT
FAR*)ltvp)->recordp;
2193 #endif // HCF_EXT_INFO_LOG
2201 #define P ((CFG_REG_MB_STRCT FAR *)ltvp)
2217 #if (HCF_EXT) & HCF_EXT_NIC_ACCESS
2219 #define P ((CFG_CMD_NIC_STRCT FAR *)ltvp)
2233 #define P ((CFG_CMD_HCF_STRCT FAR *)ltvp)
2237 OPW(
P->mode,
P->add_info);
2241 #endif // HCF_EXT_NIC_ACCESS
2243 #if (HCF_ASSERT) & HCF_ASSERT_PRINTF
2247 #endif // HCF_ASSERT_PRINTF
2384 if ( tot_len < 0 ) {
2385 lal = 0; tot_len = 0;
2390 cp = descp->buf_addr;
2391 j =
min( (
hcf_16)tot_len, descp->BUF_SIZE );
2400 while ( i-- ) *cp++ = *lap++;
2407 #if (HCF_TYPE) & HCF_TYPE_WPA
2409 rc = check_mic( ifbp );
2411 #endif // HCF_TYPE_WPA
2596 #endif // HCF_ASSERT
2604 #if (HCF_TYPE) & HCF_TYPE_WPA
2605 tx_cntl |= ifbp->IFB_MICTxCntl;
2606 #endif // HCF_TYPE_WPA
2608 if (fid == 0 && ( fid =
get_fid( ifbp ) ) != 0 )
2621 #if (HCF_TYPE) & HCF_TYPE_TX_DELAY
2622 HCFASSERT( ( descp !=
NULL ) ^ ( tx_cntl & HFS_TX_CNTL_TX_DELAY ), tx_cntl );
2623 if ( tx_cntl & HFS_TX_CNTL_TX_DELAY ) {
2624 tx_cntl &= ~HFS_TX_CNTL_TX_DELAY;
2628 #endif // HCF_TYPE_TX_DELAY
2632 HCFASSERT( p->BUF_CNT >= 14, p->BUF_CNT );
2643 #if (HCF_ENCAP) == HCF_ENC
2968 #if (HCF_EXT) & HCF_EXT_INT_TICK
2970 ifbp->IFB_TickCnt++;
2972 #if 0 // (HCF_SLEEP) & HCF_DDS
2974 CFG_DDS_TICK_TIME_STRCT ltv;
2980 ltv.tick_time = ( ( ifbp->
IFB_DSLinkStat & CFG_LINK_STAT_TIMER ) + 0x10 ) *64;
2984 ifbp->IFB_TickCnt++;
2989 #endif // HCF_EXT_INT_TICK
2993 #if (HCF_EXT) & HCF_EXT_INT_TX_EX
2999 #endif // HCF_EXT_INT_TX_EX
3021 #if (HCF_ENCAP) == HCF_ENC
3028 bufp[
HFS_LEN+1] = bufp[HFS_TYPE+1];
3031 buf_addr -= ( HFS_TYPE -
HFS_LEN );
3039 #if (HCF_TYPE) & HCF_TYPE_WPA
3041 rc = check_mic( ifbp );
3043 #endif // HCF_TYPE_WPA
3044 if ( len - HFS_ADDR_DEST >= ifbp->
IFB_RxLen ) {
3051 IF_USE_DMA( ifbp->IFB_DmaPackets |= stat & ( HREG_EV_RDMAD | HREG_EV_TDMAD ) );
3094 #if (HCF_TYPE) & HCF_TYPE_WPA
3096 #define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )
3097 #define ROR32( A, n ) ROL32( (A), 32-(n) )
3106 m = (m >> 16) | (m << 16);
3107 #endif // HCF_BIG_ENDIAN
3111 R ^= ((
L & 0xff00ff00) >> 8) | ((
L & 0x00ff00ff) << 8);
3120 #endif // HCF_TYPE_WPA
3124 #if (HCF_TYPE) & HCF_TYPE_WPA
3164 if ( ( i & HFS_STAT_MIC ) == 0 ) {
3165 ifbp->IFB_MICRxCarry = 0xFFFF;
3167 ifbp->IFB_MICRxCarry = 0;
3175 if ( ifbp->IFB_MICRxCarry == 0 ) {
3179 ifbp->IFB_MICRxCarry = (
hcf_16)len;
3181 ifbp->IFB_MICRxCarry = 4;
3184 }
else while ( ifbp->IFB_MICRxCarry < 4 && len ) {
3185 x.x8[ifbp->IFB_MICRxCarry++] = *p++;
3188 while ( ifbp->IFB_MICRxCarry == 4 ) {
3189 calc_mic( ifbp->IFB_MICRx, x.x32 );
3193 ifbp->IFB_MICRxCarry = (
hcf_16)len;
3199 #endif // HCF_TYPE_WPA
3202 #if (HCF_TYPE) & HCF_TYPE_WPA
3237 ifbp->IFB_MICTxCarry = 0xFFFF;
3239 if ( ifbp->IFB_MICTxCntl ) {
3241 ifbp->IFB_MICTxCarry = 0;
3250 if ( ifbp->IFB_MICTxCarry == 0 ) {
3259 ifbp->IFB_MICTxCarry = (
hcf_16)len;
3263 ifbp->IFB_MICTxCarry = 4;
3270 }
else while ( ifbp->IFB_MICTxCarry < 4 && len ) {
3271 x.x8[ifbp->IFB_MICTxCarry++] = *p++;
3276 while ( ifbp->IFB_MICTxCarry == 4 ) {
3278 calc_mic( ifbp->IFB_MICTx, x.x32 );
3287 ifbp->IFB_MICTxCarry = (
hcf_16)len;
3294 #endif // HCF_TYPE_WPA
3390 #endif // HCF_PROT_TIME
3393 #if (HCF_TYPE) & HCF_TYPE_WPA
3419 check_mic(
IFBP ifbp )
3439 #endif // HCF_TYPE_WPA
3500 if ( prot_cnt == 0 ) {
3505 #endif // HCF_PROT_TIME
3589 if ( ifbp->
IFB_Cmd & HCMD_BUSY ) {
3595 if ( (cmd_code & HCMD_BUSY) == 0 ) {
3639 #if (HCF_TYPE) & HCF_TYPE_PRELOADED
3662 #if 0 //;? as long as the next if contains a hard coded 0, might as well leave it out even more obvious
3690 #endif //;? as long as the above if contains a hard coded 0, might as well leave it out even more obvious
3692 HCFASSERT( ltvp->segment_size, *ltvp->host_addr );
3693 i = ltvp->segment_size/2;
3706 #endif // HCF_TYPE_PRELOADED
3713 #if (HCF_ASSERT) & HCF_ASSERT_PRINTF
3735 if ( fw_cnt != ifbp->IFB_DbgPrintF_Cnt ) {
3737 DbMsgBuffer = p->
DbMsgBuffer + ifbp->IFB_DbgPrintF_Cnt * 6;
3744 ifbp->IFB_DbgPrintF_Cnt++;
3745 ifbp->IFB_DbgPrintF_Cnt &= (p->
DbMsgSize - 1);
3750 #endif // HCF_ASSERT_PRINTF
3788 #if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
3790 #endif // HCF_TYPE_HII5
3798 #if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
3801 #endif // HCF_TYPE_HII5
3878 #if (HCF_IO) & HCF_IO_32BITS
3883 if ( ( (
hcf_32)p & 0x1 ) == 0 ) {
3900 #endif // HCF_IO_32BITS
3917 HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len );
3919 HCFASSERT( word_len <= len, MERGE2( word_len, len ) );
3927 if ( word_len > 1 ) {
3933 #endif // HCF_BIG_ENDIAN
4050 #endif // HCF_BIG_ENDIAN
4051 #if defined MSF_COMPONENT_ID
4052 if ( rc == HCF_SUCCESS ) {
4053 ifbp->IFB_HSISup.len =
sizeof(CFG_SUP_RANGE_STRCT)/
sizeof(
hcf_16) - 1;
4055 rc =
hcf_get_info( ifbp, (LTVP)&ifbp->IFB_HSISup.len );
4066 #endif // HCF_BIG_ENDIAN
4067 ifbp->IFB_FWSup.len =
sizeof(CFG_SUP_RANGE_STRCT)/
sizeof(
hcf_16) - 1;
4077 #endif // HCF_BIG_ENDIAN
4087 if ( !
mmd_check_comp( (
void*)&cfg_drv_act_ranges_hsi, &ifbp->IFB_HSISup)
4090 || !
mmd_check_comp( (
void*)&cfg_drv_act_ranges_pri, &ifbp->IFB_PRISup)
4103 #endif // MSF_COMPONENT_ID
4115 if ( rc == HCF_SUCCESS ) {
4125 IF_PROT_TIME(
if ( prot_cnt == 0 ) rc = HCF_ERR_TIME_OUT );
4172 #if (HCF_EXT) & HCF_EXT_INFO_LOG
4174 #endif // HCF_EXT_INFO_LOG
4183 #if (HCF_TALLIES) & HCF_TALLIES_NIC //Hermes tally support
4193 #endif // HCF_TALLIES_NIC
4198 #if (HCF_EXT) & HCF_EXT_INFO_LOG
4200 if ( ridp->typ == 0 || ridp->typ == info[1] ) {
4203 ridp->bufp[0] =
min((
hcf_16)(ridp->len - 1), info[0] );
4204 ridp->bufp[1] = info[1];
4211 #endif // HCF_EXT_INFO_LOG
4290 mdd_assert(
IFBP ifbp,
unsigned int line_number,
hcf_32 q )
4292 hcf_16 run_time_flag = ifbp->IFB_AssertLvl;
4294 if ( run_time_flag ) {
4295 ifbp->IFB_AssertQualifier =
q;
4296 ifbp->IFB_AssertLine = (
hcf_16)line_number;
4297 #if (HCF_ASSERT) & ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN )
4298 if ( ifbp->IFB_AssertRtn ) {
4299 ifbp->IFB_AssertRtn( line_number, ifbp->IFB_AssertTrace, q );
4301 #endif // HCF_ASSERT_LNK_MSF_RTN / HCF_ASSERT_RT_MSF_RTN
4302 #if (HCF_ASSERT) & HCF_ASSERT_SW_SUP
4307 #endif // HCF_ASSERT_SW_SUP
4309 #if (HCF_ASSERT) & HCF_ASSERT_MB
4310 ifbp->IFB_AssertLvl = 0;
4312 ifbp->IFB_AssertLvl = run_time_flag;
4313 #endif // HCF_ASSERT_MB
4316 #endif // HCF_ASSERT
4354 HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len );
4360 j = bufp[1] | bufp[0]<<8;
4365 if ( word_len > 1 ) {
4367 j = bufp[1] | bufp[0]<<8;
4374 #endif // HCF_BIG_ENDIAN
4382 #if (HCF_IO) & HCF_IO_32BITS
4387 if ( ( (
hcf_32)bufp & 0x1 ) == 0 ) {
4388 if ( (
hcf_32)bufp & 0x2 ) {
4400 bufp += i & ~0x0003;
4404 #endif // HCF_IO_32BITS
4451 #if (HCF_TYPE) & HCF_TYPE_WPA
4452 if ( ifbp->IFB_MICTxCarry != 0xFFFF) {
4457 #endif // HCF_TYPE_WPA
4509 ( CFG_RID_ENG_MIN <= ltvp->typ ) ) ) {
4510 #if HCF_ASSERT //FCC8, FCB0, FCB4, FCB6, FCB7, FCB8, FCC0, FCC4, FCBC, FCBD, FCBE, FCBF
4513 LTV_STRCT x = { 2,
t, {0} };
4526 #endif // HCF_ASSERT
4609 for ( i = 0; i < ltvp->frag_cnt; i++ ) {
4610 len += ltvp->frag_buf[
i].frag_len;
4619 if ( ( tlen <= len + 2 ) && ( len + 2 < ifbp->
IFB_MBRp ) ) {
4630 if ( len + 2 >= tlen ){
4636 *dp++ = ltvp->base_typ;
4638 for ( i = 0; i < ltvp->frag_cnt; i++ ) {
4639 sp = ltvp->frag_buf[
i].frag_addr;
4640 len = ltvp->frag_buf[
i].frag_len;
4641 while ( len-- ) *dp++ = *sp++;
4733 if ( type ==
IO_IN ) {
4739 if ( prot_cnt == 0 ) {