Fixed pda printing when reading card pda. More fixes relating to the

copy_to_bap() function.  We're still getting failures when writing to the
BAP though.
This commit is contained in:
mark 2000-01-28 06:04:09 +00:00
parent b0eb144b91
commit 0ac131596d
3 changed files with 28 additions and 22 deletions

View File

@ -415,24 +415,27 @@ int main ( int argc, char **argv )
pda_changed = 0;
if ( !opt_newpda && !opt_debug ) { /* read pda from card */
if (read_cardpda(&pda, devname)) {
fprintf(stderr,"loac_cardpda failed, exiting.\n");
fprintf(stderr,"load_cardpda failed, exiting.\n");
exit(1);
}
if ( opt_status && opt_addpdrcnt) { /* print pda */
if ( opt_status && opt_addpdrcnt) { /* print note about pda */
printf( "Card PDA prior to file generated "
"modifications:\n");
print_all_pdrs(&pda);
}
} else { /* read pda from file */
pda_changed = 1;
read_filepda(&pda, newpdafname);
if (opt_status) {
if (opt_status && opt_addpdrcnt) {
printf( "File PDA prior to file generated "
"modifications:\n");
print_all_pdrs(&pda);
}
}
if ( opt_status ) { /* print pda */
print_all_pdrs(&pda);
}
if ( opt_addpdrcnt ) { /* read the "add pdas" and merge them*/
pda_changed = 1;
for ( i = 0; i < opt_addpdrcnt; i++) {
@ -445,17 +448,30 @@ int main ( int argc, char **argv )
print_all_pdrs(&pda);
/* Read and print the CIS? */
exit(0);
} else if ( opt_status ) { /* We're done */
exit(0);
}
/*-----------------------------------------------------*/
/* Read the flash files */
if ( opt_flashloadcnt ) {
#if 0
/* For each file */
/* Read the S3 file */
/* Validate the identity and compat ranges */
/* Make the image chunks */
/* Do any plugging */
for ( i = 0; i < flashloadcnt; i++) {
/* Read the S3 file */
result = read_srecfile(ffname[i]);
if ( result ) {
fprintf(stderr,
"Failed to read %s, exiting.\n",
ffname[i]);
exit(1);
}
/* Validate the identity and compat ranges */
/* Make the image chunks */
/* Do any plugging */
}
#endif
}
/* Read the ram files */
@ -524,16 +540,6 @@ int main ( int argc, char **argv )
}
#endif
#if 0
/* Read on card PDA */
if ( (opt_tfile || opt_dumppda) && !opt_newpda ) {
}
/* Display the PDA */
if ( opt_dumppda ) {
print_all_pdrs();
}
#endif
return result;
}

View File

@ -1248,10 +1248,10 @@ int hfa384x_copy_to_bap(hfa384x_t *hw, UINT16 bap, UINT16 id, UINT16 offset,
i++;
} while ( i < 50 && HFA384x_OFFSET_ISBUSY(reg));
if ( HFA384x_OFFSET_ISBUSY(reg) ){
/* If timeout, return -ETIMEDOUT */
/* If timeout, return reg */
result = reg;
} else if ( HFA384x_OFFSET_ISERR(reg) ){
/* If offset[err] == 1, return -EINVAL */
/* If offset[err] == 1, return reg */
result = reg;
} else {
/* Write even(len) buf contents to data reg */

View File

@ -414,8 +414,8 @@ dmpmem(pb->p80211buf + WLAN_HDR_A3_LEN, pb->p80211buflen - WLAN_HDR_A3_LEN);
WLAN_LOG_DEBUG4(1,
"copy_to_bap(%04x, %d, %d) failed, result=0x%x\n",
priv->txfid,
pb->p80211buflen - WLAN_HDR_A3_LEN,
sizeof(txdesc),
pb->p80211buflen - WLAN_HDR_A3_LEN,
result);
result = 2;
goto failed;