305-ath9k-Process-beacons-properly.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: Sujith Manoharan <[email protected]>
  2. Date: Fri, 17 Oct 2014 07:40:10 +0530
  3. Subject: [PATCH] ath9k: Process beacons properly
  4. When the current operating channel context has
  5. been marked as ATH_CHANCTX_STATE_FORCE_ACTIVE,
  6. do not process beacons that might be received,
  7. since we have to wait for the station to become
  8. authorized.
  9. Also, since the cached TSF value will be zero
  10. initially do not rearm the timer in this
  11. case when a beacon is received, since it results
  12. in spurious values.
  13. Signed-off-by: Sujith Manoharan <[email protected]>
  14. ---
  15. --- a/drivers/net/wireless/ath/ath9k/channel.c
  16. +++ b/drivers/net/wireless/ath/ath9k/channel.c
  17. @@ -495,10 +495,15 @@ void ath_chanctx_event(struct ath_softc
  18. sc->cur_chan == &sc->offchannel.chan)
  19. break;
  20. - ath_chanctx_adjust_tbtt_delta(sc);
  21. sc->sched.beacon_pending = false;
  22. sc->sched.beacon_miss = 0;
  23. + if (sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE ||
  24. + !sc->cur_chan->tsf_val)
  25. + break;
  26. +
  27. + ath_chanctx_adjust_tbtt_delta(sc);
  28. +
  29. /* TSF time might have been updated by the incoming beacon,
  30. * need update the channel switch timer to reflect the change.
  31. */