diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-08-23 07:59:15 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-28 18:49:37 (GMT) |
commit | 922c943dcc48fc0085daeaa3e8038c5446f226c2 (patch) | |
tree | 8e426d9c25722c3fb1c4986093181a52a1e91af7 | |
parent | 98f411b80399c45a33f18b730eb36f489fba214a (diff) | |
download | linux-922c943dcc48fc0085daeaa3e8038c5446f226c2.tar.xz |
ath9k: Make ath_chanctx_switch static
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/channel.c | 74 |
2 files changed, 37 insertions, 39 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 0371b30..2afe790 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -417,8 +417,6 @@ ath_chanctx_get(struct ieee80211_chanctx_conf *ctx) void ath_chanctx_init(struct ath_softc *sc); void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx, struct cfg80211_chan_def *chandef); -void ath_chanctx_switch(struct ath_softc *sc, struct ath_chanctx *ctx, - struct cfg80211_chan_def *chandef); void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx); void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif, enum ath_chanctx_event ev); diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 1950da4..ceb3ce8 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -173,43 +173,6 @@ void ath_chanctx_init(struct ath_softc *sc) } -void ath_chanctx_switch(struct ath_softc *sc, struct ath_chanctx *ctx, - struct cfg80211_chan_def *chandef) -{ - struct ath_common *common = ath9k_hw_common(sc->sc_ah); - - spin_lock_bh(&sc->chan_lock); - - if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags) && - (sc->cur_chan != ctx) && (ctx == &sc->offchannel.chan)) { - sc->sched.offchannel_pending = true; - spin_unlock_bh(&sc->chan_lock); - return; - } - - sc->next_chan = ctx; - if (chandef) { - ctx->chandef = *chandef; - ath_dbg(common, CHAN_CTX, - "Assigned next_chan to %d MHz\n", chandef->center_freq1); - } - - if (sc->next_chan == &sc->offchannel.chan) { - sc->sched.offchannel_duration = - TU_TO_USEC(sc->offchannel.duration) + - sc->sched.channel_switch_time; - - if (chandef) { - ath_dbg(common, CHAN_CTX, - "Offchannel duration for chan %d MHz : %u\n", - chandef->center_freq1, - sc->sched.offchannel_duration); - } - } - spin_unlock_bh(&sc->chan_lock); - ieee80211_queue_work(sc->hw, &sc->chanctx_work); -} - void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx, struct cfg80211_chan_def *chandef) { @@ -507,6 +470,43 @@ static int ath_scan_channel_duration(struct ath_softc *sc, return (HZ / 16); /* ~60 ms */ } +static void ath_chanctx_switch(struct ath_softc *sc, struct ath_chanctx *ctx, + struct cfg80211_chan_def *chandef) +{ + struct ath_common *common = ath9k_hw_common(sc->sc_ah); + + spin_lock_bh(&sc->chan_lock); + + if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags) && + (sc->cur_chan != ctx) && (ctx == &sc->offchannel.chan)) { + sc->sched.offchannel_pending = true; + spin_unlock_bh(&sc->chan_lock); + return; + } + + sc->next_chan = ctx; + if (chandef) { + ctx->chandef = *chandef; + ath_dbg(common, CHAN_CTX, + "Assigned next_chan to %d MHz\n", chandef->center_freq1); + } + + if (sc->next_chan == &sc->offchannel.chan) { + sc->sched.offchannel_duration = + TU_TO_USEC(sc->offchannel.duration) + + sc->sched.channel_switch_time; + + if (chandef) { + ath_dbg(common, CHAN_CTX, + "Offchannel duration for chan %d MHz : %u\n", + chandef->center_freq1, + sc->sched.offchannel_duration); + } + } + spin_unlock_bh(&sc->chan_lock); + ieee80211_queue_work(sc->hw, &sc->chanctx_work); +} + static void ath_chanctx_offchan_switch(struct ath_softc *sc, struct ieee80211_channel *chan) { |