|
@@ -1786,7 +1786,7 @@ static struct dcb_app_type *dcb_app_lookup(const struct dcb_app *app,
|
|
if (itr->app.selector == app->selector &&
|
|
if (itr->app.selector == app->selector &&
|
|
itr->app.protocol == app->protocol &&
|
|
itr->app.protocol == app->protocol &&
|
|
itr->ifindex == ifindex &&
|
|
itr->ifindex == ifindex &&
|
|
- (!prio || itr->app.priority == prio))
|
|
|
|
|
|
+ ((prio == -1) || itr->app.priority == prio))
|
|
return itr;
|
|
return itr;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1821,7 +1821,8 @@ u8 dcb_getapp(struct net_device *dev, struct dcb_app *app)
|
|
u8 prio = 0;
|
|
u8 prio = 0;
|
|
|
|
|
|
spin_lock_bh(&dcb_lock);
|
|
spin_lock_bh(&dcb_lock);
|
|
- if ((itr = dcb_app_lookup(app, dev->ifindex, 0)))
|
|
|
|
|
|
+ itr = dcb_app_lookup(app, dev->ifindex, -1);
|
|
|
|
+ if (itr)
|
|
prio = itr->app.priority;
|
|
prio = itr->app.priority;
|
|
spin_unlock_bh(&dcb_lock);
|
|
spin_unlock_bh(&dcb_lock);
|
|
|
|
|
|
@@ -1849,7 +1850,8 @@ int dcb_setapp(struct net_device *dev, struct dcb_app *new)
|
|
|
|
|
|
spin_lock_bh(&dcb_lock);
|
|
spin_lock_bh(&dcb_lock);
|
|
/* Search for existing match and replace */
|
|
/* Search for existing match and replace */
|
|
- if ((itr = dcb_app_lookup(new, dev->ifindex, 0))) {
|
|
|
|
|
|
+ itr = dcb_app_lookup(new, dev->ifindex, -1);
|
|
|
|
+ if (itr) {
|
|
if (new->priority)
|
|
if (new->priority)
|
|
itr->app.priority = new->priority;
|
|
itr->app.priority = new->priority;
|
|
else {
|
|
else {
|
|
@@ -1882,7 +1884,8 @@ u8 dcb_ieee_getapp_mask(struct net_device *dev, struct dcb_app *app)
|
|
u8 prio = 0;
|
|
u8 prio = 0;
|
|
|
|
|
|
spin_lock_bh(&dcb_lock);
|
|
spin_lock_bh(&dcb_lock);
|
|
- if ((itr = dcb_app_lookup(app, dev->ifindex, 0)))
|
|
|
|
|
|
+ itr = dcb_app_lookup(app, dev->ifindex, -1);
|
|
|
|
+ if (itr)
|
|
prio |= 1 << itr->app.priority;
|
|
prio |= 1 << itr->app.priority;
|
|
spin_unlock_bh(&dcb_lock);
|
|
spin_unlock_bh(&dcb_lock);
|
|
|
|
|