18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * AMD 10Gb Ethernet driver 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * This file is available to you under your choice of the following two 58c2ecf20Sopenharmony_ci * licenses: 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * License 1: GPLv2 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Copyright (c) 2014-2016 Advanced Micro Devices, Inc. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * This file is free software; you may copy, redistribute and/or modify 128c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 138c2ecf20Sopenharmony_ci * the Free Software Foundation, either version 2 of the License, or (at 148c2ecf20Sopenharmony_ci * your option) any later version. 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * This file is distributed in the hope that it will be useful, but 178c2ecf20Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of 188c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 198c2ecf20Sopenharmony_ci * General Public License for more details. 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License 228c2ecf20Sopenharmony_ci * along with this program. If not, see <http://www.gnu.org/licenses/>. 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * This file incorporates work covered by the following copyright and 258c2ecf20Sopenharmony_ci * permission notice: 268c2ecf20Sopenharmony_ci * The Synopsys DWC ETHER XGMAC Software Driver and documentation 278c2ecf20Sopenharmony_ci * (hereinafter "Software") is an unsupported proprietary work of Synopsys, 288c2ecf20Sopenharmony_ci * Inc. unless otherwise expressly agreed to in writing between Synopsys 298c2ecf20Sopenharmony_ci * and you. 308c2ecf20Sopenharmony_ci * 318c2ecf20Sopenharmony_ci * The Software IS NOT an item of Licensed Software or Licensed Product 328c2ecf20Sopenharmony_ci * under any End User Software License Agreement or Agreement for Licensed 338c2ecf20Sopenharmony_ci * Product with Synopsys or any supplement thereto. Permission is hereby 348c2ecf20Sopenharmony_ci * granted, free of charge, to any person obtaining a copy of this software 358c2ecf20Sopenharmony_ci * annotated with this license and the Software, to deal in the Software 368c2ecf20Sopenharmony_ci * without restriction, including without limitation the rights to use, 378c2ecf20Sopenharmony_ci * copy, modify, merge, publish, distribute, sublicense, and/or sell copies 388c2ecf20Sopenharmony_ci * of the Software, and to permit persons to whom the Software is furnished 398c2ecf20Sopenharmony_ci * to do so, subject to the following conditions: 408c2ecf20Sopenharmony_ci * 418c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included 428c2ecf20Sopenharmony_ci * in all copies or substantial portions of the Software. 438c2ecf20Sopenharmony_ci * 448c2ecf20Sopenharmony_ci * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" 458c2ecf20Sopenharmony_ci * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 468c2ecf20Sopenharmony_ci * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 478c2ecf20Sopenharmony_ci * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS 488c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 498c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 508c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 518c2ecf20Sopenharmony_ci * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 528c2ecf20Sopenharmony_ci * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 538c2ecf20Sopenharmony_ci * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 548c2ecf20Sopenharmony_ci * THE POSSIBILITY OF SUCH DAMAGE. 558c2ecf20Sopenharmony_ci * 568c2ecf20Sopenharmony_ci * 578c2ecf20Sopenharmony_ci * License 2: Modified BSD 588c2ecf20Sopenharmony_ci * 598c2ecf20Sopenharmony_ci * Copyright (c) 2014-2016 Advanced Micro Devices, Inc. 608c2ecf20Sopenharmony_ci * All rights reserved. 618c2ecf20Sopenharmony_ci * 628c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 638c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions are met: 648c2ecf20Sopenharmony_ci * * Redistributions of source code must retain the above copyright 658c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 668c2ecf20Sopenharmony_ci * * Redistributions in binary form must reproduce the above copyright 678c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in the 688c2ecf20Sopenharmony_ci * documentation and/or other materials provided with the distribution. 698c2ecf20Sopenharmony_ci * * Neither the name of Advanced Micro Devices, Inc. nor the 708c2ecf20Sopenharmony_ci * names of its contributors may be used to endorse or promote products 718c2ecf20Sopenharmony_ci * derived from this software without specific prior written permission. 728c2ecf20Sopenharmony_ci * 738c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 748c2ecf20Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 758c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 768c2ecf20Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY 778c2ecf20Sopenharmony_ci * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 788c2ecf20Sopenharmony_ci * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 798c2ecf20Sopenharmony_ci * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 808c2ecf20Sopenharmony_ci * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 818c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 828c2ecf20Sopenharmony_ci * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 838c2ecf20Sopenharmony_ci * 848c2ecf20Sopenharmony_ci * This file incorporates work covered by the following copyright and 858c2ecf20Sopenharmony_ci * permission notice: 868c2ecf20Sopenharmony_ci * The Synopsys DWC ETHER XGMAC Software Driver and documentation 878c2ecf20Sopenharmony_ci * (hereinafter "Software") is an unsupported proprietary work of Synopsys, 888c2ecf20Sopenharmony_ci * Inc. unless otherwise expressly agreed to in writing between Synopsys 898c2ecf20Sopenharmony_ci * and you. 908c2ecf20Sopenharmony_ci * 918c2ecf20Sopenharmony_ci * The Software IS NOT an item of Licensed Software or Licensed Product 928c2ecf20Sopenharmony_ci * under any End User Software License Agreement or Agreement for Licensed 938c2ecf20Sopenharmony_ci * Product with Synopsys or any supplement thereto. Permission is hereby 948c2ecf20Sopenharmony_ci * granted, free of charge, to any person obtaining a copy of this software 958c2ecf20Sopenharmony_ci * annotated with this license and the Software, to deal in the Software 968c2ecf20Sopenharmony_ci * without restriction, including without limitation the rights to use, 978c2ecf20Sopenharmony_ci * copy, modify, merge, publish, distribute, sublicense, and/or sell copies 988c2ecf20Sopenharmony_ci * of the Software, and to permit persons to whom the Software is furnished 998c2ecf20Sopenharmony_ci * to do so, subject to the following conditions: 1008c2ecf20Sopenharmony_ci * 1018c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included 1028c2ecf20Sopenharmony_ci * in all copies or substantial portions of the Software. 1038c2ecf20Sopenharmony_ci * 1048c2ecf20Sopenharmony_ci * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" 1058c2ecf20Sopenharmony_ci * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1068c2ecf20Sopenharmony_ci * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 1078c2ecf20Sopenharmony_ci * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS 1088c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1098c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1108c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1118c2ecf20Sopenharmony_ci * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1128c2ecf20Sopenharmony_ci * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1138c2ecf20Sopenharmony_ci * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 1148c2ecf20Sopenharmony_ci * THE POSSIBILITY OF SUCH DAMAGE. 1158c2ecf20Sopenharmony_ci */ 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci#include <linux/netdevice.h> 1188c2ecf20Sopenharmony_ci#include <net/dcbnl.h> 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci#include "xgbe.h" 1218c2ecf20Sopenharmony_ci#include "xgbe-common.h" 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_cistatic int xgbe_dcb_ieee_getets(struct net_device *netdev, 1248c2ecf20Sopenharmony_ci struct ieee_ets *ets) 1258c2ecf20Sopenharmony_ci{ 1268c2ecf20Sopenharmony_ci struct xgbe_prv_data *pdata = netdev_priv(netdev); 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci /* Set number of supported traffic classes */ 1298c2ecf20Sopenharmony_ci ets->ets_cap = pdata->hw_feat.tc_cnt; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci if (pdata->ets) { 1328c2ecf20Sopenharmony_ci ets->cbs = pdata->ets->cbs; 1338c2ecf20Sopenharmony_ci memcpy(ets->tc_tx_bw, pdata->ets->tc_tx_bw, 1348c2ecf20Sopenharmony_ci sizeof(ets->tc_tx_bw)); 1358c2ecf20Sopenharmony_ci memcpy(ets->tc_tsa, pdata->ets->tc_tsa, 1368c2ecf20Sopenharmony_ci sizeof(ets->tc_tsa)); 1378c2ecf20Sopenharmony_ci memcpy(ets->prio_tc, pdata->ets->prio_tc, 1388c2ecf20Sopenharmony_ci sizeof(ets->prio_tc)); 1398c2ecf20Sopenharmony_ci } 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci return 0; 1428c2ecf20Sopenharmony_ci} 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_cistatic int xgbe_dcb_ieee_setets(struct net_device *netdev, 1458c2ecf20Sopenharmony_ci struct ieee_ets *ets) 1468c2ecf20Sopenharmony_ci{ 1478c2ecf20Sopenharmony_ci struct xgbe_prv_data *pdata = netdev_priv(netdev); 1488c2ecf20Sopenharmony_ci unsigned int i, tc_ets, tc_ets_weight; 1498c2ecf20Sopenharmony_ci u8 max_tc = 0; 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci tc_ets = 0; 1528c2ecf20Sopenharmony_ci tc_ets_weight = 0; 1538c2ecf20Sopenharmony_ci for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { 1548c2ecf20Sopenharmony_ci netif_dbg(pdata, drv, netdev, 1558c2ecf20Sopenharmony_ci "TC%u: tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n", i, 1568c2ecf20Sopenharmony_ci ets->tc_tx_bw[i], ets->tc_rx_bw[i], 1578c2ecf20Sopenharmony_ci ets->tc_tsa[i]); 1588c2ecf20Sopenharmony_ci netif_dbg(pdata, drv, netdev, "PRIO%u: TC=%hhu\n", i, 1598c2ecf20Sopenharmony_ci ets->prio_tc[i]); 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci max_tc = max_t(u8, max_tc, ets->prio_tc[i]); 1628c2ecf20Sopenharmony_ci if ((ets->tc_tx_bw[i] || ets->tc_tsa[i])) 1638c2ecf20Sopenharmony_ci max_tc = max_t(u8, max_tc, i); 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci switch (ets->tc_tsa[i]) { 1668c2ecf20Sopenharmony_ci case IEEE_8021QAZ_TSA_STRICT: 1678c2ecf20Sopenharmony_ci break; 1688c2ecf20Sopenharmony_ci case IEEE_8021QAZ_TSA_ETS: 1698c2ecf20Sopenharmony_ci tc_ets = 1; 1708c2ecf20Sopenharmony_ci tc_ets_weight += ets->tc_tx_bw[i]; 1718c2ecf20Sopenharmony_ci break; 1728c2ecf20Sopenharmony_ci default: 1738c2ecf20Sopenharmony_ci netif_err(pdata, drv, netdev, 1748c2ecf20Sopenharmony_ci "unsupported TSA algorithm (%hhu)\n", 1758c2ecf20Sopenharmony_ci ets->tc_tsa[i]); 1768c2ecf20Sopenharmony_ci return -EINVAL; 1778c2ecf20Sopenharmony_ci } 1788c2ecf20Sopenharmony_ci } 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci /* Check maximum traffic class requested */ 1818c2ecf20Sopenharmony_ci if (max_tc >= pdata->hw_feat.tc_cnt) { 1828c2ecf20Sopenharmony_ci netif_err(pdata, drv, netdev, 1838c2ecf20Sopenharmony_ci "exceeded number of supported traffic classes\n"); 1848c2ecf20Sopenharmony_ci return -EINVAL; 1858c2ecf20Sopenharmony_ci } 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci /* Weights must add up to 100% */ 1888c2ecf20Sopenharmony_ci if (tc_ets && (tc_ets_weight != 100)) { 1898c2ecf20Sopenharmony_ci netif_err(pdata, drv, netdev, 1908c2ecf20Sopenharmony_ci "sum of ETS algorithm weights is not 100 (%u)\n", 1918c2ecf20Sopenharmony_ci tc_ets_weight); 1928c2ecf20Sopenharmony_ci return -EINVAL; 1938c2ecf20Sopenharmony_ci } 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci if (!pdata->ets) { 1968c2ecf20Sopenharmony_ci pdata->ets = devm_kzalloc(pdata->dev, sizeof(*pdata->ets), 1978c2ecf20Sopenharmony_ci GFP_KERNEL); 1988c2ecf20Sopenharmony_ci if (!pdata->ets) 1998c2ecf20Sopenharmony_ci return -ENOMEM; 2008c2ecf20Sopenharmony_ci } 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci pdata->num_tcs = max_tc + 1; 2038c2ecf20Sopenharmony_ci memcpy(pdata->ets, ets, sizeof(*pdata->ets)); 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci pdata->hw_if.config_dcb_tc(pdata); 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci return 0; 2088c2ecf20Sopenharmony_ci} 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_cistatic int xgbe_dcb_ieee_getpfc(struct net_device *netdev, 2118c2ecf20Sopenharmony_ci struct ieee_pfc *pfc) 2128c2ecf20Sopenharmony_ci{ 2138c2ecf20Sopenharmony_ci struct xgbe_prv_data *pdata = netdev_priv(netdev); 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_ci /* Set number of supported PFC traffic classes */ 2168c2ecf20Sopenharmony_ci pfc->pfc_cap = pdata->hw_feat.tc_cnt; 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci if (pdata->pfc) { 2198c2ecf20Sopenharmony_ci pfc->pfc_en = pdata->pfc->pfc_en; 2208c2ecf20Sopenharmony_ci pfc->mbc = pdata->pfc->mbc; 2218c2ecf20Sopenharmony_ci pfc->delay = pdata->pfc->delay; 2228c2ecf20Sopenharmony_ci } 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci return 0; 2258c2ecf20Sopenharmony_ci} 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_cistatic int xgbe_dcb_ieee_setpfc(struct net_device *netdev, 2288c2ecf20Sopenharmony_ci struct ieee_pfc *pfc) 2298c2ecf20Sopenharmony_ci{ 2308c2ecf20Sopenharmony_ci struct xgbe_prv_data *pdata = netdev_priv(netdev); 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci netif_dbg(pdata, drv, netdev, 2338c2ecf20Sopenharmony_ci "cap=%hhu, en=%#hhx, mbc=%hhu, delay=%hhu\n", 2348c2ecf20Sopenharmony_ci pfc->pfc_cap, pfc->pfc_en, pfc->mbc, pfc->delay); 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci /* Check PFC for supported number of traffic classes */ 2378c2ecf20Sopenharmony_ci if (pfc->pfc_en & ~((1 << pdata->hw_feat.tc_cnt) - 1)) { 2388c2ecf20Sopenharmony_ci netif_err(pdata, drv, netdev, 2398c2ecf20Sopenharmony_ci "PFC requested for unsupported traffic class\n"); 2408c2ecf20Sopenharmony_ci return -EINVAL; 2418c2ecf20Sopenharmony_ci } 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci if (!pdata->pfc) { 2448c2ecf20Sopenharmony_ci pdata->pfc = devm_kzalloc(pdata->dev, sizeof(*pdata->pfc), 2458c2ecf20Sopenharmony_ci GFP_KERNEL); 2468c2ecf20Sopenharmony_ci if (!pdata->pfc) 2478c2ecf20Sopenharmony_ci return -ENOMEM; 2488c2ecf20Sopenharmony_ci } 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci memcpy(pdata->pfc, pfc, sizeof(*pdata->pfc)); 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci pdata->hw_if.config_dcb_pfc(pdata); 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci return 0; 2558c2ecf20Sopenharmony_ci} 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_cistatic u8 xgbe_dcb_getdcbx(struct net_device *netdev) 2588c2ecf20Sopenharmony_ci{ 2598c2ecf20Sopenharmony_ci return DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE; 2608c2ecf20Sopenharmony_ci} 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_cistatic u8 xgbe_dcb_setdcbx(struct net_device *netdev, u8 dcbx) 2638c2ecf20Sopenharmony_ci{ 2648c2ecf20Sopenharmony_ci struct xgbe_prv_data *pdata = netdev_priv(netdev); 2658c2ecf20Sopenharmony_ci u8 support = xgbe_dcb_getdcbx(netdev); 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci netif_dbg(pdata, drv, netdev, "DCBX=%#hhx\n", dcbx); 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci if (dcbx & ~support) 2708c2ecf20Sopenharmony_ci return 1; 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci if ((dcbx & support) != support) 2738c2ecf20Sopenharmony_ci return 1; 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci return 0; 2768c2ecf20Sopenharmony_ci} 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_cistatic const struct dcbnl_rtnl_ops xgbe_dcbnl_ops = { 2798c2ecf20Sopenharmony_ci /* IEEE 802.1Qaz std */ 2808c2ecf20Sopenharmony_ci .ieee_getets = xgbe_dcb_ieee_getets, 2818c2ecf20Sopenharmony_ci .ieee_setets = xgbe_dcb_ieee_setets, 2828c2ecf20Sopenharmony_ci .ieee_getpfc = xgbe_dcb_ieee_getpfc, 2838c2ecf20Sopenharmony_ci .ieee_setpfc = xgbe_dcb_ieee_setpfc, 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci /* DCBX configuration */ 2868c2ecf20Sopenharmony_ci .getdcbx = xgbe_dcb_getdcbx, 2878c2ecf20Sopenharmony_ci .setdcbx = xgbe_dcb_setdcbx, 2888c2ecf20Sopenharmony_ci}; 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ciconst struct dcbnl_rtnl_ops *xgbe_get_dcbnl_ops(void) 2918c2ecf20Sopenharmony_ci{ 2928c2ecf20Sopenharmony_ci return &xgbe_dcbnl_ops; 2938c2ecf20Sopenharmony_ci} 294