mac80211: only add the mbssid option to the config when set
authorFelix Fietkau <nbd@nbd.name>
Wed, 13 Sep 2023 09:00:53 +0000 (11:00 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 13 Sep 2023 15:38:25 +0000 (17:38 +0200)
This avoids errors when the feature is not built into the hostapd binary

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

index 7d3ab4dc01bd12bcd86405700abc60ed1599a622..860609305f4539e33eec7a9d3460e7552ef02566 100644 (file)
@@ -488,7 +488,7 @@ ${channel:+channel=$channel}
 ${channel_list:+chanlist=$channel_list}
 ${hostapd_noscan:+noscan=1}
 ${tx_burst:+tx_queue_data2_burst=$tx_burst}
-mbssid=$multiple_bssid
+${multiple_bssid:+mbssid=$multiple_bssid}
 #num_global_macaddr=$num_global_macaddr
 $base_cfg
 
@@ -537,7 +537,7 @@ mac80211_generate_mac() {
        local phy="$1"
        local id="${macidx:-0}"
 
-       wdev_tool "$phy" get_macaddr id=$id num_global=$num_global_macaddr mbssid=$multiple_bssid
+       wdev_tool "$phy" get_macaddr id=$id num_global=$num_global_macaddr mbssid=${multiple_bssid:-0}
 }
 
 get_board_phy_name() (
@@ -1049,7 +1049,7 @@ drv_mac80211_setup() {
                txpower \
                rxantenna txantenna \
                frag rts beacon_int:100 htmode \
-               num_global_macaddr:1 multiple_bssid:0
+               num_global_macaddr:1 multiple_bssid
        json_get_values basic_rate_list basic_rate
        json_get_values scan_list scan_list
        json_select ..