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()
109 ice_dcbnl_devreset(netdev); in ice_dcbnl_setets()
120 * @dev: pointer to netdev struct
140 * @netdev: pointer to the netdev struct
142 static u8 ice_dcbnl_getdcbx(struct net_device *netdev) in ice_dcbnl_getdcbx() argument
144 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getdcbx()
151 * @netdev: the corresponding netdev
154 static u8 ice_dcbnl_setdcbx(struct net_device *netdev, u8 mode) in ice_dcbnl_setdcbx() argument
156 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setdcbx()
192 * @netdev: pointer to netdev struct
195 static void ice_dcbnl_get_perm_hw_addr(struct net_device *netdev, u8 *perm_addr) in ice_dcbnl_get_perm_hw_addr() argument
197 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_perm_hw_addr()
203 for (i = 0; i < netdev->addr_len; i++) in ice_dcbnl_get_perm_hw_addr()
206 for (j = 0; j < netdev->addr_len; j++, i++) in ice_dcbnl_get_perm_hw_addr()
225 * @netdev: pointer to netdev struct
228 static int ice_dcbnl_getpfc(struct net_device *netdev, struct ieee_pfc *pfc) in ice_dcbnl_getpfc() argument
230 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfc()
251 * @netdev: pointer to relevant netdev
254 static int ice_dcbnl_setpfc(struct net_device *netdev, struct ieee_pfc *pfc) in ice_dcbnl_setpfc() argument
256 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setpfc()
277 ice_dcbnl_devreset(netdev); in ice_dcbnl_setpfc()
286 * @netdev: pointer to netdev struct
291 ice_dcbnl_get_pfc_cfg(struct net_device *netdev, int prio, u8 *setting) in ice_dcbnl_get_pfc_cfg() argument
293 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pfc_cfg()
310 * @netdev: the corresponding netdev
314 static void ice_dcbnl_set_pfc_cfg(struct net_device *netdev, int prio, u8 set) in ice_dcbnl_set_pfc_cfg() argument
316 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pfc_cfg()
340 * @netdev: pointer to netdev struct
342 static u8 ice_dcbnl_getpfcstate(struct net_device *netdev) in ice_dcbnl_getpfcstate() argument
344 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfcstate()
356 * @netdev: pointer to netdev struct
358 static u8 ice_dcbnl_getstate(struct net_device *netdev) in ice_dcbnl_getstate() argument
360 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getstate()
371 * @netdev: pointer to relevant netdev
374 static u8 ice_dcbnl_setstate(struct net_device *netdev, u8 state) in ice_dcbnl_setstate() argument
376 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setstate()
400 * @netdev: pointer to netdev struct
408 ice_dcbnl_get_pg_tc_cfg_tx(struct net_device *netdev, int prio, in ice_dcbnl_get_pg_tc_cfg_tx() argument
413 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_tx()
430 * @netdev: pointer to relevant netdev
438 ice_dcbnl_set_pg_tc_cfg_tx(struct net_device *netdev, int tc, in ice_dcbnl_set_pg_tc_cfg_tx() argument
443 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_tx()
467 * @netdev: pointer to the netdev struct
472 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
474 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_tx()
491 * @netdev: the corresponding netdev
496 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
498 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_tx()
515 * @netdev: pointer to netdev struct
523 ice_dcbnl_get_pg_tc_cfg_rx(struct net_device *netdev, int prio, in ice_dcbnl_get_pg_tc_cfg_rx() argument
528 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_rx()
543 * @netdev: relevant netdev struct
553 ice_dcbnl_set_pg_tc_cfg_rx(struct net_device *netdev, in ice_dcbnl_set_pg_tc_cfg_rx() argument
560 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_rx()
567 * @netdev: pointer to netdev struct
572 ice_dcbnl_get_pg_bwg_cfg_rx(struct net_device *netdev, int __always_unused pgid, in ice_dcbnl_get_pg_bwg_cfg_rx() argument
575 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_rx()
586 * @netdev: the corresponding netdev
593 ice_dcbnl_set_pg_bwg_cfg_rx(struct net_device *netdev, int __always_unused pgid, in ice_dcbnl_set_pg_bwg_cfg_rx() argument
596 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_rx()
603 * @netdev: pointer to netdev struct
607 static u8 ice_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap) in ice_dcbnl_get_cap() argument
609 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_cap()
651 * @netdev: pointer to netdev struct
655 static int ice_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id) in ice_dcbnl_getapp() argument
657 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getapp()
667 return dcb_getapp(netdev, &app); in ice_dcbnl_getapp()
695 * @netdev: relevant netdev struct
698 static int ice_dcbnl_setapp(struct net_device *netdev, struct dcb_app *app) in ice_dcbnl_setapp() argument
700 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setapp()
712 netdev_err(netdev, "can't do DSCP QoS when FW DCB agent active\n"); in ice_dcbnl_setapp()
723 netdev_err(netdev, "DSCP value 0x%04X out of range\n", in ice_dcbnl_setapp()
730 netdev_err(netdev, "TC %d out of range, max TC %d\n", in ice_dcbnl_setapp()
741 ret = dcb_ieee_setapp(netdev, app); in ice_dcbnl_setapp()
746 netdev_err(netdev, "DSCP value 0x%04X already user mapped\n", in ice_dcbnl_setapp()
748 ret = dcb_ieee_delapp(netdev, app); in ice_dcbnl_setapp()
750 netdev_err(netdev, "Failed to delete re-mapping TLV\n"); in ice_dcbnl_setapp()
767 netdev_err(netdev, "Failed to set DSCP PFC mode %d\n", in ice_dcbnl_setapp()
771 netdev_info(netdev, "Switched QoS to L3 DSCP mode\n"); in ice_dcbnl_setapp()
811 ice_dcbnl_devreset(netdev); in ice_dcbnl_setapp()
822 * @netdev: relevant netdev
827 static int ice_dcbnl_delapp(struct net_device *netdev, struct dcb_app *app) in ice_dcbnl_delapp() argument
829 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_delapp()
835 netdev_err(netdev, "can't delete DSCP netlink app when FW DCB agent is active\n"); in ice_dcbnl_delapp()
842 ret = dcb_ieee_delapp(netdev, app); in ice_dcbnl_delapp()
895 netdev_info(netdev, "Failed to set VLAN PFC mode %d\n", in ice_dcbnl_delapp()
899 netdev_info(netdev, "Switched QoS to L2 VLAN mode\n"); in ice_dcbnl_delapp()
912 ice_dcbnl_devreset(netdev); in ice_dcbnl_delapp()
928 * @netdev: the corresponding netdev
930 static u8 ice_dcbnl_cee_set_all(struct net_device *netdev) in ice_dcbnl_cee_set_all() argument
932 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_cee_set_all()
990 struct net_device *netdev = vsi->netdev; in ice_dcbnl_set_all() local
997 if (!netdev) in ice_dcbnl_set_all()
1000 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_all()
1024 dcb_ieee_setapp(netdev, &sapp); in ice_dcbnl_set_all()
1028 dcbnl_ieee_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_SET, 0, 0); in ice_dcbnl_set_all()
1048 err = ice_dcbnl_delapp(vsi->netdev, &sapp); in ice_dcbnl_vsi_del_app()
1083 * @vsi: VSI to get associated netdev from
1087 struct net_device *netdev = vsi->netdev; in ice_dcbnl_setup() local
1090 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setup()
1094 netdev->dcbnl_ops = &dcbnl_ops; in ice_dcbnl_setup()