Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ATH_OP_PRIM_STA_VIF,
ATH_OP_HW_RESET,
ATH_OP_SCANNING,
+ ATH_OP_MULTI_CHANNEL,
};
enum ath_bus_type {
void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx)
{
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_vif *avp;
bool active = false;
+ u8 n_active = 0;
if (!ctx)
return;
}
}
ctx->active = active;
+
+ ath_for_each_chanctx(sc, ctx) {
+ if (!ctx->assigned || list_empty(&ctx->vifs))
+ continue;
+ n_active++;
+ }
+
+ if (n_active > 1)
+ set_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags);
+ else
+ clear_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags);
}
static bool