diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-05-10 01:56:03 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-05-10 01:56:03 +0200 |
commit | bf584e4dbd5bac7b1aaddbd33a7116364f919819 (patch) | |
tree | 1a4ebb22e283da0b363d9ad497f11624a2f4f439 /net/sctp/sm_make_chunk.c | |
parent | power: reset: ltc2952: remove unused variable (diff) | |
parent | regulator: use linear_ranges helper (diff) | |
download | linux-bf584e4dbd5bac7b1aaddbd33a7116364f919819.tar.xz linux-bf584e4dbd5bac7b1aaddbd33a7116364f919819.zip |
Merge tag 'tags/linear-ranges-lib' into psy-next
lib: Add linear ranges helper library and start using it
Series extracts a "linear ranges" helper out of the regulator
framework. Linear ranges helper is intended to help converting
real-world values to register values when conversion is linear. I
suspect this is useful also for power subsystem and possibly for clk.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 09050c1d5517..f7cb0b7faec2 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -858,7 +858,11 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc, struct sctp_chunk *retval; __u32 ctsn; - ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map); + if (chunk && chunk->asoc) + ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map); + else + ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map); + shut.cum_tsn_ack = htonl(ctsn); retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0, |