Browse Source

Merge branch 'testing' into stable

Karsten Böddeker 7 years ago
parent
commit
977eb37cfb

+ 1 - 1
modules

@@ -2,4 +2,4 @@ GLUON_SITE_FEEDS='ffho'
 
 PACKAGES_FFHO_REPO=http://git.c3pb.de/freifunk-pb/ffho-packages.git
 PACKAGES_FFHO_BRANCH=v2016.1.x
-PACKAGES_FFHO_COMMIT=c9af86fd75180636aa11f4c7334825925632d75b
+PACKAGES_FFHO_COMMIT=f3eda0558c0af7ca837f947d0416143df6940d28

+ 2 - 2
patches/0001-fix-ubnt-model-detection.patch

@@ -21,7 +21,7 @@ index 0000000..79180b4
 +Signed-off-by: Neal Oakey <neal.oakey@bingo-ev.de>
 +
 +diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
-+index 5768286..7f50d8a 100755
++index dab4d2c..e7b3cd2 100755
 +--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 ++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +@@ -64,6 +64,40 @@ wndr3700_board_detect() {
@@ -89,7 +89,7 @@ index 0000000..79180b4
 + 	*"Rocket M XW")
 + 		name="rocket-m-xw"
 diff --git a/targets/ar71xx-generic/profiles.mk b/targets/ar71xx-generic/profiles.mk
-index 14fee2a..316064d 100644
+index 4a63667..da178ea 100644
 --- a/targets/ar71xx-generic/profiles.mk
 +++ b/targets/ar71xx-generic/profiles.mk
 @@ -162,12 +162,19 @@ $(eval $(call GluonModel,UBNT,ubnt-air-gateway,ubiquiti-airgateway))

+ 2 - 2
patches/0002-openwrt-patch-iw.patch

@@ -3,13 +3,13 @@ Date: Sat, 23 Apr 2016 15:20:30 +0200
 Subject: [PATCH] openwrt: patch iw
 
 ---
- .../openwrt/1001-iw-patch-200-reduce_size.patch.patch   | 23 +++++++++++++++++++++
+ .../1001-iw-patch-200-reduce-size-patch.patch      | 23 ++++++++++++++++++++++
  1 file changed, 23 insertions(+)
  create mode 100644 patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch
 
 diff --git a/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch b/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch
 new file mode 100644
-index 0000000..6f59663
+index 0000000..09c978e
 --- /dev/null
 +++ b/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch
 @@ -0,0 +1,23 @@

+ 45 - 0
patches/0003-scripts-add-function-needed_var_in_array-to-check_si.patch

@@ -0,0 +1,45 @@
+From: Karsten Böddeker <freifunk@kb-light.de>
+Date: Thu, 30 Jun 2016 21:40:28 +0200
+Subject: [PATCH] scripts: add function needed_var_in_array to
+ check_site_lib.lua
+
+The function need_var_in_array(varname, array, required) checks weather a value of a variable (specified by its name) is included in an array.
+If the variable is a table or array, the function checks the value of each element against the given array.
+---
+ scripts/check_site_lib.lua | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/scripts/check_site_lib.lua b/scripts/check_site_lib.lua
+index 766b94a..9d581e9 100644
+--- a/scripts/check_site_lib.lua
++++ b/scripts/check_site_lib.lua
+@@ -103,3 +103,26 @@ function need_string_array(varname, required)
+    return assert(pcall(need_array, varname, function(e) assert_type(e, 'string') end, required),
+ 		 "site.conf error: expected `" .. varname .. "' to be a string array")
+ end
++
++function need_var_in_array(varname, array, required)
++   local var = loadvar(varname)
++
++   if required == false and var == nil then
++      return nil
++   end
++
++   function var_in_array(var, array)
++      for _, v in ipairs(array) do
++         if v == var then
++            return true
++         end
++      end
++      return false
++   end
++
++   for _,v in pairs(var) do
++      assert(var_in_array(v, array), "site.conf error: `" .. v .. "' is not a valid value for " .. varname)
++   end
++
++   return var
++end
+-- 
+2.1.4
+

+ 101 - 0
patches/0004-gluon-core-make-wifi-rates-configurable-by-site.conf.patch

