Просмотр исходного кода

wifi-scripts: fix macaddr check in mac80211.uc

This fixes a simple logic error in the macaddr existence check in mac80211.uc.

Signed-off-by: Harin Lee <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21277
Signed-off-by: Hauke Mehrtens <[email protected]>
Harin Lee 1 день назад
Родитель
Сommit
2ebcda1ea6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc

+ 1 - 1
package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc

@@ -20,7 +20,7 @@ function radio_exists(path, macaddr, phy, radio) {
 			continue;
 		if (radio != null && int(s.radio) != radio)
 			continue;
-		if (s.macaddr & lc(s.macaddr) == lc(macaddr))
+		if (s.macaddr && lc(s.macaddr) == lc(macaddr))
 			return true;
 		if (s.phy == phy)
 			return true;