summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-08-23 09:59:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-08-28 20:49:36 +0200
commit22dc0deb1ff9530be53e03d567fdf4554930ab86 (patch)
tree9611fbe1801ad8c847b47375511252b786eea763
parentath9k: Exclude more functions (diff)
downloadlinux-22dc0deb1ff9530be53e03d567fdf4554930ab86.tar.xz
linux-22dc0deb1ff9530be53e03d567fdf4554930ab86.zip
ath9k: Conditionally compile more functions
Use CONFIG_ATH9K_CHANNEL_CONTEXT to exclude: ath_scan_complete() ath_roc_complete() ath_offchannel_next() ath_scan_next_channel() ath_scan_channel_duration() 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/channel.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index cd8af454cf46..8214b3276989 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -507,6 +507,25 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
spin_unlock_bh(&sc->chan_lock);
}
+#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
+
+static const char *offchannel_state_string(enum ath_offchannel_state state)
+{
+#define case_rtn_string(val) case val: return #val
+
+ switch (state) {
+ case_rtn_string(ATH_OFFCHANNEL_IDLE);
+ case_rtn_string(ATH_OFFCHANNEL_PROBE_SEND);
+ case_rtn_string(ATH_OFFCHANNEL_PROBE_WAIT);
+ case_rtn_string(ATH_OFFCHANNEL_SUSPEND);
+ case_rtn_string(ATH_OFFCHANNEL_ROC_START);
+ case_rtn_string(ATH_OFFCHANNEL_ROC_WAIT);
+ case_rtn_string(ATH_OFFCHANNEL_ROC_DONE);
+ default:
+ return "unknown";
+ }
+}
+
static int ath_scan_channel_duration(struct ath_softc *sc,
struct ieee80211_channel *chan)
{
@@ -599,25 +618,6 @@ void ath_scan_complete(struct ath_softc *sc, bool abort)
ath9k_ps_restore(sc);
}
-#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
-
-static const char *offchannel_state_string(enum ath_offchannel_state state)
-{
-#define case_rtn_string(val) case val: return #val
-
- switch (state) {
- case_rtn_string(ATH_OFFCHANNEL_IDLE);
- case_rtn_string(ATH_OFFCHANNEL_PROBE_SEND);
- case_rtn_string(ATH_OFFCHANNEL_PROBE_WAIT);
- case_rtn_string(ATH_OFFCHANNEL_SUSPEND);
- case_rtn_string(ATH_OFFCHANNEL_ROC_START);
- case_rtn_string(ATH_OFFCHANNEL_ROC_WAIT);
- case_rtn_string(ATH_OFFCHANNEL_ROC_DONE);
- default:
- return "unknown";
- }
-}
-
static void ath_scan_send_probe(struct ath_softc *sc,
struct cfg80211_ssid *ssid)
{