ath9k: Fix channel context events

Check if channel context usage is enabled before
calling ath_chanctx_event() from various parts of the
driver. Also, make sure that ath_chanctx_event() is
compiled only when CONFIG_ATH9K_CHANNEL_CONTEXT is
enabled.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
此提交包含在:
Sujith Manoharan
2014-08-23 13:29:16 +05:30
提交者 John W. Linville
父節點 922c943dcc
當前提交 27babf9f47
共有 6 個檔案被更改,包括 57 行新增33 行删除

查看文件

@@ -427,9 +427,11 @@ void ath9k_beacon_tasklet(unsigned long data)
/* EDMA devices check that in the tx completion function. */
if (!edma) {
if (sc->sched.beacon_pending)
ath_chanctx_event(sc, NULL,
ATH_CHANCTX_EVENT_BEACON_SENT);
if (ath9k_is_chanctx_enabled()) {
if (sc->sched.beacon_pending)
ath_chanctx_event(sc, NULL,
ATH_CHANCTX_EVENT_BEACON_SENT);
}
if (ath9k_csa_is_finished(sc, vif))
return;
@@ -438,7 +440,10 @@ void ath9k_beacon_tasklet(unsigned long data)
if (!vif || !vif->bss_conf.enable_beacon)
return;
ath_chanctx_event(sc, vif, ATH_CHANCTX_EVENT_BEACON_PREPARE);
if (ath9k_is_chanctx_enabled()) {
ath_chanctx_event(sc, vif, ATH_CHANCTX_EVENT_BEACON_PREPARE);
}
bf = ath9k_beacon_generate(sc->hw, vif);
if (sc->beacon.bmisscnt != 0) {