Commit 068b561c authored by Ruslan Pisarev's avatar Ruslan Pisarev Committed by Greg Kroah-Hartman

Staging: wlags49_h2: fix TAB and space coding style issue dhf.c

This is a patch to the dhf.c file that fixed up a TAB and spaces Errors
found by the checkpatch.pl tools
Signed-off-by: default avatarRuslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ccc75a58
...@@ -120,7 +120,7 @@ char signature[14] = "FUPU7D37dhfwci"; ...@@ -120,7 +120,7 @@ char signature[14] = "FUPU7D37dhfwci";
#if defined(_MSC_VER) && _MSC_VER == 800 /* Visual C++ 1.5 */ #if defined(_MSC_VER) && _MSC_VER == 800 /* Visual C++ 1.5 */
#define PSEUDO_CHARP hcf_32 #define PSEUDO_CHARP hcf_32
#else #else
#define PSEUDO_CHARP hcf_8* #define PSEUDO_CHARP (hcf_8 *)
#endif #endif
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
...@@ -164,7 +164,7 @@ LTV_INFO_STRUCT ltv_info[] = { ...@@ -164,7 +164,7 @@ LTV_INFO_STRUCT ltv_info[] = {
/***********************************************************************************************************/ /***********************************************************************************************************/
/*************************************** PROTOTYPES ******************************************************/ /*************************************** PROTOTYPES ******************************************************/
/***********************************************************************************************************/ /***********************************************************************************************************/
static int check_comp_fw( memimage *fw ); static int check_comp_fw(memimage *fw);
/************************************************************************************************************ /************************************************************************************************************
...@@ -185,18 +185,18 @@ static int check_comp_fw( memimage *fw ); ...@@ -185,18 +185,18 @@ static int check_comp_fw( memimage *fw );
*.ENDDOC END DOCUMENTATION *.ENDDOC END DOCUMENTATION
*************************************************************************************************************/ *************************************************************************************************************/
int int
check_comp_fw( memimage *fw ) check_comp_fw(memimage *fw)
{ {
CFG_RANGE20_STRCT *p; CFG_RANGE20_STRCT *p;
int rc = HCF_SUCCESS; int rc = HCF_SUCCESS;
CFG_RANGE_SPEC_STRCT* i; CFG_RANGE_SPEC_STRCT *i;
switch( fw->identity->typ ) { switch (fw->identity->typ) {
case CFG_FW_IDENTITY: /* Station F/W */ case CFG_FW_IDENTITY: /* Station F/W */
case COMP_ID_FW_AP_FAKE: /* ;?is this useful (used to be: CFG_AP_IDENTITY) */ case COMP_ID_FW_AP_FAKE: /* ;?is this useful (used to be: CFG_AP_IDENTITY) */
break; break;
default: default:
MMDASSERT( DO_ASSERT, fw->identity->typ ) /* unknown/unsupported firmware_type: */ MMDASSERT(DO_ASSERT, fw->identity->typ) /* unknown/unsupported firmware_type: */
rc = DHF_ERR_INCOMP_FW; rc = DHF_ERR_INCOMP_FW;
return rc; /* ;? how useful is this anyway, return rc; /* ;? how useful is this anyway,
* till that is sorted out might as well violate my own single exit principle * till that is sorted out might as well violate my own single exit principle
...@@ -204,25 +204,25 @@ CFG_RANGE_SPEC_STRCT* i; ...@@ -204,25 +204,25 @@ CFG_RANGE_SPEC_STRCT* i;
} }
p = fw->compat; p = fw->compat;
i = NULL; i = NULL;
while( p->len && i == NULL ) { /* check the MFI ranges */ while (p->len && i == NULL) { /* check the MFI ranges */
if ( p->typ == CFG_MFI_ACT_RANGES_STA ) { if (p->typ == CFG_MFI_ACT_RANGES_STA) {
i = mmd_check_comp( (void*)p, &mfi_sup ); i = mmd_check_comp((void *)p, &mfi_sup);
} }
p++; p++;
} }
MMDASSERT( i, 0 ) /* MFI: NIC Supplier not compatible with F/W image Actor */ MMDASSERT(i, 0) /* MFI: NIC Supplier not compatible with F/W image Actor */
if ( i ) { if (i) {
p = fw->compat; p = fw->compat;
i = NULL; i = NULL;
while ( p->len && i == NULL ) { /* check the CFI ranges */ while (p->len && i == NULL) { /* check the CFI ranges */
if ( p->typ == CFG_CFI_ACT_RANGES_STA ) { if (p->typ == CFG_CFI_ACT_RANGES_STA) {
i = mmd_check_comp( (void*)p, &cfi_sup ); i = mmd_check_comp((void *)p, &cfi_sup);
} }
p++; p++;
} }
MMDASSERT( i, 0 ) /* CFI: NIC Supplier not compatible with F/W image Actor */ MMDASSERT(i, 0) /* CFI: NIC Supplier not compatible with F/W image Actor */
} }
if ( i == NULL ) { if (i == NULL) {
rc = DHF_ERR_INCOMP_FW; rc = DHF_ERR_INCOMP_FW;
} }
return rc; return rc;
...@@ -271,25 +271,25 @@ CFG_RANGE_SPEC_STRCT* i; ...@@ -271,25 +271,25 @@ CFG_RANGE_SPEC_STRCT* i;
*.ENDDOC END DOCUMENTATION *.ENDDOC END DOCUMENTATION
*************************************************************************************************************/ *************************************************************************************************************/
int int
dhf_download_binary( memimage *fw ) dhf_download_binary(memimage *fw)
{ {
int rc = HCF_SUCCESS; int rc = HCF_SUCCESS;
CFG_PROG_STRCT *p; CFG_PROG_STRCT *p;
int i; int i;
/* validate the image */ /* validate the image */
for ( i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++ ) /* NOP */; for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++); /* NOP */
if ( i != sizeof(signature) || if (i != sizeof(signature) ||
fw->signature[i] != 0x01 || fw->signature[i] != 0x01 ||
/* test for Little/Big Endian Binary flag */ /* test for Little/Big Endian Binary flag */
fw->signature[i+1] != ( /* HCF_BIG_ENDIAN ? 'B' : */ 'L' ) ) rc = DHF_ERR_INCOMP_FW; fw->signature[i+1] != (/* HCF_BIG_ENDIAN ? 'B' : */ 'L')) rc = DHF_ERR_INCOMP_FW;
else { /* Little Endian Binary format */ else { /* Little Endian Binary format */
fw->codep = (CFG_PROG_STRCT FAR *)((PSEUDO_CHARP)fw->codep + (hcf_32)fw ); fw->codep = (CFG_PROG_STRCT FAR*)((PSEUDO_CHARP)fw->codep + (hcf_32)fw);
fw->identity = (CFG_IDENTITY_STRCT FAR *)((PSEUDO_CHARP)fw->identity + (hcf_32)fw ); fw->identity = (CFG_IDENTITY_STRCT FAR*)((PSEUDO_CHARP)fw->identity + (hcf_32)fw);
fw->compat = (CFG_RANGE20_STRCT FAR *)((PSEUDO_CHARP)fw->compat + (hcf_32)fw ); fw->compat = (CFG_RANGE20_STRCT FAR*)((PSEUDO_CHARP)fw->compat + (hcf_32)fw);
for ( i = 0; fw->p[i]; i++ ) fw->p[i] = ((PSEUDO_CHARP)fw->p[i] + (hcf_32)fw ); for (i = 0; fw->p[i]; i++) fw->p[i] = ((PSEUDO_CHARP)fw->p[i] + (hcf_32)fw);
p = fw->codep; p = fw->codep;
while ( p->len ) { while (p->len) {
p->host_addr = (PSEUDO_CHARP)p->host_addr + (hcf_32)fw; p->host_addr = (PSEUDO_CHARP)p->host_addr + (hcf_32)fw;
p++; p++;
} }
...@@ -351,7 +351,7 @@ int i; ...@@ -351,7 +351,7 @@ int i;
*.ENDDOC END DOCUMENTATION *.ENDDOC END DOCUMENTATION
*************************************************************************************************************/ *************************************************************************************************************/
int int
dhf_download_fw( void *ifbp, memimage *fw ) dhf_download_fw(void *ifbp, memimage *fw)
{ {
int rc = HCF_SUCCESS; int rc = HCF_SUCCESS;
LTV_INFO_STRUCT_PTR pp = ltv_info; LTV_INFO_STRUCT_PTR pp = ltv_info;
...@@ -359,31 +359,31 @@ CFG_PROG_STRCT *p = fw->codep; ...@@ -359,31 +359,31 @@ CFG_PROG_STRCT *p = fw->codep;
LTVP ltvp; LTVP ltvp;
int i; int i;
MMDASSERT( fw != NULL, 0 ) MMDASSERT(fw != NULL, 0)
/* validate the image */ /* validate the image */
for ( i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++ ) /* NOP */; for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++) /* NOP */;
if ( i != sizeof(signature) || if (i != sizeof(signature) ||
fw->signature[i] != 0x01 || fw->signature[i] != 0x01 ||
/* check for binary image */ /* check for binary image */
( fw->signature[i+1] != 'C' && fw->signature[i+1] != ( /*HCF_BIG_ENDIAN ? 'B' : */ 'L' ) ) ) (fw->signature[i+1] != 'C' && fw->signature[i+1] != (/*HCF_BIG_ENDIAN ? 'B' : */ 'L')))
rc = DHF_ERR_INCOMP_FW; rc = DHF_ERR_INCOMP_FW;
/* Retrieve all information needed for download from the NIC */ /* Retrieve all information needed for download from the NIC */
while ( ( rc == HCF_SUCCESS ) && ( ( ltvp = pp->ltvp) != NULL ) ) { while ((rc == HCF_SUCCESS) && ((ltvp = pp->ltvp) != NULL)) {
ltvp->len = pp++->len; /* Set len to original len. This len is changed to real len by GET_INFO() */ ltvp->len = pp++->len; /* Set len to original len. This len is changed to real len by GET_INFO() */
rc = GET_INFO( ltvp ); rc = GET_INFO(ltvp);
MMDASSERT( rc == HCF_SUCCESS, rc ) MMDASSERT(rc == HCF_SUCCESS, rc)
MMDASSERT( rc == HCF_SUCCESS, ltvp->typ ) MMDASSERT(rc == HCF_SUCCESS, ltvp->typ)
MMDASSERT( rc == HCF_SUCCESS, ltvp->len ) MMDASSERT(rc == HCF_SUCCESS, ltvp->len)
} }
if ( rc == HCF_SUCCESS ) rc = check_comp_fw( fw ); if (rc == HCF_SUCCESS) rc = check_comp_fw(fw);
if ( rc == HCF_SUCCESS ) { if (rc == HCF_SUCCESS) {
while ( rc == HCF_SUCCESS && p->len ) { while (rc == HCF_SUCCESS && p->len) {
rc = PUT_INFO( p ); rc = PUT_INFO(p);
p++; p++;
} }
} }
MMDASSERT( rc == HCF_SUCCESS, rc ) MMDASSERT(rc == HCF_SUCCESS, rc)
return rc; return rc;
} /* dhf_download_fw */ } /* dhf_download_fw */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment