提交 90a8c74a 编写于 作者: Y YueHaibing 提交者: Kalle Valo

ipw2x00: cleanup dead code

Fix smatch warning:

drivers/net/wireless/intel/ipw2x00/ipw2100.c:5606
 shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)'
drivers/net/wireless/intel/ipw2x00/ipw2200.c:10725
 shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)'
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 4f68ef64
......@@ -5603,12 +5603,8 @@ static void shim__set_security(struct net_device *dev,
if ((sec->flags & SEC_ACTIVE_KEY) &&
priv->ieee->sec.active_key != sec->active_key) {
if (sec->active_key <= 3) {
priv->ieee->sec.active_key = sec->active_key;
priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
} else
priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
priv->ieee->sec.active_key = sec->active_key;
priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
priv->status |= STATUS_SECURITY_UPDATED;
}
......
......@@ -10722,11 +10722,8 @@ static void shim__set_security(struct net_device *dev,
}
if (sec->flags & SEC_ACTIVE_KEY) {
if (sec->active_key <= 3) {
priv->ieee->sec.active_key = sec->active_key;
priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
} else
priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
priv->ieee->sec.active_key = sec->active_key;
priv->ieee->sec.flags |= SEC_ACTIVE_KEY;
priv->status |= STATUS_SECURITY_UPDATED;
} else
priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册