All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] ath9k_htc: Support for AR9271 chipset.
@ 2015-08-11 21:43 Dan Carpenter
  2015-08-13 18:21   ` Oleksij Rempel
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2015-08-11 21:43 UTC (permalink / raw)
  To: ath9k-devel

Hello Sujith,

The patch fb9987d0f748: "ath9k_htc: Support for AR9271 chipset." from
Mar 17, 2010, leads to the following static checker warning:

	drivers/net/wireless/ath/ath9k/htc_drv_main.c:850 ath9k_htc_ani_work()
	warn: 'common->ani.caldone' can be either negative or positive

drivers/net/wireless/ath/ath9k/htc_drv_main.c
   830                  /* Perform calibration if necessary */
   831                  if (longcal || shortcal)
   832                          common->ani.caldone =
   833                                  ath9k_hw_calibrate(ah, ah->curchan,
   834                                                     ah->rxchainmask, longcal);

ath9k_hw_calibrate() returns true/false/-ETIMEOUT.


   835  
   836                  ath9k_htc_ps_restore(priv);
   837          }
   838  
   839  set_timer:
   840          /*
   841          * Set timer interval based on previous results.
   842          * The interval must be the shortest necessary to satisfy ANI,
   843          * short calibration and long calibration.
   844          */
   845          cal_interval = ATH_LONG_CALINTERVAL;
   846          cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL);
   847          if (!common->ani.caldone)

But we don't test for negative here.

   848                  cal_interval = min(cal_interval, (u32)short_cal_interval);
   849  
   850          ieee80211_queue_delayed_work(common->hw, &priv->ani_work,
   851                                       msecs_to_jiffies(cal_interval));
   852  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-25 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 21:43 [ath9k-devel] ath9k_htc: Support for AR9271 chipset Dan Carpenter
2015-08-13 18:21 ` [ath9k-devel] [PATCH] ath9k_htc: do ani shortcalibratio if we got -ETIMEDOUT Oleksij Rempel
2015-08-13 18:21   ` Oleksij Rempel
2015-08-14  5:10   ` [ath9k-devel] " Oleksij Rempel
2015-08-14  5:10     ` Oleksij Rempel
2015-08-14  5:16     ` [PATCH v2] " Oleksij Rempel
2015-08-25 12:10       ` [v2] " Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.