提交 679fda1a 编写于 作者: N Nicolas Kaiser 提交者: John W. Linville

net/mac80211: always true conditionals

Correct always true conditionals.
Signed-off-by: NNicolas Kaiser <nikai@nikai.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 6b4bec01
...@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (params->vlan) { if (params->vlan) {
sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN &&
sdata->vif.type != IEEE80211_IF_TYPE_AP) sdata->vif.type != IEEE80211_IF_TYPE_AP)
return -EINVAL; return -EINVAL;
} else } else
...@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, ...@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
if (params->vlan && params->vlan != sta->sdata->dev) { if (params->vlan && params->vlan != sta->sdata->dev) {
vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN &&
vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { vlansdata->vif.type != IEEE80211_IF_TYPE_AP) {
rcu_read_unlock(); rcu_read_unlock();
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册