Skip to content

Commit

Permalink
ath9k: remove ath9k_hw_check_chan()
Browse files Browse the repository at this point in the history
The only check we care about in ath9k_hw_check_chan() is
the internal regulatory check so use that.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jan 29, 2009
1 parent 4febf7b commit 0de57d9
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions drivers/net/wireless/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1666,30 +1666,6 @@ static bool ath9k_hw_chip_reset(struct ath_hal *ah,
return true;
}

static struct ath9k_channel *ath9k_hw_check_chan(struct ath_hal *ah,
struct ath9k_channel *chan)
{
if (!(IS_CHAN_2GHZ(chan) ^ IS_CHAN_5GHZ(chan))) {
DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
"invalid channel %u/0x%x; not marked as "
"2GHz or 5GHz\n", chan->channel, chan->channelFlags);
return NULL;
}

if (!IS_CHAN_OFDM(chan) &&
!IS_CHAN_B(chan) &&
!IS_CHAN_HT20(chan) &&
!IS_CHAN_HT40(chan)) {
DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
"invalid channel %u/0x%x; not marked as "
"OFDM or CCK or HT20 or HT40PLUS or HT40MINUS\n",
chan->channel, chan->channelFlags);
return NULL;
}

return ath9k_regd_check_channel(ah, chan);
}

static bool ath9k_hw_channel_change(struct ath_hal *ah,
struct ath9k_channel *chan,
enum ath9k_ht_macmode macmode)
Expand Down Expand Up @@ -2234,7 +2210,7 @@ int ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
ahp->ah_rxchainmask &= 0x3;
}

if (ath9k_hw_check_chan(ah, chan) == NULL) {
if (ath9k_regd_check_channel(ah, chan) == NULL) {
DPRINTF(ah->ah_sc, ATH_DBG_CHANNEL,
"invalid channel %u/0x%x; no mapping\n",
chan->channel, chan->channelFlags);
Expand Down

0 comments on commit 0de57d9

Please sign in to comment.