mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
IB/core: Fix and clean up ib_ud_header_init()
ib_ud_header_init() first clears header and then fills up the various fields. Later on, it tests header->immediate_present, which it has already cleared, so the condition is always false. Fix this by adding an immediate_present parameter and setting header->immediate_present as is done with grh_present. Also remove unused calculation of header_len. Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
This commit is contained in:
parent
ccbe9f0b11
commit
920d706c89
4 changed files with 7 additions and 12 deletions
|
|
@ -232,6 +232,7 @@ void ib_unpack(const struct ib_field *desc,
|
|||
|
||||
void ib_ud_header_init(int payload_bytes,
|
||||
int grh_present,
|
||||
int immediate_present,
|
||||
struct ib_ud_header *header);
|
||||
|
||||
int ib_ud_header_pack(struct ib_ud_header *header,
|
||||
|
|
|
|||
Loading…
Reference in a new issue