提交 6ac5fe75 编写于 作者: H Hariprasad Shenai 提交者: David S. Miller

cxgb4: Return error if setup_rss is called before probe

Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 52a5f846
...@@ -1015,11 +1015,15 @@ static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key, ...@@ -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;
for (i = 0; i < pi->rss_size; i++) /* Interface must be brought up atleast once */
pi->rss[i] = p[i]; if (pi->adapter->flags & FULL_INIT_DONE) {
if (pi->adapter->flags & FULL_INIT_DONE) for (i = 0; i < pi->rss_size; i++)
pi->rss[i] = p[i];
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册