cxgb4: Return error if setup_rss is called before probe
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
52a5f8463b
commit
6ac5fe75df
1 changed files with 8 additions and 4 deletions
|
@ -1015,11 +1015,15 @@ static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key,
|
||||||
if (!p)
|
if (!p)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Interface must be brought up atleast once */
|
||||||
|
if (pi->adapter->flags & FULL_INIT_DONE) {
|
||||||
for (i = 0; i < pi->rss_size; i++)
|
for (i = 0; i < pi->rss_size; i++)
|
||||||
pi->rss[i] = p[i];
|
pi->rss[i] = p[i];
|
||||||
if (pi->adapter->flags & FULL_INIT_DONE)
|
|
||||||
return cxgb4_write_rss(pi, pi->rss);
|
return cxgb4_write_rss(pi, pi->rss);
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
||||||
|
|
Loading…
Add table
Reference in a new issue