summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2018-03-23 02:33:06 +0000
committerAlex Shi <alex.shi@linaro.org>2018-03-23 02:33:06 +0000
commit9c032b533b870102c1929870059ec2c089a31f2b (patch)
tree87f979a767aaa305300bcb7720d0ae52f43096c8 /include/net
parent9ad0ea90a166b728745bdbef04f573a4eed811fd (diff)
parent78c39820dc30c73f5b69c3fe2269ad9b0840a61a (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 593253f2427e..a435427ae43a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1202,9 +1202,11 @@ void tcp_select_initial_window(int __space, __u32 mss, __u32 *rcv_wnd,
static inline int tcp_win_from_space(int space)
{
- return sysctl_tcp_adv_win_scale<=0 ?
- (space>>(-sysctl_tcp_adv_win_scale)) :
- space - (space>>sysctl_tcp_adv_win_scale);
+ int tcp_adv_win_scale = sysctl_tcp_adv_win_scale;
+
+ return tcp_adv_win_scale <= 0 ?
+ (space>>(-tcp_adv_win_scale)) :
+ space - (space>>tcp_adv_win_scale);
}
/* Note: caller must be prepared to deal with negative returns */