321-ath9k-Fix-RoC-expiration.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From: Sujith Manoharan <[email protected]>
  2. Date: Fri, 17 Oct 2014 07:40:26 +0530
  3. Subject: [PATCH] ath9k: Fix RoC expiration
  4. mac80211 has to be notified when a RoC period
  5. expires in the driver. In MCC mode, since the
  6. offchannel/RoC timer is set with the requested
  7. duration, ieee80211_remain_on_channel_expired() needs
  8. to be called when the timer expires.
  9. But, currently it is done after we move back to
  10. the operating channel. This is incorrect - fix this
  11. by calling ieee80211_remain_on_channel_expired() when
  12. the RoC timer expires and in ath_roc_complete() when
  13. the RoC request is aborted.
  14. Signed-off-by: Sujith Manoharan <[email protected]>
  15. ---
  16. --- a/drivers/net/wireless/ath/ath9k/channel.c
  17. +++ b/drivers/net/wireless/ath/ath9k/channel.c
  18. @@ -894,7 +894,7 @@ void ath_roc_complete(struct ath_softc *
  19. sc->offchannel.roc_vif = NULL;
  20. sc->offchannel.roc_chan = NULL;
  21. - if (!abort)
  22. + if (abort)
  23. ieee80211_remain_on_channel_expired(sc->hw);
  24. ath_offchannel_next(sc);
  25. ath9k_ps_restore(sc);
  26. @@ -1028,6 +1028,7 @@ static void ath_offchannel_timer(unsigne
  27. case ATH_OFFCHANNEL_ROC_WAIT:
  28. ctx = ath_chanctx_get_oper_chan(sc, false);
  29. sc->offchannel.state = ATH_OFFCHANNEL_ROC_DONE;
  30. + ieee80211_remain_on_channel_expired(sc->hw);
  31. ath_chanctx_switch(sc, ctx, NULL);
  32. break;
  33. default: