diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-02-09 02:59:49 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-13 13:44:56 -0500 |
commit | ee6e8d1c234e62e503f2dd8137643b24cf424886 (patch) | |
tree | b1de72315221dbae01bbfdcb832f42b192040673 /drivers/net/wireless/ath9k | |
parent | 394cf0a1ca02e7998c8d01975b60a3cdc121e7d8 (diff) |
ath9k: Convert ANI channel to a pointer
This patch converts the ANI channel reference to a pointer,
this facilitates moving struct ar5416AniState to ani.h
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r-- | drivers/net/wireless/ath9k/ani.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/ani.h | 27 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/hw.h | 27 |
3 files changed, 31 insertions, 31 deletions
diff --git a/drivers/net/wireless/ath9k/ani.c b/drivers/net/wireless/ath9k/ani.c index d75bd6e5b158..9cebf0e78a76 100644 --- a/drivers/net/wireless/ath9k/ani.c +++ b/drivers/net/wireless/ath9k/ani.c | |||
@@ -23,11 +23,11 @@ static int ath9k_hw_get_ani_channel_idx(struct ath_hal *ah, | |||
23 | int i; | 23 | int i; |
24 | 24 | ||
25 | for (i = 0; i < ARRAY_SIZE(ahp->ah_ani); i++) { | 25 | for (i = 0; i < ARRAY_SIZE(ahp->ah_ani); i++) { |
26 | if (ahp->ah_ani[i].c.channel == chan->channel) | 26 | if (ahp->ah_ani[i].c && |
27 | ahp->ah_ani[i].c->channel == chan->channel) | ||
27 | return i; | 28 | return i; |
28 | if (ahp->ah_ani[i].c.channel == 0) { | 29 | if (ahp->ah_ani[i].c == NULL) { |
29 | ahp->ah_ani[i].c.channel = chan->channel; | 30 | ahp->ah_ani[i].c = chan; |
30 | ahp->ah_ani[i].c.channelFlags = chan->channelFlags; | ||
31 | return i; | 31 | return i; |
32 | } | 32 | } |
33 | } | 33 | } |
diff --git a/drivers/net/wireless/ath9k/ani.h b/drivers/net/wireless/ath9k/ani.h index cfb7fbc8f134..78880e591052 100644 --- a/drivers/net/wireless/ath9k/ani.h +++ b/drivers/net/wireless/ath9k/ani.h | |||
@@ -72,6 +72,33 @@ struct ath9k_node_stats { | |||
72 | u32 ns_avgtxrate; | 72 | u32 ns_avgtxrate; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | struct ar5416AniState { | ||
76 | struct ath9k_channel *c; | ||
77 | u8 noiseImmunityLevel; | ||
78 | u8 spurImmunityLevel; | ||
79 | u8 firstepLevel; | ||
80 | u8 ofdmWeakSigDetectOff; | ||
81 | u8 cckWeakSigThreshold; | ||
82 | u32 listenTime; | ||
83 | u32 ofdmTrigHigh; | ||
84 | u32 ofdmTrigLow; | ||
85 | int32_t cckTrigHigh; | ||
86 | int32_t cckTrigLow; | ||
87 | int32_t rssiThrLow; | ||
88 | int32_t rssiThrHigh; | ||
89 | u32 noiseFloor; | ||
90 | u32 txFrameCount; | ||
91 | u32 rxFrameCount; | ||
92 | u32 cycleCount; | ||
93 | u32 ofdmPhyErrCount; | ||
94 | u32 cckPhyErrCount; | ||
95 | u32 ofdmPhyErrBase; | ||
96 | u32 cckPhyErrBase; | ||
97 | int16_t pktRssi[2]; | ||
98 | int16_t ofdmErrRssi[2]; | ||
99 | int16_t cckErrRssi[2]; | ||
100 | }; | ||
101 | |||
75 | struct ar5416Stats { | 102 | struct ar5416Stats { |
76 | u32 ast_ani_niup; | 103 | u32 ast_ani_niup; |
77 | u32 ast_ani_nidown; | 104 | u32 ast_ani_nidown; |
diff --git a/drivers/net/wireless/ath9k/hw.h b/drivers/net/wireless/ath9k/hw.h index 2b72e75a1989..b353b1f6f8b1 100644 --- a/drivers/net/wireless/ath9k/hw.h +++ b/drivers/net/wireless/ath9k/hw.h | |||
@@ -406,33 +406,6 @@ enum { | |||
406 | ATH9K_RESET_COLD, | 406 | ATH9K_RESET_COLD, |
407 | }; | 407 | }; |
408 | 408 | ||
409 | struct ar5416AniState { | ||
410 | struct ath9k_channel c; | ||
411 | u8 noiseImmunityLevel; | ||
412 | u8 spurImmunityLevel; | ||
413 | u8 firstepLevel; | ||
414 | u8 ofdmWeakSigDetectOff; | ||
415 | u8 cckWeakSigThreshold; | ||
416 | u32 listenTime; | ||
417 | u32 ofdmTrigHigh; | ||
418 | u32 ofdmTrigLow; | ||
419 | int32_t cckTrigHigh; | ||
420 | int32_t cckTrigLow; | ||
421 | int32_t rssiThrLow; | ||
422 | int32_t rssiThrHigh; | ||
423 | u32 noiseFloor; | ||
424 | u32 txFrameCount; | ||
425 | u32 rxFrameCount; | ||
426 | u32 cycleCount; | ||
427 | u32 ofdmPhyErrCount; | ||
428 | u32 cckPhyErrCount; | ||
429 | u32 ofdmPhyErrBase; | ||
430 | u32 cckPhyErrBase; | ||
431 | int16_t pktRssi[2]; | ||
432 | int16_t ofdmErrRssi[2]; | ||
433 | int16_t cckErrRssi[2]; | ||
434 | }; | ||
435 | |||
436 | struct ath_hal { | 409 | struct ath_hal { |
437 | u32 ah_magic; | 410 | u32 ah_magic; |
438 | u16 ah_devid; | 411 | u16 ah_devid; |