diff options
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 12 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 9 |
3 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 9ad8a6738afd..f2202e78fa7b 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
| @@ -431,12 +431,10 @@ struct ath_beacon { | |||
| 431 | }; | 431 | }; |
| 432 | 432 | ||
| 433 | void ath9k_beacon_tasklet(unsigned long data); | 433 | void ath9k_beacon_tasklet(unsigned long data); |
| 434 | bool ath9k_allow_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif); | ||
| 435 | void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, | 434 | void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, |
| 436 | u32 changed); | 435 | u32 changed); |
| 437 | void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif); | 436 | void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif); |
| 438 | void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif); | 437 | void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif); |
| 439 | void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif); | ||
| 440 | void ath9k_set_beacon(struct ath_softc *sc); | 438 | void ath9k_set_beacon(struct ath_softc *sc); |
| 441 | bool ath9k_csa_is_finished(struct ath_softc *sc); | 439 | bool ath9k_csa_is_finished(struct ath_softc *sc); |
| 442 | 440 | ||
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 78ffe762e26c..accfb3b60daa 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
| @@ -274,7 +274,7 @@ static int ath9k_beacon_choose_slot(struct ath_softc *sc) | |||
| 274 | return slot; | 274 | return slot; |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif) | 277 | static void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif) |
| 278 | { | 278 | { |
| 279 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 279 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 280 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; | 280 | struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf; |
| @@ -622,7 +622,8 @@ static void ath9k_beacon_config_adhoc(struct ath_softc *sc, | |||
| 622 | set_bit(SC_OP_BEACONS, &sc->sc_flags); | 622 | set_bit(SC_OP_BEACONS, &sc->sc_flags); |
| 623 | } | 623 | } |
| 624 | 624 | ||
| 625 | bool ath9k_allow_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) | 625 | static bool ath9k_allow_beacon_config(struct ath_softc *sc, |
| 626 | struct ieee80211_vif *vif) | ||
| 626 | { | 627 | { |
| 627 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 628 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 628 | struct ath_vif *avp = (void *)vif->drv_priv; | 629 | struct ath_vif *avp = (void *)vif->drv_priv; |
| @@ -693,12 +694,17 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif, | |||
| 693 | unsigned long flags; | 694 | unsigned long flags; |
| 694 | bool skip_beacon = false; | 695 | bool skip_beacon = false; |
| 695 | 696 | ||
| 697 | if (vif->type == NL80211_IFTYPE_AP) | ||
| 698 | ath9k_set_tsfadjust(sc, vif); | ||
| 699 | |||
| 700 | if (!ath9k_allow_beacon_config(sc, vif)) | ||
| 701 | return; | ||
| 702 | |||
| 696 | if (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) { | 703 | if (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) { |
| 697 | ath9k_cache_beacon_config(sc, bss_conf); | 704 | ath9k_cache_beacon_config(sc, bss_conf); |
| 698 | ath9k_set_beacon(sc); | 705 | ath9k_set_beacon(sc); |
| 699 | set_bit(SC_OP_BEACONS, &sc->sc_flags); | 706 | set_bit(SC_OP_BEACONS, &sc->sc_flags); |
| 700 | return; | 707 | return; |
| 701 | |||
| 702 | } | 708 | } |
| 703 | 709 | ||
| 704 | /* | 710 | /* |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1d76be501572..173a889f9dbb 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -1664,13 +1664,8 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1664 | } | 1664 | } |
| 1665 | 1665 | ||
| 1666 | if ((changed & BSS_CHANGED_BEACON_ENABLED) || | 1666 | if ((changed & BSS_CHANGED_BEACON_ENABLED) || |
| 1667 | (changed & BSS_CHANGED_BEACON_INT)) { | 1667 | (changed & BSS_CHANGED_BEACON_INT)) |
| 1668 | if (ah->opmode == NL80211_IFTYPE_AP && | 1668 | ath9k_beacon_config(sc, vif, changed); |
| 1669 | bss_conf->enable_beacon) | ||
| 1670 | ath9k_set_tsfadjust(sc, vif); | ||
| 1671 | if (ath9k_allow_beacon_config(sc, vif)) | ||
| 1672 | ath9k_beacon_config(sc, vif, changed); | ||
| 1673 | } | ||
| 1674 | 1669 | ||
| 1675 | if (changed & BSS_CHANGED_ERP_SLOT) { | 1670 | if (changed & BSS_CHANGED_ERP_SLOT) { |
| 1676 | if (bss_conf->use_short_slot) | 1671 | if (bss_conf->use_short_slot) |
