]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ath9k: Convert ANI channel to a pointer
authorSujith <Sujith.Manoharan@atheros.com>
Mon, 9 Feb 2009 07:59:49 +0000 (13:29 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 13 Feb 2009 18:44:56 +0000 (13:44 -0500)
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>
drivers/net/wireless/ath9k/ani.c
drivers/net/wireless/ath9k/ani.h
drivers/net/wireless/ath9k/hw.h

index d75bd6e5b158926fca1c680c77a9996edb6b3f47..9cebf0e78a767fd998ee5cdcef582aa8ba15f7fe 100644 (file)
@@ -23,11 +23,11 @@ static int ath9k_hw_get_ani_channel_idx(struct ath_hal *ah,
        int i;
 
        for (i = 0; i < ARRAY_SIZE(ahp->ah_ani); i++) {
-               if (ahp->ah_ani[i].c.channel == chan->channel)
+               if (ahp->ah_ani[i].c &&
+                   ahp->ah_ani[i].c->channel == chan->channel)
                        return i;
-               if (ahp->ah_ani[i].c.channel == 0) {
-                       ahp->ah_ani[i].c.channel = chan->channel;
-                       ahp->ah_ani[i].c.channelFlags = chan->channelFlags;
+               if (ahp->ah_ani[i].c == NULL) {
+                       ahp->ah_ani[i].c = chan;
                        return i;
                }
        }
index cfb7fbc8f134f8c4de95a48766913443b99cb1a4..78880e591052e0e6eed4c300dcc4a3f2586833b3 100644 (file)
@@ -72,6 +72,33 @@ struct ath9k_node_stats {
        u32 ns_avgtxrate;
 };
 
+struct ar5416AniState {
+       struct ath9k_channel *c;
+       u8 noiseImmunityLevel;
+       u8 spurImmunityLevel;
+       u8 firstepLevel;
+       u8 ofdmWeakSigDetectOff;
+       u8 cckWeakSigThreshold;
+       u32 listenTime;
+       u32 ofdmTrigHigh;
+       u32 ofdmTrigLow;
+       int32_t cckTrigHigh;
+       int32_t cckTrigLow;
+       int32_t rssiThrLow;
+       int32_t rssiThrHigh;
+       u32 noiseFloor;
+       u32 txFrameCount;
+       u32 rxFrameCount;
+       u32 cycleCount;
+       u32 ofdmPhyErrCount;
+       u32 cckPhyErrCount;
+       u32 ofdmPhyErrBase;
+       u32 cckPhyErrBase;
+       int16_t pktRssi[2];
+       int16_t ofdmErrRssi[2];
+       int16_t cckErrRssi[2];
+};
+
 struct ar5416Stats {
        u32 ast_ani_niup;
        u32 ast_ani_nidown;
index 2b72e75a19893e68880bd2ef67c2947bdb9a7b33..b353b1f6f8b11a64face7ef72d83361bcecd0071 100644 (file)
@@ -406,33 +406,6 @@ enum {
        ATH9K_RESET_COLD,
 };
 
-struct ar5416AniState {
-       struct ath9k_channel c;
-       u8 noiseImmunityLevel;
-       u8 spurImmunityLevel;
-       u8 firstepLevel;
-       u8 ofdmWeakSigDetectOff;
-       u8 cckWeakSigThreshold;
-       u32 listenTime;
-       u32 ofdmTrigHigh;
-       u32 ofdmTrigLow;
-       int32_t cckTrigHigh;
-       int32_t cckTrigLow;
-       int32_t rssiThrLow;
-       int32_t rssiThrHigh;
-       u32 noiseFloor;
-       u32 txFrameCount;
-       u32 rxFrameCount;
-       u32 cycleCount;
-       u32 ofdmPhyErrCount;
-       u32 cckPhyErrCount;
-       u32 ofdmPhyErrBase;
-       u32 cckPhyErrBase;
-       int16_t pktRssi[2];
-       int16_t ofdmErrRssi[2];
-       int16_t cckErrRssi[2];
-};
-
 struct ath_hal {
        u32 ah_magic;
        u16 ah_devid;