diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-08-22 20:39:31 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-28 14:41:58 -0400 |
commit | 499afaccf6f3d5d3180f4155e85becf15d09ff71 (patch) | |
tree | ac1e66701d168d034b592c641fe9fdb8afe35dd5 /drivers/net/wireless/ath/ath9k/main.c | |
parent | c7dd40c92af1f28b84995a07aa88ccd3068ee4de (diff) | |
download | lwn-499afaccf6f3d5d3180f4155e85becf15d09ff71.tar.gz lwn-499afaccf6f3d5d3180f4155e85becf15d09ff71.zip |
ath9k: Isolate ath9k_use_chanctx module parameter
This patch ensures that the module parameter "use_chanctx" is
visible only when CONFIG_ATH9K_CHANNEL_CONTEXT is selected.
Also register the channel context callbacks with mac80211 only
when it is explicitly enabled and compile them out of the driver
when CONFIG_ATH9K_CHANNEL_CONTEXT is not selected.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 32e80fc8849c..ed281ac1b742 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -268,7 +268,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start) ath9k_hw_set_interrupts(ah); ath9k_hw_enable_interrupts(ah); - if (!ath9k_use_chanctx) + if (!ath9k_is_chanctx_enabled()) ieee80211_wake_queues(sc->hw); else { if (sc->cur_chan == &sc->offchannel.chan) @@ -1139,7 +1139,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ath9k_beacon_assign_slot(sc, vif); avp->vif = vif; - if (!ath9k_use_chanctx) { + if (!ath9k_is_chanctx_enabled()) { avp->chanctx = sc->cur_chan; list_add_tail(&avp->list, &avp->chanctx->vifs); } @@ -1217,7 +1217,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, sc->nvifs--; sc->tx99_vif = NULL; - if (!ath9k_use_chanctx) + if (!ath9k_is_chanctx_enabled()) list_del(&avp->list); if (ath9k_uses_beacons(vif->type)) @@ -1395,7 +1395,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) } } - if (!ath9k_use_chanctx && (changed & IEEE80211_CONF_CHANGE_CHANNEL)) { + if (!ath9k_is_chanctx_enabled() && (changed & IEEE80211_CONF_CHANGE_CHANNEL)) { ctx->offchannel = !!(conf->flags & IEEE80211_CONF_OFFCHANNEL); ath_chanctx_set_channel(sc, ctx, &hw->conf.chandef); } @@ -2108,6 +2108,8 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) clear_bit(ATH_OP_SCANNING, &common->op_flags); } +#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT + static int ath9k_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_scan_request *hw_req) { @@ -2339,7 +2341,7 @@ static void ath9k_unassign_vif_chanctx(struct ieee80211_hw *hw, void ath9k_fill_chanctx_ops(void) { - if (!ath9k_use_chanctx) + if (!ath9k_is_chanctx_enabled()) return; ath9k_ops.hw_scan = ath9k_hw_scan; @@ -2354,6 +2356,8 @@ void ath9k_fill_chanctx_ops(void) ath9k_ops.mgd_prepare_tx = ath9k_chanctx_force_active; } +#endif + struct ieee80211_ops ath9k_ops = { .tx = ath9k_tx, .start = ath9k_start, |