Skip to contentSkip to conversation

ath5k: Reset cleanup and generic cleanup

PATCH In review Nick Kossifidis 1 participant 1 message Nov 23, 2010 Atheros ATH5K wireless driver

lore
Share & tools
lore

Nick Kossifidis

author maintainer
#0 lore raw

PATCH 1/30 ath5k: Reset cleanup and generic cleanup

* No functional changes

* Clean up reset:
Introduce init functions for each unit and call them instead of having everything inside ath5k_hw_reset (it's just c/p for now so nothing changes except calling order -I tested it with various cards and it's ok-)

* Further cleanups:
ofdm_timings belongs to phy.c
rate_duration belongs to pcu.c
clock functions are general and belong to reset.c (more to follow)

* Reorder functions for better organization:
We start with helpers and other functions follow in categories, init functions are last

---
 drivers/net/wireless/ath/ath5k/ani.c    |    4 +-
 drivers/net/wireless/ath/ath5k/ath5k.h  |   60 ++--
 drivers/net/wireless/ath/ath5k/desc.c   |   24 +-
 drivers/net/wireless/ath/ath5k/dma.c    |   45 ++
 drivers/net/wireless/ath/ath5k/eeprom.c |  151 ++++---
 drivers/net/wireless/ath/ath5k/pcu.c    |  438 ++++++++++++--------
 drivers/net/wireless/ath/ath5k/phy.c    |  444 ++++++++++++++++-----
 drivers/net/wireless/ath/ath5k/qcu.c    |  130 ++++---
 drivers/net/wireless/ath/ath5k/reset.c  |  662 +++++++++----------------------
 9 files changed, 1053 insertions(+), 905 deletions(-)
drivers/net/wireless/ath/ath5k/ani.c +2 -2
index db98a85..8f1d3cb 100644
@@ -58,7 +58,7 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)
 {
 	/* TODO:
 	 * ANI documents suggest the following five levels to use, but the HAL
-	 * and ath9k use only use the last two levels, making this
+	 * and ath9k use only the last two levels, making this
 	 * essentially an on/off option. There *may* be a reason for this (???),
 	 * so i stick with the HAL version for now...
 	 */
@@ -68,9 +68,9 @@ ath5k_ani_set_noise_immunity_level(struct ath5k_hw *ah, int level)
 	const s8 sz[] = { -34, -41, -48, -55, -62 };
 	const s8 fr[] = { -70, -72, -75, -78, -80 };
 #else
-	const s8 sz[] = { -55, -62 };
 	const s8 lo[] = { -64, -70 };
 	const s8 hi[] = { -14, -12 };
+	const s8 sz[] = { -55, -62 };
 	const s8 fr[] = { -78, -80 };
 #endif
 	if (level < 0 || level >= ARRAY_SIZE(sz)) {
drivers/net/wireless/ath/ath5k/ath5k.h +36 -24

150 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/desc.c +18 -6
index 4324438..16b44ff 100644
@@ -26,9 +26,10 @@
 #include "debug.h"
 #include "base.h"
 
-/*
- * TX Descriptors
- */
+
+/************************\
+* TX Control descriptors *
+\************************/
 
 /*
  * Initialize the 2-word tx control descriptor on 5210/5211
@@ -335,6 +336,11 @@ ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc,
 	return 0;
 }
 
+
+/***********************\
+* TX Status descriptors *
+\***********************/
+
 /*
  * Proccess the tx status descriptor on 5210/5211
  */
@@ -476,9 +482,10 @@ static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *ah,
 	return 0;
 }
 
-/*
- * RX Descriptors
- */
+
+/****************\
+* RX Descriptors *
+\****************/
 
 /*
  * Initialize an rx control descriptor
@@ -666,6 +673,11 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
 	return 0;
 }
 
+
+/********\
+* Attach *
+\********/
+
 /*
  * Init function pointers inside ath5k_hw struct
  */
drivers/net/wireless/ath/ath5k/dma.c +45 -0

60 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/eeprom.c +84 -67

190 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/pcu.c +261 -177

483 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/phy.c +342 -102

508 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/qcu.c +84 -46

161 lines not on this page · raw message

drivers/net/wireless/ath/ath5k/reset.c +181 -481

755 lines not on this page · raw message