net/mac80211: always true conditionals
authorNicolas Kaiser <nikai@nikai.net>
Tue, 20 May 2008 16:42:54 +0000 (18:42 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 28 May 2008 20:43:41 +0000 (16:43 -0400)
Correct always true conditionals.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c

index 699d97b..a9fce4a 100644 (file)
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
        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)
                        return -EINVAL;
        } else
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
        if (params->vlan && params->vlan != sta->sdata->dev) {
                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) {
                        rcu_read_unlock();
                        return -EINVAL;