Lines Matching refs:pdata
122 static int xgbe_dcb_ieee_getets(struct xgbe_prv_data *pdata,
126 ets->ets_cap = pdata->hw_feat.tc_cnt;
128 if (pdata->ets) {
129 ets->cbs = pdata->ets->cbs;
130 memcpy(ets->tc_tx_bw, pdata->ets->tc_tx_bw,
132 memcpy(ets->tc_tsa, pdata->ets->tc_tsa,
134 memcpy(ets->prio_tc, pdata->ets->prio_tc,
141 static int xgbe_dcb_ieee_setets(struct xgbe_prv_data *pdata,
177 if (max_tc >= pdata->hw_feat.tc_cnt) {
191 if (!pdata->ets) {
192 pdata->ets = (struct ieee_ets *)malloc(sizeof(struct ieee_ets),
195 if (!pdata->ets)
199 pdata->num_tcs = max_tc + 1;
200 memcpy(pdata->ets, ets, sizeof(*pdata->ets));
202 pdata->hw_if.config_dcb_tc(pdata);
207 static int xgbe_dcb_ieee_getpfc(struct xgbe_prv_data *pdata,
212 pfc->pfc_cap = pdata->hw_feat.tc_cnt;
214 if (pdata->pfc) {
215 pfc->pfc_en = pdata->pfc->pfc_en;
216 pfc->mbc = pdata->pfc->mbc;
217 pfc->delay = pdata->pfc->delay;
223 static int xgbe_dcb_ieee_setpfc(struct xgbe_prv_data *pdata,
232 if (pfc->pfc_en & ~((1 << pdata->hw_feat.tc_cnt) - 1)) {
238 if (!pdata->pfc) {
239 pdata->pfc = (struct ieee_pfc *)malloc(sizeof(struct ieee_pfc),
242 if (!pdata->pfc)
246 memcpy(pdata->pfc, pfc, sizeof(*pdata->pfc));
248 pdata->hw_if.config_dcb_pfc(pdata);
253 static u8 xgbe_dcb_getdcbx(struct xgbe_prv_data *pdata)
258 static u8 xgbe_dcb_setdcbx(struct xgbe_prv_data *pdata, u8 dcbx)
260 u8 support = xgbe_dcb_getdcbx(pdata);