Lines Matching full:netdev
12 * @netdev: device associated with interface that needs reset
14 static void ice_dcbnl_devreset(struct net_device *netdev) in ice_dcbnl_devreset() argument
16 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_devreset()
21 dev_close(netdev); in ice_dcbnl_devreset()
22 netdev_state_change(netdev); in ice_dcbnl_devreset()
23 dev_open(netdev, NULL); in ice_dcbnl_devreset()
24 netdev_state_change(netdev); in ice_dcbnl_devreset()
29 * @netdev: the relevant netdev
32 static int ice_dcbnl_getets(struct net_device *netdev, struct ieee_ets *ets) in ice_dcbnl_getets() argument
37 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getets()
59 * @netdev: pointer to relevant netdev
62 static int ice_dcbnl_setets(struct net_device *netdev, struct ieee_ets *ets) in ice_dcbnl_setets() argument
64 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setets()
74 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_setets()
114 ice_dcbnl_devreset(netdev); in ice_dcbnl_setets()
125 * @dev: pointer to netdev struct
145 * @netdev: pointer to the netdev struct
147 static u8 ice_dcbnl_getdcbx(struct net_device *netdev) in ice_dcbnl_getdcbx() argument
149 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getdcbx()
156 * @netdev: the corresponding netdev
159 static u8 ice_dcbnl_setdcbx(struct net_device *netdev, u8 mode) in ice_dcbnl_setdcbx() argument
161 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setdcbx()
179 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_setdcbx()
202 * @netdev: pointer to netdev struct
205 static void ice_dcbnl_get_perm_hw_addr(struct net_device *netdev, u8 *perm_addr) in ice_dcbnl_get_perm_hw_addr() argument
207 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_perm_hw_addr()
213 for (i = 0; i < netdev->addr_len; i++) in ice_dcbnl_get_perm_hw_addr()
216 for (j = 0; j < netdev->addr_len; j++, i++) in ice_dcbnl_get_perm_hw_addr()
235 * @netdev: pointer to netdev struct
238 static int ice_dcbnl_getpfc(struct net_device *netdev, struct ieee_pfc *pfc) in ice_dcbnl_getpfc() argument
240 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfc()
261 * @netdev: pointer to relevant netdev
264 static int ice_dcbnl_setpfc(struct net_device *netdev, struct ieee_pfc *pfc) in ice_dcbnl_setpfc() argument
266 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setpfc()
275 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_setpfc()
292 ice_dcbnl_devreset(netdev); in ice_dcbnl_setpfc()
301 * @netdev: pointer to netdev struct
306 ice_dcbnl_get_pfc_cfg(struct net_device *netdev, int prio, u8 *setting) in ice_dcbnl_get_pfc_cfg() argument
308 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pfc_cfg()
325 * @netdev: the corresponding netdev
329 static void ice_dcbnl_set_pfc_cfg(struct net_device *netdev, int prio, u8 set) in ice_dcbnl_set_pfc_cfg() argument
331 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pfc_cfg()
342 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_set_pfc_cfg()
360 * @netdev: pointer to netdev struct
362 static u8 ice_dcbnl_getpfcstate(struct net_device *netdev) in ice_dcbnl_getpfcstate() argument
364 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfcstate()
376 * @netdev: pointer to netdev struct
378 static u8 ice_dcbnl_getstate(struct net_device *netdev) in ice_dcbnl_getstate() argument
380 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getstate()
391 * @netdev: pointer to relevant netdev
394 static u8 ice_dcbnl_setstate(struct net_device *netdev, u8 state) in ice_dcbnl_setstate() argument
396 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setstate()
403 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_setstate()
425 * @netdev: pointer to netdev struct
433 ice_dcbnl_get_pg_tc_cfg_tx(struct net_device *netdev, int prio, in ice_dcbnl_get_pg_tc_cfg_tx() argument
438 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_tx()
455 * @netdev: pointer to relevant netdev
463 ice_dcbnl_set_pg_tc_cfg_tx(struct net_device *netdev, int tc, in ice_dcbnl_set_pg_tc_cfg_tx() argument
468 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_tx()
480 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_set_pg_tc_cfg_tx()
497 * @netdev: pointer to the netdev struct
502 ice_dcbnl_get_pg_bwg_cfg_tx(struct net_device *netdev, int pgid, u8 *bw_pct) in ice_dcbnl_get_pg_bwg_cfg_tx() argument
504 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_tx()
521 * @netdev: the corresponding netdev
526 ice_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int pgid, u8 bw_pct) in ice_dcbnl_set_pg_bwg_cfg_tx() argument
528 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_tx()
539 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_set_pg_bwg_cfg_tx()
550 * @netdev: pointer to netdev struct
558 ice_dcbnl_get_pg_tc_cfg_rx(struct net_device *netdev, int prio, in ice_dcbnl_get_pg_tc_cfg_rx() argument
563 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_rx()
578 * @netdev: relevant netdev struct
588 ice_dcbnl_set_pg_tc_cfg_rx(struct net_device *netdev, in ice_dcbnl_set_pg_tc_cfg_rx() argument
595 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_rx()
602 * @netdev: pointer to netdev struct
607 ice_dcbnl_get_pg_bwg_cfg_rx(struct net_device *netdev, int __always_unused pgid, in ice_dcbnl_get_pg_bwg_cfg_rx() argument
610 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_rx()
621 * @netdev: the corresponding netdev
628 ice_dcbnl_set_pg_bwg_cfg_rx(struct net_device *netdev, int __always_unused pgid, in ice_dcbnl_set_pg_bwg_cfg_rx() argument
631 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_rx()
638 * @netdev: pointer to netdev struct
642 static u8 ice_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap) in ice_dcbnl_get_cap() argument
644 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_cap()
686 * @netdev: pointer to netdev struct
690 static int ice_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id) in ice_dcbnl_getapp() argument
692 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getapp()
702 return dcb_getapp(netdev, &app); in ice_dcbnl_getapp()
730 * @netdev: relevant netdev struct
733 static int ice_dcbnl_setapp(struct net_device *netdev, struct dcb_app *app) in ice_dcbnl_setapp() argument
735 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setapp()
747 netdev_err(netdev, "can't do DSCP QoS when FW DCB agent active\n"); in ice_dcbnl_setapp()
758 netdev_err(netdev, "DSCP value 0x%04X out of range\n", in ice_dcbnl_setapp()
764 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_setapp()
770 netdev_err(netdev, "TC %d out of range, max TC %d\n", in ice_dcbnl_setapp()
781 ret = dcb_ieee_setapp(netdev, app); in ice_dcbnl_setapp()
786 netdev_err(netdev, "DSCP value 0x%04X already user mapped\n", in ice_dcbnl_setapp()
788 ret = dcb_ieee_delapp(netdev, app); in ice_dcbnl_setapp()
790 netdev_err(netdev, "Failed to delete re-mapping TLV\n"); in ice_dcbnl_setapp()
807 netdev_err(netdev, "Failed to set DSCP PFC mode %d\n", in ice_dcbnl_setapp()
811 netdev_info(netdev, "Switched QoS to L3 DSCP mode\n"); in ice_dcbnl_setapp()
851 ice_dcbnl_devreset(netdev); in ice_dcbnl_setapp()
862 * @netdev: relevant netdev
867 static int ice_dcbnl_delapp(struct net_device *netdev, struct dcb_app *app) in ice_dcbnl_delapp() argument
869 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_delapp()
875 netdev_err(netdev, "can't delete DSCP netlink app when FW DCB agent is active\n"); in ice_dcbnl_delapp()
880 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_delapp()
887 ret = dcb_ieee_delapp(netdev, app); in ice_dcbnl_delapp()
940 netdev_info(netdev, "Failed to set VLAN PFC mode %d\n", in ice_dcbnl_delapp()
944 netdev_info(netdev, "Switched QoS to L2 VLAN mode\n"); in ice_dcbnl_delapp()
957 ice_dcbnl_devreset(netdev); in ice_dcbnl_delapp()
973 * @netdev: the corresponding netdev
975 static u8 ice_dcbnl_cee_set_all(struct net_device *netdev) in ice_dcbnl_cee_set_all() argument
977 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_cee_set_all()
986 netdev_err(netdev, "DCB changes not allowed when in a bond\n"); in ice_dcbnl_cee_set_all()
1040 struct net_device *netdev = vsi->netdev; in ice_dcbnl_set_all() local
1047 if (!netdev) in ice_dcbnl_set_all()
1050 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_all()
1074 dcb_ieee_setapp(netdev, &sapp); in ice_dcbnl_set_all()
1078 dcbnl_ieee_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_SET, 0, 0); in ice_dcbnl_set_all()
1098 err = ice_dcbnl_delapp(vsi->netdev, &sapp); in ice_dcbnl_vsi_del_app()
1133 * @vsi: VSI to get associated netdev from
1137 struct net_device *netdev = vsi->netdev; in ice_dcbnl_setup() local
1140 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setup()
1144 netdev->dcbnl_ops = &dcbnl_ops; in ice_dcbnl_setup()