aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-08-25 03:59:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-09-24 13:56:21 -0400
commitb9f43cd133d06ea5c08018ffec10f0e6bbaa9a4c (patch)
treedec7f4b0afaab5efd8308fe8817933ac97698fec
parentb713ae61fcc10e50b52b5e92967c48dc95ba0e90 (diff)
downloadwireless-legacy-b9f43cd133d06ea5c08018ffec10f0e6bbaa9a4c.tar.gz
[PATCH] Net: ath5k, remove some ieee80211 re-defines
ath5k, remove some ieee80211 re-defines use mac80211 defines directly instead. this means MODULATION_* to IEEE80211_RATE_* switch. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <linville@tuxdriver.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath5k.h92
-rw-r--r--drivers/net/wireless/ath5k_base.c2
-rw-r--r--drivers/net/wireless/ath5k_hw.c9
3 files changed, 50 insertions, 53 deletions
diff --git a/drivers/net/wireless/ath5k.h b/drivers/net/wireless/ath5k.h
index ad5e19628a61a0..78d7cb257a2d1e 100644
--- a/drivers/net/wireless/ath5k.h
+++ b/drivers/net/wireless/ath5k.h
@@ -82,7 +82,7 @@
#define AR5K_TUNE_ADDITIONAL_SWBA_BACKOFF 0
#define AR5K_TUNE_RADAR_ALERT false
#define AR5K_TUNE_MIN_TX_FIFO_THRES 1
-#define AR5K_TUNE_MAX_TX_FIFO_THRES ((MAX_PDU_LENGTH / 64) + 1)
+#define AR5K_TUNE_MAX_TX_FIFO_THRES ((IEEE80211_MAX_LEN / 64) + 1)
#define AR5K_TUNE_RSSI_THRES 1792
#define AR5K_TUNE_REGISTER_TIMEOUT 20000
#define AR5K_TUNE_REGISTER_DWELL_TIME 20000
@@ -187,18 +187,14 @@ struct ath5k_srev_name {
#define IEEE80211_MAX_LEN 2500
-#define MAX_PDU_LENGTH IEEE80211_MAX_LEN
-#define MODULATION_CCK IEEE80211_RATE_CCK
-#define MODULATION_OFDM IEEE80211_RATE_OFDM
-#define MODULATION_TURBO IEEE80211_RATE_TURBO
+/* TODO Merge this to mac80211 */
#define MODULATION_XR 0x00000200 /*XR thingie*/
-#define MODULATION_CCK_SP IEEE80211_RATE_CCK_2 /*CCK + Shortpreamble*/
#define AR5K_SET_SHORT_PREAMBLE 0x04 /* adding this flag to rate_code
enables short preamble, see
ar5212_reg.h */
-#define HAS_SHPREAMBLE(_ix) (rt->rates[_ix].modulation == MODULATION_CCK_SP)
-#define SHPREAMBLE_FLAG(_ix) HAS_SHPREAMBLE(_ix)?AR5K_SET_SHORT_PREAMBLE:0
+#define HAS_SHPREAMBLE(_ix) (rt->rates[_ix].modulation == IEEE80211_RATE_CCK_2)
+#define SHPREAMBLE_FLAG(_ix) (HAS_SHPREAMBLE(_ix) ? AR5K_SET_SHORT_PREAMBLE : 0)
/****************\
TX DEFINITIONS
@@ -598,56 +594,56 @@ struct ath5k_rate_table {
255, 255, 255, 255, 255, 255, 255, 255, 6, 4, 2, 0, \
7, 5, 3, 1, 255, 255, 255, 255, 255, 255, 255, 255, \
255, 255, 255, 255, 255, 255, 255, 255 }, { \
- { 1, MODULATION_OFDM, 6000, 11, 140, 0 }, \
- { 1, MODULATION_OFDM, 9000, 15, 18, 0 }, \
- { 1, MODULATION_OFDM, 12000, 10, 152, 2 }, \
- { 1, MODULATION_OFDM, 18000, 14, 36, 2 }, \
- { 1, MODULATION_OFDM, 24000, 9, 176, 4 }, \
- { 1, MODULATION_OFDM, 36000, 13, 72, 4 }, \
- { 1, MODULATION_OFDM, 48000, 8, 96, 4 }, \
- { 1, MODULATION_OFDM, 54000, 12, 108, 4 } } \
+ { 1, IEEE80211_RATE_OFDM, 6000, 11, 140, 0 }, \
+ { 1, IEEE80211_RATE_OFDM, 9000, 15, 18, 0 }, \
+ { 1, IEEE80211_RATE_OFDM, 12000, 10, 152, 2 }, \
+ { 1, IEEE80211_RATE_OFDM, 18000, 14, 36, 2 }, \
+ { 1, IEEE80211_RATE_OFDM, 24000, 9, 176, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 36000, 13, 72, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 48000, 8, 96, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 54000, 12, 108, 4 } } \
}
#define AR5K_RATES_11B { 4, { \
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, \
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, \
3, 2, 1, 0, 255, 255, 255, 255 }, { \
- { 1, MODULATION_CCK, 1000, 27, 130, 0 }, \
- { 1, MODULATION_CCK_SP, 2000, 26, 132, 1 }, \
- { 1, MODULATION_CCK_SP, 5500, 25, 139, 1 }, \
- { 1, MODULATION_CCK_SP, 11000, 24, 150, 1 } } \
+ { 1, IEEE80211_RATE_CCK, 1000, 27, 130, 0 }, \
+ { 1, IEEE80211_RATE_CCK_2, 2000, 26, 132, 1 }, \
+ { 1, IEEE80211_RATE_CCK_2, 5500, 25, 139, 1 }, \
+ { 1, IEEE80211_RATE_CCK_2, 11000, 24, 150, 1 } } \
}
#define AR5K_RATES_11G { 12, { \
255, 255, 255, 255, 255, 255, 255, 255, 10, 8, 6, 4, \
11, 9, 7, 5, 255, 255, 255, 255, 255, 255, 255, 255, \
3, 2, 1, 0, 255, 255, 255, 255 }, { \
- { 1, MODULATION_CCK, 1000, 27, 2, 0 }, \
- { 1, MODULATION_CCK_SP, 2000, 26, 4, 1 }, \
- { 1, MODULATION_CCK_SP, 5500, 25, 11, 1 }, \
- { 1, MODULATION_CCK_SP, 11000, 24, 22, 1 }, \
- { 0, MODULATION_OFDM, 6000, 11, 12, 4 }, \
- { 0, MODULATION_OFDM, 9000, 15, 18, 4 }, \
- { 1, MODULATION_OFDM, 12000, 10, 24, 6 }, \
- { 1, MODULATION_OFDM, 18000, 14, 36, 6 }, \
- { 1, MODULATION_OFDM, 24000, 9, 48, 8 }, \
- { 1, MODULATION_OFDM, 36000, 13, 72, 8 }, \
- { 1, MODULATION_OFDM, 48000, 8, 96, 8 }, \
- { 1, MODULATION_OFDM, 54000, 12, 108, 8 } } \
+ { 1, IEEE80211_RATE_CCK, 1000, 27, 2, 0 }, \
+ { 1, IEEE80211_RATE_CCK_2, 2000, 26, 4, 1 }, \
+ { 1, IEEE80211_RATE_CCK_2, 5500, 25, 11, 1 }, \
+ { 1, IEEE80211_RATE_CCK_2, 11000, 24, 22, 1 }, \
+ { 0, IEEE80211_RATE_OFDM, 6000, 11, 12, 4 }, \
+ { 0, IEEE80211_RATE_OFDM, 9000, 15, 18, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 12000, 10, 24, 6 }, \
+ { 1, IEEE80211_RATE_OFDM, 18000, 14, 36, 6 }, \
+ { 1, IEEE80211_RATE_OFDM, 24000, 9, 48, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 36000, 13, 72, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 48000, 8, 96, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 54000, 12, 108, 8 } } \
}
#define AR5K_RATES_TURBO { 8, { \
255, 255, 255, 255, 255, 255, 255, 255, 6, 4, 2, 0, \
7, 5, 3, 1, 255, 255, 255, 255, 255, 255, 255, 255, \
255, 255, 255, 255, 255, 255, 255, 255 }, { \
- { 1, MODULATION_TURBO, 6000, 11, 140, 0 }, \
- { 1, MODULATION_TURBO, 9000, 15, 18, 0 }, \
- { 1, MODULATION_TURBO, 12000, 10, 152, 2 }, \
- { 1, MODULATION_TURBO, 18000, 14, 36, 2 }, \
- { 1, MODULATION_TURBO, 24000, 9, 176, 4 }, \
- { 1, MODULATION_TURBO, 36000, 13, 72, 4 }, \
- { 1, MODULATION_TURBO, 48000, 8, 96, 4 }, \
- { 1, MODULATION_TURBO, 54000, 12, 108, 4 } } \
+ { 1, IEEE80211_RATE_TURBO, 6000, 11, 140, 0 }, \
+ { 1, IEEE80211_RATE_TURBO, 9000, 15, 18, 0 }, \
+ { 1, IEEE80211_RATE_TURBO, 12000, 10, 152, 2 }, \
+ { 1, IEEE80211_RATE_TURBO, 18000, 14, 36, 2 }, \
+ { 1, IEEE80211_RATE_TURBO, 24000, 9, 176, 4 }, \
+ { 1, IEEE80211_RATE_TURBO, 36000, 13, 72, 4 }, \
+ { 1, IEEE80211_RATE_TURBO, 48000, 8, 96, 4 }, \
+ { 1, IEEE80211_RATE_TURBO, 54000, 12, 108, 4 } } \
}
#define AR5K_RATES_XR { 12, { \
@@ -658,14 +654,14 @@ struct ath5k_rate_table {
{ 1, MODULATION_XR, 1000, 2, 139, 1 }, \
{ 1, MODULATION_XR, 2000, 6, 150, 2 }, \
{ 1, MODULATION_XR, 3000, 1, 150, 3 }, \
- { 1, MODULATION_OFDM, 6000, 11, 140, 4 }, \
- { 1, MODULATION_OFDM, 9000, 15, 18, 4 }, \
- { 1, MODULATION_OFDM, 12000, 10, 152, 6 }, \
- { 1, MODULATION_OFDM, 18000, 14, 36, 6 }, \
- { 1, MODULATION_OFDM, 24000, 9, 176, 8 }, \
- { 1, MODULATION_OFDM, 36000, 13, 72, 8 }, \
- { 1, MODULATION_OFDM, 48000, 8, 96, 8 }, \
- { 1, MODULATION_OFDM, 54000, 12, 108, 8 } } \
+ { 1, IEEE80211_RATE_OFDM, 6000, 11, 140, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 9000, 15, 18, 4 }, \
+ { 1, IEEE80211_RATE_OFDM, 12000, 10, 152, 6 }, \
+ { 1, IEEE80211_RATE_OFDM, 18000, 14, 36, 6 }, \
+ { 1, IEEE80211_RATE_OFDM, 24000, 9, 176, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 36000, 13, 72, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 48000, 8, 96, 8 }, \
+ { 1, IEEE80211_RATE_OFDM, 54000, 12, 108, 8 } } \
}
/*
diff --git a/drivers/net/wireless/ath5k_base.c b/drivers/net/wireless/ath5k_base.c
index 657d59bdd6f4f1..c77328a5269915 100644
--- a/drivers/net/wireless/ath5k_base.c
+++ b/drivers/net/wireless/ath5k_base.c
@@ -1089,7 +1089,7 @@ static void ath_setcurmode(struct ath_softc *sc, unsigned int mode)
}
sc->hwmap[i].txflags = IEEE80211_RADIOTAP_F_DATAPAD;
if (SHPREAMBLE_FLAG(ix) || rt->rates[ix].modulation ==
- MODULATION_OFDM)
+ IEEE80211_RATE_OFDM)
sc->hwmap[i].txflags |=
IEEE80211_RADIOTAP_F_SHORTPRE;
/* receive frames include FCS */
diff --git a/drivers/net/wireless/ath5k_hw.c b/drivers/net/wireless/ath5k_hw.c
index 887213d55cdc25..3501b4ca766e6d 100644
--- a/drivers/net/wireless/ath5k_hw.c
+++ b/drivers/net/wireless/ath5k_hw.c
@@ -142,15 +142,16 @@ ath_hal_computetxtime(struct ath_hw *hal, const struct ath5k_rate_table *rates,
* Calculate the transmission time by operation (PHY) mode
*/
switch (rate->modulation) {
- case MODULATION_CCK:
+ case IEEE80211_RATE_CCK:
/*
* CCK / DS mode (802.11b)
*/
value = AR5K_CCK_TX_TIME(rate->rate_kbps, frame_length,
- (short_preamble && (rate->modulation == MODULATION_CCK_SP)));
+ short_preamble &&
+ rate->modulation == IEEE80211_RATE_CCK_2);
break;
- case MODULATION_OFDM:
+ case IEEE80211_RATE_OFDM:
/*
* Orthogonal Frequency Division Multiplexing
*/
@@ -159,7 +160,7 @@ ath_hal_computetxtime(struct ath_hw *hal, const struct ath5k_rate_table *rates,
value = AR5K_OFDM_TX_TIME(rate->rate_kbps, frame_length);
break;
- case MODULATION_TURBO:
+ case IEEE80211_RATE_TURBO:
/*
* Orthogonal Frequency Division Multiplexing
* Atheros "Turbo Mode" (doubled rates)