aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/ani.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-02-09 13:29:49 +0530
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:44:56 -0500
commitee6e8d1c234e62e503f2dd8137643b24cf424886 (patch)
treeb1de72315221dbae01bbfdcb832f42b192040673 /drivers/net/wireless/ath9k/ani.c
parent394cf0a1ca02e7998c8d01975b60a3cdc121e7d8 (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/ani.c')
-rw-r--r--drivers/net/wireless/ath9k/ani.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/ani.c b/drivers/net/wireless/ath9k/ani.c
index d75bd6e5b15..9cebf0e78a7 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,
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;
}
}