浏览代码

ath9k: Fix an operator typo in phy rate validation

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@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen 16 年之前
父节点
当前提交
b657eade2f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/ath9k/rc.c

+ 1 - 1
drivers/net/wireless/ath9k/rc.c

@@ -490,7 +490,7 @@ static inline int ath_rc_get_nextvalid_txrate(struct ath_rate_table *rate_table,
 
 
 static int ath_rc_valid_phyrate(u32 phy, u32 capflag, int ignore_cw)
 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;
 		return 0;
 	if (WLAN_RC_PHY_DS(phy) && !(capflag & WLAN_RC_DS_FLAG))
 	if (WLAN_RC_PHY_DS(phy) && !(capflag & WLAN_RC_DS_FLAG))
 		return 0;
 		return 0;