Fixed some indents.

This commit is contained in:
mark 2000-11-19 16:16:56 +00:00
parent 7dcba55858
commit 15524d31ef
1 changed files with 40 additions and 37 deletions

View File

@ -525,50 +525,53 @@ int main ( int argc, char **argv )
}
/* If the MAC address is specified it should overwrite the
current value. */
* current value.
*/
if ( opt_macaddr ) {
const unsigned nwords = WLAN_ADDR_LEN/sizeof(UINT16) + 2;
UINT16 pdwords[nwords];
int i; /* index into byte array of macaddr */
int j; /* index into pdr words */
const unsigned nwords = WLAN_ADDR_LEN/sizeof(UINT16) + 2;
UINT16 pdwords[nwords];
int i; /* index into byte array of macaddr */
int j; /* index into pdr words */
/* create mac address PDR
word[0] : PDR length
word[1] : MAC address PDR code (0x101)
word[2-4] : MAC address (WLAN_ADDR_LEN bytes - usually 6)
*/
pdwords[0] = host2hfa384x_16(0x0004);
pdwords[1] = host2hfa384x_16(0x0101);
for (i = 0, j = 2; i < WLAN_ADDR_LEN; i += 2, j++) {
pdwords[j] = host2hfa384x_16((UINT16) macaddr[i+1] << 8 | (UINT16) macaddr[i]);
}
/* merge the value into the PDA, so that it will eventually
be written. */
merge_pda(&pda, pdwords, nwords);
pda_changed = 1;
/* create mac address PDR
word[0] : PDR length
word[1] : MAC address PDR code (0x101)
word[2-4] : MAC address (WLAN_ADDR_LEN bytes - usually 6)
*/
pdwords[0] = host2hfa384x_16(0x0004);
pdwords[1] = host2hfa384x_16(0x0101);
for (i = 0, j = 2; i < WLAN_ADDR_LEN; i += 2, j++) {
pdwords[j] = host2hfa384x_16((UINT16) macaddr[i+1] << 8 | (UINT16) macaddr[i]);
}
/* merge the value into the PDA, so that it will eventually
* be written.
*/
merge_pda(&pda, pdwords, nwords);
pda_changed = 1;
}
/* If a serial number is specified add it to the PDA. */
if ( opt_sernum ) {
const unsigned nwords = SERNUM_LEN_MAX/sizeof(UINT16) + 2;
UINT16 pdwords[nwords];
int i; /* index into byte array of serial numbers bytes */
int j; /* index into pdr words */
const unsigned nwords = SERNUM_LEN_MAX/sizeof(UINT16) + 2;
UINT16 pdwords[nwords];
int i; /* index into byte array of serial numbers bytes */
int j; /* index into pdr words */
/* create mac address PDR
word[0] : PDR length
word[1] : Serial number PDR code (0x0003)
word[2-7] : Serial number (12 bytes)
*/
pdwords[0] = host2hfa384x_16(0x0007);
pdwords[1] = host2hfa384x_16(0x0003);
for (i = 0, j = 2; i < SERNUM_LEN_MAX; i += 2, j++) {
pdwords[j] = host2hfa384x_16((UINT16) sernum[i+1] << 8 | (UINT16) sernum[i]);
}
/* merge the value into the PDA, so that it will eventually
be written. */
merge_pda(&pda, pdwords, nwords);
pda_changed = 1;
/* create mac address PDR
word[0] : PDR length
word[1] : Serial number PDR code (0x0003)
word[2-7] : Serial number (12 bytes)
*/
pdwords[0] = host2hfa384x_16(0x0007);
pdwords[1] = host2hfa384x_16(0x0003);
for (i = 0, j = 2; i < SERNUM_LEN_MAX; i += 2, j++) {
pdwords[j] = host2hfa384x_16((UINT16) sernum[i+1] << 8 | (UINT16) sernum[i]);
}
/* merge the value into the PDA, so that it will eventually
* be written.
*/
merge_pda(&pda, pdwords, nwords);
pda_changed = 1;
}
if ( opt_status || opt_generate ) { /* print pda */