drivers: net: xgene: Fix MSS programming
authorIyappan Subramanian <isubramanian@apm.com>
Thu, 22 Sep 2016 22:47:33 +0000 (15:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 12:38:38 +0000 (08:38 -0400)
commite3978673f514fa4999f04dfad9bbd5bb70d0edc6
tree8e6fd48362d675bf8a2a23bf2167af36c859c14d
parente12934d9806e61d2727069cd56757987f3da76aa
drivers: net: xgene: Fix MSS programming

Current driver programs static value of MSS in hardware register for TSO
offload engine to segment the TCP payload regardless the MSS value
provided by network stack.

This patch fixes this by programming hardware registers with the
stack provided MSS value.

Since the hardware has the limitation of having only 4 MSS registers,
this patch uses reference count of mss values being used.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
drivers/net/ethernet/apm/xgene/xgene_enet_main.h
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c