Skip to contentSkip to conversation

ath5k: Extend get_default_sifs/slot_time

DISCUSSION Dan Carpenter 2 participants 2 messages Jan 11, 2013 – Jan 12, 2013

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

2013/1/11 Dan Carpenter <[email protected]>:

Quoted 1 line

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 :-)

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