aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wlags49_h2/hcf.c10
-rw-r--r--drivers/staging/wlags49_h2/hcf.h12
-rw-r--r--drivers/staging/wlags49_h2/mmd.c12
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c
index 5957c3a439ac..366e4a4b75c5 100644
--- a/drivers/staging/wlags49_h2/hcf.c
+++ b/drivers/staging/wlags49_h2/hcf.c
@@ -2871,8 +2871,8 @@ or
2871* The Assert validates the HCF assumption about Hermes implementation upon which the range of 2871* The Assert validates the HCF assumption about Hermes implementation upon which the range of
2872* Pseudo-RIDs is based. 2872* Pseudo-RIDs is based.
2873* Then the control fields up to the start of the 802.3 frame are read from the NIC into the lookahead buffer. 2873* Then the control fields up to the start of the 802.3 frame are read from the NIC into the lookahead buffer.
2874* The status field is converted to native Endianess. 2874* The status field is converted to native Endianness.
2875* The length is, after implicit Endianess conversion if needed, and adjustment for the 14 bytes of the 2875* The length is, after implicit Endianness conversion if needed, and adjustment for the 14 bytes of the
2876* 802.3 MAC header, stored in IFB_RxLen. 2876* 802.3 MAC header, stored in IFB_RxLen.
2877* In MAC Monitor mode, 802.11 control frames with a TOTAL length of 14 are received, so without this 2877* In MAC Monitor mode, 802.11 control frames with a TOTAL length of 14 are received, so without this
2878* length adjustment, IFB_RxLen could not be used to distinguish these frames from "no frame". 2878* length adjustment, IFB_RxLen could not be used to distinguish these frames from "no frame".
@@ -2894,7 +2894,7 @@ or
2894* - the Hermes reported Tunnel encapsulation or 2894* - the Hermes reported Tunnel encapsulation or
2895* - the Hermes reported 1042 Encapsulation and hcf_encap reports that the HCF would not have used 2895* - the Hermes reported 1042 Encapsulation and hcf_encap reports that the HCF would not have used
2896* 1042 as the encapsulation mechanism 2896* 1042 as the encapsulation mechanism
2897* Note that the first field of the RxFS in bufp has Native Endianess due to the conversion done by the 2897* Note that the first field of the RxFS in bufp has Native Endianness due to the conversion done by the
2898* BE_PAR in get_frag. 2898* BE_PAR in get_frag.
2899*36: The Type field is the only word kept (after moving) of the just read 8 bytes, it is moved to the 2899*36: The Type field is the only word kept (after moving) of the just read 8 bytes, it is moved to the
2900* L-field. The original L-field and 6 byte SNAP header are discarded, so IFB_RxLen and buf_addr must 2900* L-field. The original L-field and 6 byte SNAP header are discarded, so IFB_RxLen and buf_addr must
@@ -3831,7 +3831,7 @@ get_fid( IFBP ifbp )
3831 *.DESCRIPTION 3831 *.DESCRIPTION
3832 * process the single byte (if applicable) read by the previous get_frag and copy len (or len-1) bytes from 3832 * process the single byte (if applicable) read by the previous get_frag and copy len (or len-1) bytes from
3833 * NIC to bufp. 3833 * NIC to bufp.
3834 * On a Big Endian platform, the parameter word_len controls the number of leading bytes whose endianess is 3834 * On a Big Endian platform, the parameter word_len controls the number of leading bytes whose endianness is
3835 * converted (i.e. byte swapped) 3835 * converted (i.e. byte swapped)
3836 * 3836 *
3837 * 3837 *
@@ -3980,7 +3980,7 @@ get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) )
3980 * appropriate means on H-I: always 3980 * appropriate means on H-I: always
3981 * and on H-II if F/W supplier reflects a primary (i.e. only after an Hermes Reset or Init 3981 * and on H-II if F/W supplier reflects a primary (i.e. only after an Hermes Reset or Init
3982 * command). 3982 * command).
3983 * QUESTION ;? !!!!!! should, For each of the above RIDs the Endianess is converted to native Endianess. 3983 * QUESTION ;? !!!!!! should, For each of the above RIDs the Endianness is converted to native Endianness.
3984 * Only the return code of the first hcf_get_info is used. All hcf_get_info calls are made, regardless of 3984 * Only the return code of the first hcf_get_info is used. All hcf_get_info calls are made, regardless of
3985 * the success or failure of the 1st hcf_get_info. The assumptions are: 3985 * the success or failure of the 1st hcf_get_info. The assumptions are:
3986 * - if any call fails, they all fail, so remembering the result of the 1st call is adequate 3986 * - if any call fails, they all fail, so remembering the result of the 1st call is adequate
diff --git a/drivers/staging/wlags49_h2/hcf.h b/drivers/staging/wlags49_h2/hcf.h
index 95527b5cf863..68e23303b5e8 100644
--- a/drivers/staging/wlags49_h2/hcf.h
+++ b/drivers/staging/wlags49_h2/hcf.h
@@ -90,7 +90,7 @@
90 90
91#define LOF(x) (sizeof(x)/sizeof(hcf_16)-1) 91#define LOF(x) (sizeof(x)/sizeof(hcf_16)-1)
92 92
93/* Endianess 93/* Endianness
94 * Little Endian (a.k.a. Intel), least significant byte first 94 * Little Endian (a.k.a. Intel), least significant byte first
95 * Big Endian (a.k.a. Motorola), most significant byte first 95 * Big Endian (a.k.a. Motorola), most significant byte first
96 * 96 *
@@ -101,7 +101,7 @@
101 */ 101 */
102 102
103/* To increase portability, use unsigned char and unsigned char * when accessing parts of larger 103/* To increase portability, use unsigned char and unsigned char * when accessing parts of larger
104 * types to convert their Endianess 104 * types to convert their Endianness
105 */ 105 */
106 106
107#define CNV_END_SHORT(w) (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 ) 107#define CNV_END_SHORT(w) (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
@@ -109,14 +109,14 @@
109 109
110#if HCF_BIG_ENDIAN 110#if HCF_BIG_ENDIAN
111//******************************************** B I G E N D I A N ******************************************* 111//******************************************** B I G E N D I A N *******************************************
112#define CNV_LITTLE_TO_SHORT(w) CNV_END_SHORT(w) // endianess conversion needed 112#define CNV_LITTLE_TO_SHORT(w) CNV_END_SHORT(w) // endianness conversion needed
113#define CNV_BIG_TO_SHORT(w) (w) // no endianess conversion needed 113#define CNV_BIG_TO_SHORT(w) (w) // no endianness conversion needed
114#define CNV_LITTLE_TO_LONG(dw) CNV_END_LONG(dw) 114#define CNV_LITTLE_TO_LONG(dw) CNV_END_LONG(dw)
115#define CNV_LONG_TO_LITTLE(dw) CNV_END_LONG(dw) 115#define CNV_LONG_TO_LITTLE(dw) CNV_END_LONG(dw)
116#else 116#else
117//****************************************** L I T T L E E N D I A N **************************************** 117//****************************************** L I T T L E E N D I A N ****************************************
118#define CNV_LITTLE_TO_SHORT(w) (w) // no endianess conversion needed 118#define CNV_LITTLE_TO_SHORT(w) (w) // no endianness conversion needed
119#define CNV_BIG_TO_SHORT(w) CNV_END_SHORT(w) // endianess conversion needed 119#define CNV_BIG_TO_SHORT(w) CNV_END_SHORT(w) // endianness conversion needed
120#define CNV_LITTLE_TO_LONG(dw) (dw) 120#define CNV_LITTLE_TO_LONG(dw) (dw)
121#define CNV_LONG_TO_LITTLE(dw) (dw) 121#define CNV_LONG_TO_LITTLE(dw) (dw)
122 122
diff --git a/drivers/staging/wlags49_h2/mmd.c b/drivers/staging/wlags49_h2/mmd.c
index c8f52107e6ca..7204a373bc51 100644
--- a/drivers/staging/wlags49_h2/mmd.c
+++ b/drivers/staging/wlags49_h2/mmd.c
@@ -101,10 +101,10 @@
101* supp address of the supplier specification 101* supp address of the supplier specification
102* 102*
103* Description: mmd_check_comp is a support routine to check the compatibility between an actor and a 103* Description: mmd_check_comp is a support routine to check the compatibility between an actor and a
104* supplier. mmd_check_comp is independent of the endianess of the actp and supp structures. This is 104* supplier. mmd_check_comp is independent of the endianness of the actp and supp structures. This is
105* achieved by checking the "bottom" or "role" fields of these structures. Since these fields are restricted 105* achieved by checking the "bottom" or "role" fields of these structures. Since these fields are restricted
106* to a limited range, comparing the contents to a value with a known endian-ess gives a clue to their actual 106* to a limited range, comparing the contents to a value with a known endian-ess gives a clue to their actual
107* endianess. 107* endianness.
108* 108*
109*.DIAGRAM 109*.DIAGRAM
110*1a: The role-field of the actor structure has a known non-zero, not "byte symmetric" value (namely 110*1a: The role-field of the actor structure has a known non-zero, not "byte symmetric" value (namely
@@ -114,16 +114,16 @@
114* for a supplier. A supplier has always exactly 1 variant,top,bottom record with (officially, but see the 114* for a supplier. A supplier has always exactly 1 variant,top,bottom record with (officially, but see the
115* note below) each of these 3 values in the range 1 through 99, so one byte of the word value of variant, 115* note below) each of these 3 values in the range 1 through 99, so one byte of the word value of variant,
116* top and bottom words is 0x00 and the other byte is non-zero. Whether the lowest address byte or the 116* top and bottom words is 0x00 and the other byte is non-zero. Whether the lowest address byte or the
117* highest address byte is non-zero depends on the Endianess of the LTV. If and only if the word value of 117* highest address byte is non-zero depends on the Endianness of the LTV. If and only if the word value of
118* bottom is less than 0x0100, the supplier is Native Endian. 118* bottom is less than 0x0100, the supplier is Native Endian.
119* NOTE: the variant field of the supplier structure can not be used for the Endian Detection Algorithm, 119* NOTE: the variant field of the supplier structure can not be used for the Endian Detection Algorithm,
120* because a a zero-valued variant has been used as Controlled Deployment indication in the past. 120* because a a zero-valued variant has been used as Controlled Deployment indication in the past.
121* Note: An actor may have multiple sets of variant,top,bottom records, including dummy sets with variant, 121* Note: An actor may have multiple sets of variant,top,bottom records, including dummy sets with variant,
122* top and bottom fields with a zero-value. As a consequence the endianess of the actor can not be determined 122* top and bottom fields with a zero-value. As a consequence the endianness of the actor can not be determined
123* based on its variant,top,bottom values. 123* based on its variant,top,bottom values.
124* 124*
125* Note: the L and T field of the structures are always in Native Endian format, so you can not draw 125* Note: the L and T field of the structures are always in Native Endian format, so you can not draw
126* conclusions concerning the Endianess of the structure based on these two fields. 126* conclusions concerning the Endianness of the structure based on these two fields.
127* 127*
128*1b/2b 128*1b/2b
129* The only purpose of the CFG_RANGE_SPEC_BYTE_STRCT is to give easy access to the non-zero byte of the word 129* The only purpose of the CFG_RANGE_SPEC_BYTE_STRCT is to give easy access to the non-zero byte of the word
@@ -149,7 +149,7 @@
149* 149*
150* This is implemented as: 150* This is implemented as:
151* #if HCF_BIG_ENDIAN == 0 //platform is LE 151* #if HCF_BIG_ENDIAN == 0 //platform is LE
152* sup/act_endian becomes reverse of structure-endianess as determined in 1a/1b 152* sup/act_endian becomes reverse of structure-endianness as determined in 1a/1b
153* #endif 153* #endif
154*6: Each of the actor variant-bottom-top records is checked against the (single) supplier variant-bottom-top 154*6: Each of the actor variant-bottom-top records is checked against the (single) supplier variant-bottom-top
155* range till either an acceptable match is found or all actor records are tried. As explained above, due to 155* range till either an acceptable match is found or all actor records are tried. As explained above, due to