Skip to content

Commit

Permalink
Merge pull request #2669 from goodspeed34/ydn23-lchksum-fix
Browse files Browse the repository at this point in the history
drivers/ydn23.h: fix bad lchksum
  • Loading branch information
jimklimov authored Nov 4, 2024
2 parents 62c43ea + d244d73 commit 5d1ed6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/ydn23.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ static inline void ydn23_lchecksum(uint16_t dlen, char *out)

/* Sum all four 4 bits */
lenchk += lelen & 0x000f;
lenchk += lelen & 0x00f0;
lenchk += lelen & 0x0f00;
lenchk += lelen & 0xf000;
lenchk += (lelen & 0x00f0) >> 4;
lenchk += (lelen & 0x0f00) >> 8;
lenchk += (lelen & 0xf000) >> 12;

lenchk %= 16;
lenchk = ~lenchk + 1;
Expand Down

0 comments on commit 5d1ed6e

Please sign in to comment.