Skip to content

Commit

Permalink
ath9k: Fix primary station configuration
Browse files Browse the repository at this point in the history
Assign 'primary_sta' to the active primary station
interface after iterating over the list of interfaces.

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 Sep 15, 2014
1 parent af87dd3 commit 1030f9f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,9 +1088,7 @@ void ath9k_calculate_summary_state(struct ath_softc *sc,
iter_data.beacons = true;
ath9k_set_assoc_state(sc, iter_data.primary_sta,
changed);
if (!ctx->primary_sta ||
!ctx->primary_sta->bss_conf.assoc)
ctx->primary_sta = iter_data.primary_sta;
ctx->primary_sta = iter_data.primary_sta;
} else {
ctx->primary_sta = NULL;
memset(common->curbssid, 0, ETH_ALEN);
Expand Down Expand Up @@ -1119,8 +1117,6 @@ void ath9k_calculate_summary_state(struct ath_softc *sc,
else
clear_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);

ctx->primary_sta = iter_data.primary_sta;

ath9k_ps_restore(sc);
}

Expand Down

0 comments on commit 1030f9f

Please sign in to comment.