linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: ath5k: Extend get_default_sifs/slot_time
@ 2013-01-11  6:57 Dan Carpenter
  2013-01-12  3:31 ` Nick Kossifidis
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-01-11  6:57 UTC (permalink / raw)
  To: mickflemm; +Cc: linux-wireless, ath5k-devel

Hello Nick Kossifidis,

The patch 3017fcab416d: "ath5k: Extend get_default_sifs/slot_time" 
from Nov 23, 2010, leads to the following warning:
drivers/net/wireless/ath/ath5k/pcu.c:223 ath5k_hw_get_default_sifs()
	 warn: missing break? reassigning 'sifs'

   209          switch (ah->ah_bwmode) {
   210          case AR5K_BWMODE_40MHZ:
   211                  sifs = AR5K_INIT_SIFS_TURBO;
   212                  break;
   213          case AR5K_BWMODE_10MHZ:
   214                  sifs = AR5K_INIT_SIFS_HALF_RATE;
   215                  break;
   216          case AR5K_BWMODE_5MHZ:
   217                  sifs = AR5K_INIT_SIFS_QUARTER_RATE;
   218                  break;
   219          case AR5K_BWMODE_DEFAULT:
   220                  sifs = AR5K_INIT_SIFS_DEFAULT_BG;
   221          default:

Was it intentional to fall through to the default case here?  Most of
the intentional fall through sites (80-90%) have a /* fall through */
comment.

   222                  if (channel->band == IEEE80211_BAND_5GHZ)
   223                          sifs = AR5K_INIT_SIFS_DEFAULT_A;
   224                  break;
   225          }

regards,
dan carpenter


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

* Re: ath5k: Extend get_default_sifs/slot_time
  2013-01-11  6:57 ath5k: Extend get_default_sifs/slot_time Dan Carpenter
@ 2013-01-12  3:31 ` Nick Kossifidis
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Kossifidis @ 2013-01-12  3:31 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless, ath5k-devel

2013/1/11 Dan Carpenter <dan.carpenter@oracle.com>:
> ath5k: Extend get_default_sifs/slot_time

Hello Dan and thanks a lot for the review !

I should probably just move

sifs = AR5K_INIT_SIFS_DEFAULT_BG;

to default: and treat AR5K_BWMODE_DEFAULT and default: the same way,
it's misleading this way + if bwmode is not set during attach (right
now it does), sifs might stay unassigned. The same problem occurs with
ath5k_hw_get_default_slottime also.

I'll post a patch as soon as i find some time to work on ath5k again,
right now I have some physics exams at uni. It works but you are right
it's ugly.

Again thanks a lot for your time :-)

-- 
GPG ID: 0xEE878588
As you read this post global entropy rises. Have Fun ;-)
Nick

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

end of thread, other threads:[~2013-01-12  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11  6:57 ath5k: Extend get_default_sifs/slot_time Dan Carpenter
2013-01-12  3:31 ` Nick Kossifidis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).