diff options
author | Zoltan Herpai <wigyori@uid0.hu> | 2016-06-24 20:17:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 20:17:26 +0200 |
commit | 6eb05f9f38210bfd7cb667fab1b00e5ebd737556 (patch) | |
tree | 8adb7f0946f1c0f2fba4cc28999d915b167af464 /package/network/services/hostapd/patches/470-survey_data_fallback.patch | |
parent | 282b917e47d9ae5017e1e426face9b75cb7aabd0 (diff) | |
parent | 64de7165e5bce0d6f811795bc5a0a81165eb58ca (diff) | |
download | master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.tar.gz master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.tar.bz2 master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.zip |
Merge pull request #12 from wigyori/master
update oxnas target, update ipq806x target, create trunk tag and update revisioning accordingly
Diffstat (limited to 'package/network/services/hostapd/patches/470-survey_data_fallback.patch')
-rw-r--r-- | package/network/services/hostapd/patches/470-survey_data_fallback.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/470-survey_data_fallback.patch b/package/network/services/hostapd/patches/470-survey_data_fallback.patch new file mode 100644 index 0000000000..4e40a87558 --- /dev/null +++ b/package/network/services/hostapd/patches/470-survey_data_fallback.patch @@ -0,0 +1,45 @@ +--- a/src/ap/acs.c ++++ b/src/ap/acs.c +@@ -292,18 +292,12 @@ static void acs_fail(struct hostapd_ifac + static long double + acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf) + { +- long double factor, busy, total; ++ long double factor, busy = 0, total; + + if (survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) + busy = survey->channel_time_busy; + else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX) + busy = survey->channel_time_rx; +- else { +- /* This shouldn't really happen as survey data is checked in +- * acs_sanity_check() */ +- wpa_printf(MSG_ERROR, "ACS: Survey data missing"); +- return 0; +- } + + total = survey->channel_time; + +@@ -395,20 +389,19 @@ static int acs_usable_vht80_chan(struct + static int acs_survey_is_sufficient(struct freq_survey *survey) + { + if (!(survey->filled & SURVEY_HAS_NF)) { ++ survey->nf = -95; + wpa_printf(MSG_INFO, "ACS: Survey is missing noise floor"); +- return 0; + } + + if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) { ++ survey->channel_time = 0; + wpa_printf(MSG_INFO, "ACS: Survey is missing channel time"); +- return 0; + } + + if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) && + !(survey->filled & SURVEY_HAS_CHAN_TIME_RX)) { + wpa_printf(MSG_INFO, + "ACS: Survey is missing RX and busy time (at least one is required)"); +- return 0; + } + + return 1; |