[OpenWrt-Devel] [PATCH v2 1/3] mac80211, hostapd: Fix hostapd_set_bss_options function call in mac80211.sh and its definition in netifd.sh

Vittorio G (VittGam) openwrt at vittgam.net
Tue Oct 14 14:04:41 EDT 2014


- Fix the call to hostapd_set_bss_options in mac80211.sh, since $vif is not defined in the calling context, and $phy was not being passed to the function.
- Swap $vif and $phy in hostapd_set_bss_options, to be coherent with the old function with the same name defined in the hostapd-common-old script.

Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>

---
 .../mac80211/files/lib/netifd/wireless/mac80211.sh |    2 +-
 package/network/services/hostapd/files/netifd.sh   |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index e6241de..748d0f1 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -310,7 +310,7 @@ mac80211_hostapd_setup_bss() {
 	hostapd_cfg=
 	append hostapd_cfg "$type=$ifname" "$N"
 
-	hostapd_set_bss_options hostapd_cfg "$vif" || return 1
+	hostapd_set_bss_options hostapd_cfg "$ifname" "$phy" || return 1
 	json_get_vars wds dtim_period max_listen_int
 
 	set_default wds 0
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 30d12e9..12c375b 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -148,8 +148,8 @@ hostapd_common_add_bss_config() {
 
 hostapd_set_bss_options() {
 	local var="$1"
-	local phy="$2"
-	local vif="$3"
+	local vif="$2"
+	local phy="$3"
 
 	wireless_vif_parse_encryption
 
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list