[patch] precedence bug in ieee80211_wx_get_encode_ext()

Dan Carpenter error27 at gmail.com
Sun Jan 3 15:23:49 UTC 2010


The original test is always false because ! has precendence over &.

Signed-off-by: Dan Carpenter <error27 at gmail.com>

--- orig/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2010-01-03 17:13:32.000000000 +0200
+++ devel/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2010-01-03 17:15:15.000000000 +0200
@@ -718,7 +718,7 @@ int ieee80211_wx_get_encode_ext(struct i
 	} else
 		idx = ieee->tx_keyidx;
 
-	if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY &&
+	if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) &&
 	    ext->alg != IW_ENCODE_ALG_WEP)
 		if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
 			return -EINVAL;



More information about the devel mailing list