[patch 7/7] [patch] rtl8192u: Clarify logic in‘ieee80211_wx_get_encode_ext_rsl()

Simon Horman horms at verge.net.au
Wed Dec 23 10:39:37 UTC 2009


Signed-off-by: Simon Horman <horms at verge.net.au>

--- 

I think this is what is meant.

Compile tested only.

$ gcc --version
gcc (Debian 4.4.2-6) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make CONFIG_DEBUG_SECTION_MISMATCH=y
...
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c: In function ‘ieee80211_wx_get_encode_ext_rsl’:
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:721: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’
...

[ Trying again as vger didn't like the headers the first time around ]

Index: gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
===================================================================
--- gregkh-2.6.orig/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2009-12-23 19:14:41.000000000 +1100
+++ gregkh-2.6/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c	2009-12-23 19:14:44.000000000 +1100
@@ -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