|
@@ -139,7 +139,11 @@ void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx)
|
|
|
}
|
|
|
if (test_and_set_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags))
|
|
|
return;
|
|
|
- ath_chanctx_event(sc, NULL, ATH_CHANCTX_EVENT_ENABLE_MULTICHANNEL);
|
|
|
+
|
|
|
+ if (ath9k_is_chanctx_enabled()) {
|
|
|
+ ath_chanctx_event(sc, NULL,
|
|
|
+ ATH_CHANCTX_EVENT_ENABLE_MULTICHANNEL);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void ath_chanctx_init(struct ath_softc *sc)
|
|
@@ -190,6 +194,25 @@ void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx,
|
|
|
ath_set_channel(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 struct ath_chanctx *
|
|
|
ath_chanctx_get_next(struct ath_softc *sc, struct ath_chanctx *ctx)
|
|
|
{
|
|
@@ -440,25 +463,6 @@ 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)
|
|
|
{
|