diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 9105a92364f7..74ab1d02013b 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -259,7 +259,7 @@ static void ath_edma_start_recv(struct ath_softc *sc) | |||
259 | ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_HP); | 259 | ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_HP); |
260 | ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_LP); | 260 | ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_LP); |
261 | ath_opmode_init(sc); | 261 | ath_opmode_init(sc); |
262 | ath9k_hw_startpcureceive(sc->sc_ah, !!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)); | 262 | ath9k_hw_startpcureceive(sc->sc_ah, sc->cur_chan->offchannel); |
263 | } | 263 | } |
264 | 264 | ||
265 | static void ath_edma_stop_recv(struct ath_softc *sc) | 265 | static void ath_edma_stop_recv(struct ath_softc *sc) |
@@ -374,6 +374,7 @@ void ath_rx_cleanup(struct ath_softc *sc) | |||
374 | 374 | ||
375 | u32 ath_calcrxfilter(struct ath_softc *sc) | 375 | u32 ath_calcrxfilter(struct ath_softc *sc) |
376 | { | 376 | { |
377 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | ||
377 | u32 rfilt; | 378 | u32 rfilt; |
378 | 379 | ||
379 | if (config_enabled(CONFIG_ATH9K_TX99)) | 380 | if (config_enabled(CONFIG_ATH9K_TX99)) |
@@ -424,6 +425,10 @@ u32 ath_calcrxfilter(struct ath_softc *sc) | |||
424 | if (AR_SREV_9550(sc->sc_ah) || AR_SREV_9531(sc->sc_ah)) | 425 | if (AR_SREV_9550(sc->sc_ah) || AR_SREV_9531(sc->sc_ah)) |
425 | rfilt |= ATH9K_RX_FILTER_4ADDRESS; | 426 | rfilt |= ATH9K_RX_FILTER_4ADDRESS; |
426 | 427 | ||
428 | if (ath9k_use_chanctx && | ||
429 | test_bit(ATH_OP_SCANNING, &common->op_flags)) | ||
430 | rfilt |= ATH9K_RX_FILTER_BEACON; | ||
431 | |||
427 | return rfilt; | 432 | return rfilt; |
428 | 433 | ||
429 | } | 434 | } |
@@ -457,7 +462,7 @@ int ath_startrecv(struct ath_softc *sc) | |||
457 | 462 | ||
458 | start_recv: | 463 | start_recv: |
459 | ath_opmode_init(sc); | 464 | ath_opmode_init(sc); |
460 | ath9k_hw_startpcureceive(ah, !!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)); | 465 | ath9k_hw_startpcureceive(ah, sc->cur_chan->offchannel); |
461 | 466 | ||
462 | return 0; | 467 | return 0; |
463 | } | 468 | } |
@@ -540,7 +545,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) | |||
540 | sc->ps_flags &= ~PS_BEACON_SYNC; | 545 | sc->ps_flags &= ~PS_BEACON_SYNC; |
541 | ath_dbg(common, PS, | 546 | ath_dbg(common, PS, |
542 | "Reconfigure beacon timers based on synchronized timestamp\n"); | 547 | "Reconfigure beacon timers based on synchronized timestamp\n"); |
543 | if (!(WARN_ON_ONCE(sc->cur_beacon_conf.beacon_interval == 0))) | 548 | if (!(WARN_ON_ONCE(sc->cur_chan->beacon.beacon_interval == 0))) |
544 | ath9k_set_beacon(sc); | 549 | ath9k_set_beacon(sc); |
545 | if (sc->p2p_ps_vif) | 550 | if (sc->p2p_ps_vif) |
546 | ath9k_update_p2p_ps(sc, sc->p2p_ps_vif->vif); | 551 | ath9k_update_p2p_ps(sc, sc->p2p_ps_vif->vif); |
@@ -887,6 +892,11 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, | |||
887 | return -EINVAL; | 892 | return -EINVAL; |
888 | } | 893 | } |
889 | 894 | ||
895 | if (rx_stats->is_mybeacon) { | ||
896 | sc->sched.next_tbtt = rx_stats->rs_tstamp; | ||
897 | ath_chanctx_event(sc, NULL, ATH_CHANCTX_EVENT_BEACON_RECEIVED); | ||
898 | } | ||
899 | |||
890 | ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status); | 900 | ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status); |
891 | 901 | ||
892 | rx_status->band = ah->curchan->chan->band; | 902 | rx_status->band = ah->curchan->chan->band; |