From cc516700c7edab4197d08998ac023c3043369391 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Tue, 13 Sep 2016 21:24:01 +0530 Subject: libcxgb,iw_cxgb4,cxgbit: add cxgb_compute_wscale() Add cxgb_compute_wscale() in libcxgb_cm.h to remove it's duplicate definitions from cxgb4/cm.c and cxgbit/cxgbit_cm.c. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller --- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'drivers/target/iscsi') diff --git a/drivers/target/iscsi/cxgbit/cxgbit_cm.c b/drivers/target/iscsi/cxgbit/cxgbit_cm.c index b09c09ba9659..cd29c91d01fc 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_cm.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_cm.c @@ -1085,15 +1085,6 @@ out: return -ENOMEM; } -static u32 cxgbit_compute_wscale(u32 win) -{ - u32 wscale = 0; - - while (wscale < 14 && (65535 << wscale) < win) - wscale++; - return wscale; -} - static void cxgbit_pass_accept_rpl(struct cxgbit_sock *csk, struct cpl_pass_accept_req *req) { @@ -1124,7 +1115,7 @@ cxgbit_pass_accept_rpl(struct cxgbit_sock *csk, struct cpl_pass_accept_req *req) cxgb_best_mtu(csk->com.cdev->lldi.mtus, csk->mtu, &mtu_idx, req->tcpopt.tstamp, (csk->com.remote_addr.ss_family == AF_INET) ? 0 : 1); - wscale = cxgbit_compute_wscale(csk->rcv_win); + wscale = cxgb_compute_wscale(csk->rcv_win); /* * Specify the largest window that will fit in opt0. The * remainder will be specified in the rx_data_ack. -- cgit v1.2.3-59-g8ed1b