It looks like in shtp.c it gets the advertisement value of TAG_MAX_CARGO_PLUS_HEADER_WRITE, but then it subtracts the SHTP_HDR_LEN (=4) from value return. But the tag names implies it should have the header length in it? Why is this?
In Line 460:
case TAG_MAX_CARGO_PLUS_HEADER_WRITE:
x = readu16(val) - SHTP_HDR_LEN;
if (x < SH2_HAL_MAX_PAYLOAD_OUT) {
pShtp->outMaxPayload = x;
}
break;