@@ -0,0 +1,101 @@
+From: Karsten Böddeker <freifunk@kb-light.de>
+Date: Fri, 1 Jul 2016 14:53:39 +0200
+Subject: [PATCH] gluon-core: make wifi rates configurable by site.conf
+
+and add documentation
+---
+ docs/site-example/site.conf                             |  8 ++++++++
+ docs/user/site.rst                                      |  8 ++++++++
+ package/gluon-core/check_site.lua                       |  8 ++++++++
+ package/gluon-core/files/lib/gluon/upgrade/200-wireless | 12 ++++++++++++
+ 4 files changed, 36 insertions(+)
+
+diff --git a/docs/site-example/site.conf b/docs/site-example/site.conf
+index b58f525..1f67aab 100644
+--- a/docs/site-example/site.conf
++++ b/docs/site-example/site.conf
+@@ -35,6 +35,14 @@
+     -- Wireless channel.
+     channel = 1,
+ 
++    -- List of supported wifi rates (optional, implies basic_rate)
++    -- Example removes 802.11b compatibility for better performance
++    supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
++
++    -- List of basic wifi rates (optional)
++    -- Example removes 802.11b compatibility for better performance
++    basic_rate = {6000, 9000, 18000, 36000, 54000},
++
+     -- ESSID used for client network.
+     ap = {
+       ssid = 'entenhausen.freifunk.net',
+diff --git a/docs/user/site.rst b/docs/user/site.rst
+index b26a28a..1ba9b4a 100644
+--- a/docs/user/site.rst
++++ b/docs/user/site.rst
+@@ -95,6 +95,12 @@ wifi24 : optional
+     This will only affect new installations.
+     Upgrades will not changed the disabled state.
+ 
++    Additionally it is possible to configure the ``supported_rates`` and ``basic_rate``
++    of each radio. Both are optional, by default hostapd/driver dictate the rates.
++    ``supported_rates`` implies ``basic_rate``, because ``basic_rate`` has to be a subset
++    of ``supported_rates``.
++    The example below disables 802.11b rates.
++
+     ``ap`` requires a single parameter, a string, named ``ssid`` which sets the
+     interface's ESSID.
+ 
+@@ -109,6 +115,8 @@ wifi24 : optional
+ 
+        wifi24 = {
+          channel = 11,
++         supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
++         basic_rate = {6000, 9000, 18000, 36000, 54000},
+          ap = {
+            ssid = 'entenhausen.freifunk.net',
+          },
+diff --git a/package/gluon-core/check_site.lua b/package/gluon-core/check_site.lua
+index 1647d77..555360a 100644
+--- a/package/gluon-core/check_site.lua
++++ b/package/gluon-core/check_site.lua
+@@ -28,5 +28,13 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do
+     need_string('regdom') -- regdom is only required when wifi24 or wifi5 is configured
+ 
+     need_number(config .. '.channel')
++
++    local rates={1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000}
++    local supported_rates =  need_var_in_array(config .. '.supported_rates', rates, false)
++    if supported_rates then
++      need_var_in_array(config .. '.basic_rate', supported_rates, true)
++    else
++      need_var_in_array(config .. '.basic_rate', rates, false)
++    end
+   end
+ end
+diff --git a/package/gluon-core/files/lib/gluon/upgrade/200-wireless b/package/gluon-core/files/lib/gluon/upgrade/200-wireless
+index 5a98a70..d217428 100755
+--- a/package/gluon-core/files/lib/gluon/upgrade/200-wireless
++++ b/package/gluon-core/files/lib/gluon/upgrade/200-wireless
+@@ -17,6 +17,18 @@ local function configure_radio(radio, index, config)
+     uci:set('wireless', radio, 'channel', config.channel)
+     uci:set('wireless', radio, 'htmode', 'HT20')
+     uci:set('wireless', radio, 'country', site.regdom)
++
++    if config.supported_rates then
++      uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
++    else
++      uci:delete('wireless', radio, 'supported_rates')
++    end
++
++    if config.basic_rate then
++      uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
++    else
++      uci:delete('wireless', radio, 'basic_rate')
++    end
+   end
+ end
+ 
+-- 
+2.1.4
+

+ 17 - 0
site.conf

@@ -42,6 +42,8 @@
 	-- ibss.bssid = '${idividual-mac}'
 	wifi24 = {
 		channel = 1,
+		supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
+		basic_rate = {6000, 9000, 18000, 36000, 54000},
 
 		ap = {
 			ssid = 'paderborn.freifunk.net',
@@ -238,4 +240,19 @@
 		},
 	},
 
+	-- link to map
+	status_page = {
+		location_link = 'https://map.hochstift.freifunk.net/#!v:m;n:',
+	},
+
+	-- geo-default site
+	site_select = {
+		geo_default_site = 'ffho_uml',
+	},
+
+	ath9k_workaround = {
+		blackout_wait = 720,
+		reset_wait = 1440,
+		step_size = 10,
+	},
 }

+ 1 - 0
site.mk

@@ -2,6 +2,7 @@ GLUON_SITE_PACKAGES := \
 	gluon-mesh-batman-adv-14 \
 	gluon-alfred \
 	gluon-respondd \
+	ffho-ath9k-blackout-workaround \
 	ffho-autoupdater \
 	ffho-autoupdater-wifi-fallback \
 	ffho-autoupdater-wifi-fallback-legacy \