Several comparisons were always evaluated to false due to incorrect logical
operations.

Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>

---

 net/d80211/ieee80211_ioctl.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

--- dscape.orig/net/d80211/ieee80211_ioctl.c
+++ dscape/net/d80211/ieee80211_ioctl.c
@@ -2500,7 +2500,7 @@ static int ieee80211_ioctl_prism2_param(
                break;
 
        case PRISM2_PARAM_MIXED_CELL:
-               if (sdata->type != IEEE80211_IF_TYPE_STA ||
+               if (sdata->type != IEEE80211_IF_TYPE_STA &&
                    sdata->type != IEEE80211_IF_TYPE_IBSS)
                        ret = -EINVAL;
                else
@@ -2525,7 +2525,7 @@ static int ieee80211_ioctl_prism2_param(
                        sdata->u.sta.create_ibss = !!value;
                break;
        case PRISM2_PARAM_WMM_ENABLED:
-               if (sdata->type != IEEE80211_IF_TYPE_STA ||
+               if (sdata->type != IEEE80211_IF_TYPE_STA &&
                    sdata->type != IEEE80211_IF_TYPE_IBSS)
                        ret = -EINVAL;
                else
@@ -2712,7 +2712,7 @@ static int ieee80211_ioctl_get_prism2_pa
                break;
 
        case PRISM2_PARAM_MIXED_CELL:
-               if (sdata->type != IEEE80211_IF_TYPE_STA ||
+               if (sdata->type != IEEE80211_IF_TYPE_STA &&
                    sdata->type != IEEE80211_IF_TYPE_IBSS)
                        ret = -EINVAL;
                else
@@ -2726,7 +2726,7 @@ static int ieee80211_ioctl_get_prism2_pa
                        *param = sdata->u.sta.key_mgmt;
                break;
        case PRISM2_PARAM_WMM_ENABLED:
-               if (sdata->type != IEEE80211_IF_TYPE_STA ||
+               if (sdata->type != IEEE80211_IF_TYPE_STA &&
                    sdata->type != IEEE80211_IF_TYPE_IBSS)
                        ret = -EINVAL;
                else
@@ -2778,7 +2778,7 @@ static int ieee80211_ioctl_siwmlme(struc
        struct iw_mlme *mlme = (struct iw_mlme *) extra;
 
        sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-       if (sdata->type != IEEE80211_IF_TYPE_STA ||
+       if (sdata->type != IEEE80211_IF_TYPE_STA &&
            sdata->type != IEEE80211_IF_TYPE_IBSS)
                return -EINVAL;
 

-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to