aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/eeprom.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index 8af477dd6fc7..644962adda97 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -414,27 +414,11 @@ static int ath5k_eeprom_read_modes(struct ath5k_hw *ah, u32 *offset,
414 break; 414 break;
415 } 415 }
416 416
417done: 417 /*
418 /* return new offset */ 418 * Read turbo mode information on newer EEPROM versions
419 *offset = o; 419 */
420
421 return 0;
422}
423
424/*
425 * Read turbo mode information on newer EEPROM versions
426 */
427static int
428ath5k_eeprom_read_turbo_modes(struct ath5k_hw *ah,
429 u32 *offset, unsigned int mode)
430{
431 struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
432 u32 o = *offset;
433 u16 val;
434 int ret;
435
436 if (ee->ee_version < AR5K_EEPROM_VERSION_5_0) 420 if (ee->ee_version < AR5K_EEPROM_VERSION_5_0)
437 return 0; 421 goto done;
438 422
439 switch (mode){ 423 switch (mode){
440 case AR5K_EEPROM_MODE_11A: 424 case AR5K_EEPROM_MODE_11A:
@@ -468,6 +452,7 @@ ath5k_eeprom_read_turbo_modes(struct ath5k_hw *ah,
468 break; 452 break;
469 } 453 }
470 454
455done:
471 /* return new offset */ 456 /* return new offset */
472 *offset = o; 457 *offset = o;
473 458
@@ -504,10 +489,6 @@ ath5k_eeprom_init_modes(struct ath5k_hw *ah)
504 ret = ath5k_eeprom_read_modes(ah, &offset, mode); 489 ret = ath5k_eeprom_read_modes(ah, &offset, mode);
505 if (ret) 490 if (ret)
506 return ret; 491 return ret;
507
508 ret = ath5k_eeprom_read_turbo_modes(ah, &offset, mode);
509 if (ret)
510 return ret;
511 } 492 }
512 493
513 /* override for older eeprom versions for better performance */ 494 /* override for older eeprom versions for better performance */