diff options
Diffstat (limited to 'drivers/staging/wlags49_h2/hcf.c')
-rw-r--r-- | drivers/staging/wlags49_h2/hcf.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c index d4bdd3ee8be..a73317ef935 100644 --- a/drivers/staging/wlags49_h2/hcf.c +++ b/drivers/staging/wlags49_h2/hcf.c | |||
@@ -540,7 +540,7 @@ HCF_STATIC hcf_16* BASED xxxx[ ] = { | |||
540 | * | 540 | * |
541 | *.CONDITIONS | 541 | *.CONDITIONS |
542 | * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O | 542 | * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O |
543 | * address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceeded by a call of hcf_action with | 543 | * address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceded by a call of hcf_action with |
544 | * HCF_ACT_INT_OFF as parameter. | 544 | * HCF_ACT_INT_OFF as parameter. |
545 | * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF ) | 545 | * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF ) |
546 | * was called. | 546 | * was called. |
@@ -843,7 +843,7 @@ hcf_16 i; | |||
843 | *.MODULE int hcf_cntl( IFBP ifbp, hcf_16 cmd ) | 843 | *.MODULE int hcf_cntl( IFBP ifbp, hcf_16 cmd ) |
844 | *.PURPOSE Connect or disconnect a specific port to a specific network. | 844 | *.PURPOSE Connect or disconnect a specific port to a specific network. |
845 | *!! ;???????????????? continue needs more explanation | 845 | *!! ;???????????????? continue needs more explanation |
846 | * recovers by means of "continue" when the connect proces in CCX mode fails | 846 | * recovers by means of "continue" when the connect process in CCX mode fails |
847 | * Enables or disables data transmission and reception for the NIC. | 847 | * Enables or disables data transmission and reception for the NIC. |
848 | * Activates static NIC configuration for a specific port at connect. | 848 | * Activates static NIC configuration for a specific port at connect. |
849 | * Activates static configuration for all ports at enable. | 849 | * Activates static configuration for all ports at enable. |
@@ -1170,12 +1170,12 @@ LTV_STRCT x; | |||
1170 | io_addr = io_base; | 1170 | io_addr = io_base; |
1171 | } | 1171 | } |
1172 | 1172 | ||
1173 | #if 0 //;? if a subsequent hcf_connect is preceeded by an hcf_disconnect the wakeup is not needed !! | 1173 | #if 0 //;? if a subsequent hcf_connect is preceded by an hcf_disconnect the wakeup is not needed !! |
1174 | #if HCF_SLEEP | 1174 | #if HCF_SLEEP |
1175 | OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC ); //OPW not yet useable | 1175 | OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC ); //OPW not yet useable |
1176 | MSF_WAIT(800); // MSF-defined function to wait n microseconds. | 1176 | MSF_WAIT(800); // MSF-defined function to wait n microseconds. |
1177 | note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI) | 1177 | note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI) |
1178 | so be carefull if this code is restored | 1178 | so be careful if this code is restored |
1179 | #endif // HCF_SLEEP | 1179 | #endif // HCF_SLEEP |
1180 | #endif // 0 | 1180 | #endif // 0 |
1181 | 1181 | ||
@@ -1563,7 +1563,7 @@ DESC_STRCT *p = descp->next_desc_addr; //pointer to 2nd descriptor of frame | |||
1563 | * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes. | 1563 | * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes. |
1564 | * The HCF can be used in 2 fashions: with and without encapsulation for data transfer. | 1564 | * The HCF can be used in 2 fashions: with and without encapsulation for data transfer. |
1565 | * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant. | 1565 | * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant. |
1566 | * As a consequence, some additional constaints apply to the number of descriptor and the buffers associated | 1566 | * As a consequence, some additional constraints apply to the number of descriptor and the buffers associated |
1567 | * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored. | 1567 | * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored. |
1568 | * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor. | 1568 | * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor. |
1569 | * | 1569 | * |
@@ -1735,7 +1735,7 @@ DESC_STRCT *descp; // pointer to start of FrameList | |||
1735 | * - in case encapsulation by the HCF is selected: | 1735 | * - in case encapsulation by the HCF is selected: |
1736 | * - The FrameList does not consists of at least 2 Descriptors. | 1736 | * - The FrameList does not consists of at least 2 Descriptors. |
1737 | * - The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words) | 1737 | * - The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words) |
1738 | * - The first databuffer does not have a size to additionally accomodate the 802.3 header and the | 1738 | * - The first databuffer does not have a size to additionally accommodate the 802.3 header and the |
1739 | * SNAP header of the frame after encapsulation (== 39 words). | 1739 | * SNAP header of the frame after encapsulation (== 39 words). |
1740 | * - The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words) | 1740 | * - The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words) |
1741 | *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get | 1741 | *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get |
@@ -1762,14 +1762,14 @@ DESC_STRCT *descp; // pointer to start of FrameList | |||
1762 | * - Copy DA/SA fields from the 2nd buffer | 1762 | * - Copy DA/SA fields from the 2nd buffer |
1763 | * - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments | 1763 | * - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments |
1764 | * associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress, | 1764 | * associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress, |
1765 | * SourceAddress and lenght-field) | 1765 | * SourceAddress and length-field) |
1766 | * Assert the message length | 1766 | * Assert the message length |
1767 | * Write length. Note that the message is in BE format, hence on LE platforms the length must be converted | 1767 | * Write length. Note that the message is in BE format, hence on LE platforms the length must be converted |
1768 | * ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED | 1768 | * ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED |
1769 | * - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in | 1769 | * - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in |
1770 | * place as result of the call to hcf_encap. | 1770 | * place as result of the call to hcf_encap. |
1771 | * Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing | 1771 | * Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing |
1772 | * the snap header, HFS_TYPE is choosen as a reference point to make it easier to grasp that the snap header | 1772 | * the snap header, HFS_TYPE is chosen as a reference point to make it easier to grasp that the snap header |
1773 | * and encapsualtion type are at least relative in the right. | 1773 | * and encapsualtion type are at least relative in the right. |
1774 | *8: modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header | 1774 | *8: modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header |
1775 | * modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA | 1775 | * modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA |
@@ -1933,7 +1933,7 @@ hcf_16 t = (hcf_16)(*type<<8) + *(type+1); /* 2 */ | |||
1933 | * HCF_SUCCESS Success | 1933 | * HCF_SUCCESS Success |
1934 | *!! via cmd_exe ( type >= CFG_RID_FW_MIN ) | 1934 | *!! via cmd_exe ( type >= CFG_RID_FW_MIN ) |
1935 | * HCF_ERR_NO_NIC NIC removed during retrieval | 1935 | * HCF_ERR_NO_NIC NIC removed during retrieval |
1936 | * HCF_ERR_TIME_OUT Expected Hermes event did not occure in expected time | 1936 | * HCF_ERR_TIME_OUT Expected Hermes event did not occur in expected time |
1937 | *!! via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN ) | 1937 | *!! via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN ) |
1938 | * HCF_ERR_DEFUNCT_... HCF is in defunct mode (bits 0x7F reflect cause) | 1938 | * HCF_ERR_DEFUNCT_... HCF is in defunct mode (bits 0x7F reflect cause) |
1939 | * | 1939 | * |
@@ -2958,7 +2958,7 @@ or | |||
2958 | * hcf_service_nic is also skipped in those cases. | 2958 | * hcf_service_nic is also skipped in those cases. |
2959 | * To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to | 2959 | * To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to |
2960 | * debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence | 2960 | * debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence |
2961 | * test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is choosen for strategy based on | 2961 | * test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is chosen for strategy based on |
2962 | * HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly | 2962 | * HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly |
2963 | * due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download. | 2963 | * due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download. |
2964 | * Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in | 2964 | * Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in |
@@ -4048,7 +4048,7 @@ hcf_32 FAR *p4; //prevent side effects from macro | |||
4048 | HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len ) | 4048 | HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len ) |
4049 | HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp ) | 4049 | HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp ) |
4050 | HCFASSERT( word_len <= len, MERGE2( word_len, len ) ) | 4050 | HCFASSERT( word_len <= len, MERGE2( word_len, len ) ) |
4051 | //see put_frag for an alternative implementation, but be carefull about what are int's and what are | 4051 | //see put_frag for an alternative implementation, but be careful about what are int's and what are |
4052 | //hcf_16's | 4052 | //hcf_16's |
4053 | if ( word_len ) { //. if there is anything to convert | 4053 | if ( word_len ) { //. if there is anything to convert |
4054 | hcf_8 c; | 4054 | hcf_8 c; |
@@ -4712,7 +4712,7 @@ int rc = HCF_SUCCESS; | |||
4712 | * Note that len is unsigned, so even MSF I/F violation works out O.K. | 4712 | * Note that len is unsigned, so even MSF I/F violation works out O.K. |
4713 | * The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed | 4713 | * The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed |
4714 | * for the zero-sentinel | 4714 | * for the zero-sentinel |
4715 | *8: update MailBox Info length report to MSF with "oldest" MB Info Block size. Be carefull here, if you get | 4715 | *8: update MailBox Info length report to MSF with "oldest" MB Info Block size. Be careful here, if you get |
4716 | * here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the | 4716 | * here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the |
4717 | * Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed | 4717 | * Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed |
4718 | * a buffer. | 4718 | * a buffer. |