offload.type = TC_SETUP_CLSU32;
offload.cls_u32 = &u32_offload;
- if (dev->netdev_ops->ndo_setup_tc) {
+ if (tc_should_offload(dev)) {
offload.cls_u32->command = TC_CLSU32_DELETE_KNODE;
offload.cls_u32->knode.handle = handle;
dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle,
offload.type = TC_SETUP_CLSU32;
offload.cls_u32 = &u32_offload;
- if (dev->netdev_ops->ndo_setup_tc) {
+ if (tc_should_offload(dev)) {
offload.cls_u32->command = TC_CLSU32_NEW_HNODE;
offload.cls_u32->hnode.divisor = h->divisor;
offload.cls_u32->hnode.handle = h->handle;
offload.type = TC_SETUP_CLSU32;
offload.cls_u32 = &u32_offload;
- if (dev->netdev_ops->ndo_setup_tc) {
+ if (tc_should_offload(dev)) {
offload.cls_u32->command = TC_CLSU32_DELETE_HNODE;
offload.cls_u32->hnode.divisor = h->divisor;
offload.cls_u32->hnode.handle = h->handle;
offload.type = TC_SETUP_CLSU32;
offload.cls_u32 = &u32_offload;
- if (dev->netdev_ops->ndo_setup_tc) {
+ if (tc_should_offload(dev)) {
offload.cls_u32->command = TC_CLSU32_REPLACE_KNODE;
offload.cls_u32->knode.handle = n->handle;
offload.cls_u32->knode.fshift = n->fshift;