Lines Matching refs:total_len
251 u32 ix = 0, total_len = 0, addr = 0, chunk_len = 0, prevchunk_len = 0;
258 total_len = buffer[ix + 1] << 16 | buffer[ix + 2] << 8 | buffer[ix + 3];
259 total_len = (total_len + 3) & ~3;
264 while ((total_len > 0) && (status == 0)) {
266 chunk_len = (total_len < payload_max) ? total_len : payload_max;
286 total_len -= chunk_len;
303 int status = 0, total_len = 0;
306 total_len = size;
307 total_len = (total_len + 3) & ~3; /* 4 byte alignment */
309 if (total_len > (MXL_EAGLE_MAX_I2C_PACKET_SIZE - MXL_EAGLE_I2C_MHEADER_SIZE))
315 *plocal_buf++ = total_len + sizeof(u32);
320 memcpy(plocal_buf, buffer, total_len);
322 convert_endian(sizeof(u32) + total_len, local_buf + 2);
325 (total_len + MXL_EAGLE_I2C_MHEADER_SIZE)) < 0) {
382 int status = 0, total_len = 0;
386 total_len = size;
387 total_len = (total_len + 3) & ~3; /* 4 byte alignment */
389 if (total_len > (MXL_EAGLE_MAX_I2C_PACKET_SIZE - MXL_EAGLE_I2C_PHEADER_SIZE))
395 *plocal_buf++ = (u8)total_len;
397 memcpy(plocal_buf, buffer, total_len);
398 convert_endian(total_len, plocal_buf);
401 (total_len + MXL_EAGLE_I2C_PHEADER_SIZE)) < 0) {