Lines Matching refs:pdata
120 static int xgbe_dcb_ieee_getets(struct xgbe_prv_data *pdata,
124 ets->ets_cap = pdata->hw_feat.tc_cnt;
126 if (pdata->ets) {
127 ets->cbs = pdata->ets->cbs;
128 memcpy(ets->tc_tx_bw, pdata->ets->tc_tx_bw,
130 memcpy(ets->tc_tsa, pdata->ets->tc_tsa,
132 memcpy(ets->prio_tc, pdata->ets->prio_tc,
139 static int xgbe_dcb_ieee_setets(struct xgbe_prv_data *pdata,
175 if (max_tc >= pdata->hw_feat.tc_cnt) {
189 if (!pdata->ets) {
190 pdata->ets = (struct ieee_ets *)malloc(sizeof(struct ieee_ets),
193 if (!pdata->ets)
197 pdata->num_tcs = max_tc + 1;
198 memcpy(pdata->ets, ets, sizeof(*pdata->ets));
200 pdata->hw_if.config_dcb_tc(pdata);
205 static int xgbe_dcb_ieee_getpfc(struct xgbe_prv_data *pdata,
210 pfc->pfc_cap = pdata->hw_feat.tc_cnt;
212 if (pdata->pfc) {
213 pfc->pfc_en = pdata->pfc->pfc_en;
214 pfc->mbc = pdata->pfc->mbc;
215 pfc->delay = pdata->pfc->delay;
221 static int xgbe_dcb_ieee_setpfc(struct xgbe_prv_data *pdata,
230 if (pfc->pfc_en & ~((1 << pdata->hw_feat.tc_cnt) - 1)) {
236 if (!pdata->pfc) {
237 pdata->pfc = (struct ieee_pfc *)malloc(sizeof(struct ieee_pfc),
240 if (!pdata->pfc)
244 memcpy(pdata->pfc, pfc, sizeof(*pdata->pfc));
246 pdata->hw_if.config_dcb_pfc(pdata);
251 static u8 xgbe_dcb_getdcbx(struct xgbe_prv_data *pdata)
256 static u8 xgbe_dcb_setdcbx(struct xgbe_prv_data *pdata, u8 dcbx)
258 u8 support = xgbe_dcb_getdcbx(pdata);