Search Linux Wireless

[PATCH] ath9k: Fix an operator typo in phy rate validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was not supposed to be a bitwise AND operation, but a check of
two separate conditions. Anyway, the old code happened to result in
the same behavior, so this is just changing the code to be easier to
understand and also to keep sparse from warning about dubious
operators.

Signed-off-by: Jouni Malinen <jouni.malinen@xxxxxxxxxxx>

---
 drivers/net/wireless/ath9k/rc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/drivers/net/wireless/ath9k/rc.c	2009-01-13 14:11:26.000000000 +0200
+++ wireless-testing/drivers/net/wireless/ath9k/rc.c	2009-01-13 14:11:37.000000000 +0200
@@ -490,7 +490,7 @@ static inline int ath_rc_get_nextvalid_t
 
 static int ath_rc_valid_phyrate(u32 phy, u32 capflag, int ignore_cw)
 {
-	if (WLAN_RC_PHY_HT(phy) & !(capflag & WLAN_RC_HT_FLAG))
+	if (WLAN_RC_PHY_HT(phy) && !(capflag & WLAN_RC_HT_FLAG))
 		return 0;
 	if (WLAN_RC_PHY_DS(phy) && !(capflag & WLAN_RC_DS_FLAG))
 		return 0;

-- 
Jouni Malinen                                            PGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux