cmd.read_write = 1;
if (addr > 0) {
- /**
- * has to be word aligned...
- **/
- if (size & 0x3) {
- size += 4;
- size &= ~0x3;
- }
-
/**
* func 0 access
**/
cmd.function = 0;
cmd.address = 0x10f;
} else {
- /**
- * has to be word aligned...
- **/
- if (size & 0x3) {
- size += 4;
- size &= ~0x3;
- }
-
/**
* func 1 access
**/
cmd.address = 0;
}
+ size = ALIGN(size, 4);
nblk = size / block_size;
nleft = size % block_size;
cmd.read_write = 0;
if (addr > 0) {
- /**
- * has to be word aligned...
- **/
- if (size & 0x3) {
- size += 4;
- size &= ~0x3;
- }
-
/**
* func 0 access
**/
cmd.function = 0;
cmd.address = 0x10f;
} else {
- /**
- * has to be word aligned...
- **/
- if (size & 0x3) {
- size += 4;
- size &= ~0x3;
- }
-
/**
* func 1 access
**/
cmd.address = 0;
}
+ size = ALIGN(size, 4);
nblk = size / block_size;
nleft = size % block_size;
vmm_sz = HOST_HDR_OFFSET;
vmm_sz += tqe->buffer_size;
-
- if (vmm_sz & 0x3)
- vmm_sz = (vmm_sz + 4) & ~0x3;
+ vmm_sz = ALIGN(vmm_sz, 4);
if ((sum + vmm_sz) > WILC_TX_BUFF_SIZE)
break;