470-survey_data_fallback.patch 985 B

12345678910111213141516171819202122232425262728293031323334
  1. From: Felix Fietkau <[email protected]>
  2. Date: Wed, 15 Jun 2016 17:31:48 +0200
  3. Subject: [PATCH] hostapd: implement fallback for incomplete survey data
  4. --- a/src/ap/acs.c
  5. +++ b/src/ap/acs.c
  6. @@ -471,17 +471,17 @@ static int acs_get_bw_center_chan(int fr
  7. static int acs_survey_is_sufficient(struct freq_survey *survey)
  8. {
  9. if (!(survey->filled & SURVEY_HAS_NF)) {
  10. + survey->nf = -95;
  11. wpa_printf(MSG_INFO,
  12. "ACS: Survey for freq %d is missing noise floor",
  13. survey->freq);
  14. - return 0;
  15. }
  16. if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
  17. + survey->channel_time = 0;
  18. wpa_printf(MSG_INFO,
  19. "ACS: Survey for freq %d is missing channel time",
  20. survey->freq);
  21. - return 0;
  22. }
  23. if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
  24. @@ -489,7 +489,6 @@ static int acs_survey_is_sufficient(stru
  25. wpa_printf(MSG_INFO,
  26. "ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
  27. survey->freq);
  28. - return 0;
  29. }
  30. return 1;