aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2025-03-18 08:45:23 +0000
committerJohannes Berg <[email protected]>2025-03-18 08:46:36 +0000
commitc924c5e9b8c65b3a479a90e5e37d74cc8cd9fe0a (patch)
tree9626c13418dd3770f2772980a7dacdc110c442b6 /net/ipv4/tcp.c
parentwifi: iwlwifi: Fix uninitialized variable with __free() (diff)
parentMerge branch 'net-phy-rework-linkmodes-handling-in-a-dedicated-file' (diff)
downloadkernel-c924c5e9b8c65b3a479a90e5e37d74cc8cd9fe0a.tar.gz
kernel-c924c5e9b8c65b3a479a90e5e37d74cc8cd9fe0a.zip
Merge net-next/main to resolve conflicts
There are a few conflicts between the work that went into wireless and that's here now, resolve them. Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index eb5a60c7a9cc..989c3c3d8e75 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3693,7 +3693,7 @@ EXPORT_SYMBOL(tcp_sock_set_keepcnt);
int tcp_set_window_clamp(struct sock *sk, int val)
{
- u32 old_window_clamp, new_window_clamp;
+ u32 old_window_clamp, new_window_clamp, new_rcv_ssthresh;
struct tcp_sock *tp = tcp_sk(sk);
if (!val) {
@@ -3714,12 +3714,12 @@ int tcp_set_window_clamp(struct sock *sk, int val)
/* Need to apply the reserved mem provisioning only
* when shrinking the window clamp.
*/
- if (new_window_clamp < old_window_clamp)
+ if (new_window_clamp < old_window_clamp) {
__tcp_adjust_rcv_ssthresh(sk, new_window_clamp);
- else
- tp->rcv_ssthresh = clamp(new_window_clamp,
- tp->rcv_ssthresh,
- tp->rcv_wnd);
+ } else {
+ new_rcv_ssthresh = min(tp->rcv_wnd, new_window_clamp);
+ tp->rcv_ssthresh = max(new_rcv_ssthresh, tp->rcv_ssthresh);
+ }
return 0;
}
@@ -4138,7 +4138,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info->tcpi_rcv_wscale = tp->rx_opt.rcv_wscale;
}
- if (tp->ecn_flags & TCP_ECN_OK)
+ if (tcp_ecn_mode_any(tp))
info->tcpi_options |= TCPI_OPT_ECN;
if (tp->ecn_flags & TCP_ECN_SEEN)
info->tcpi_options |= TCPI_OPT_ECN_SEEN;