Skip to contentSkip to conversation

ath9k: Fix issue with MCS15

bug report Dan Carpenter 1 participant 1 message May 17, 2018

lore
Share & tools
lore
#0 lore raw

Hello Sujith Manoharan,

The patch 6fcbe538be43: "ath9k: Fix issue with MCS15" from Nov 14, 2013, leads to the following static checker warning:

	drivers/net/wireless/ath/ath9k/ar9003_phy.c:836 ar9003_doubler_fix()
	warn: 'ah->hw_version.macVersion == 448' 'false' implies 'ah->hw_version.macVersion == 448' is 'false'

drivers/net/wireless/ath/ath9k/ar9003_phy.c
834 static void ar9003_doubler_fix(struct ath_hw *ah) 835 {
836 if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9550(ah)) {

The problem is that both AR_SREV_VERSION_9300 and AR_SREV_VERSION_9580 are 0x1c0 so the test for AR_SREV_9580() is duplicative.

   837                  REG_RMW(ah, AR_PHY_65NM_CH0_RXTX2,
   838                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S |
   839                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S, 0);
   840                  REG_RMW(ah, AR_PHY_65NM_CH1_RXTX2,
   841                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S |
   842                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S, 0);
   843                  REG_RMW(ah, AR_PHY_65NM_CH2_RXTX2,
   844                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S |
   845                          1 << AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S, 0);
   846  
   847                  udelay(200);
   848  

regards,
dan carpenter