Skip to content

Commit

Permalink
ath9k: Fix crash in MCC mode
Browse files Browse the repository at this point in the history
When a channel context is removed, the hw_queue_base
is set to -1, this will result in a panic because
ath9k_chanctx_stop_queues() can be called on an interface
that is not assigned to any context yet - for example,
when trying to scan.

Fix this issue by setting the hw_queue_base to zero
when a channel context is removed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Oct 7, 2014
1 parent d2a993e commit b18111d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ static void ath9k_remove_chanctx(struct ieee80211_hw *hw,
conf->def.chan->center_freq);

ctx->assigned = false;
ctx->hw_queue_base = -1;
ctx->hw_queue_base = 0;
ath_chanctx_event(sc, NULL, ATH_CHANCTX_EVENT_UNASSIGN);

mutex_unlock(&sc->mutex);
Expand Down

0 comments on commit b18111d

Please sign in to comment.