Enable GMAC v4.xx and beyond to support 16KiB buffer.
Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        p->des3 = 0;
 }
 
+static int set_16kib_bfsize(int mtu)
+{
+       int ret = 0;
+
+       if (unlikely(mtu >= BUF_SIZE_8KiB))
+               ret = BUF_SIZE_16KiB;
+       return ret;
+}
+
 const struct stmmac_desc_ops dwmac4_desc_ops = {
        .tx_status = dwmac4_wrback_get_tx_status,
        .rx_status = dwmac4_wrback_get_rx_status,
        .clear = dwmac4_clear,
 };
 
-const struct stmmac_mode_ops dwmac4_ring_mode_ops = { };
+const struct stmmac_mode_ops dwmac4_ring_mode_ops = {
+       .set_16kib_bfsize = set_16kib_bfsize,
+};