forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
99 additions
and
23 deletions.
There are no files selected for viewing
9 changes: 7 additions & 2 deletions
9
target/linux/imx/base-files/etc/uci-defaults/50_disable-removing-wdev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
. /lib/functions.sh | ||
|
||
sed -i 's/iw dev "$wdev" del/# iw dev "$wdev" del/' /lib/netifd/wireless/mac80211.sh | ||
sed -i 's/nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE/\/\/ nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE/' /usr/share/hostap/common.uc | ||
case "$(board_name)" in | ||
aqara,zhwg11lm |\ | ||
xiaomi,dgnwg05lm ) | ||
sed -i 's/iw dev "$wdev" del/# iw dev "$wdev" del/' /lib/netifd/wireless/mac80211.sh | ||
sed -i 's/nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE/\/\/ nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE/' /usr/share/hostap/common.uc | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,41 @@ | ||
# multi if version | ||
uci delete wireless.@wifi-device[0].disabled | ||
uci delete wireless.@wifi-device[-1].disabled | ||
uci set wireless.@wifi-iface[-1].network='wwan' | ||
uci set wireless.@wifi-iface[-1].mode='sta' | ||
uci set wireless.@wifi-iface[-1].ssid='$0102030405$' | ||
uci delete wireless.@wifi-iface[-1].encryption | ||
uci commit wireless | ||
. /lib/functions.sh | ||
|
||
# create wwan zone as it is the default for scanned networks | ||
uci set network.@device[0].ports='wlan0' | ||
uci set network.wwan='interface' | ||
uci set network.wwan.proto='dhcp' | ||
uci commit network | ||
case "$(board_name)" in | ||
aqara,zhwg11lm |\ | ||
xiaomi,dgnwg05lm ) | ||
# multi if version | ||
uci delete wireless.@wifi-device[0].disabled | ||
uci delete wireless.@wifi-device[-1].disabled | ||
uci set wireless.@wifi-iface[-1].network='wwan' | ||
uci set wireless.@wifi-iface[-1].mode='sta' | ||
uci set wireless.@wifi-iface[-1].ssid='$0102030405$' | ||
uci delete wireless.@wifi-iface[-1].encryption | ||
uci commit wireless | ||
|
||
# and add wwan to wan zone in firewall | ||
uci set firewall.@zone[1].network='wwan wan wan6' | ||
uci commit firewall | ||
# create wwan zone as it is the default for scanned networks | ||
uci set network.@device[0].ports='wlan0' | ||
uci set network.wwan='interface' | ||
uci set network.wwan.proto='dhcp' | ||
uci commit network | ||
|
||
# and add wwan to wan zone in firewall | ||
uci set firewall.@zone[1].network='wwan wan wan6' | ||
uci commit firewall | ||
;; | ||
geniatech,gtw360 ) | ||
uci delete wireless.@wifi-device[0].disabled | ||
uci commit wireless | ||
|
||
# create wwan zone as it is the default for scanned networks | ||
uci set network.@device[0].ports='wlan0' | ||
uci set network.wwan='interface' | ||
uci set network.wwan.proto='dhcp' | ||
uci commit network | ||
|
||
# and add wwan to wan zone in firewall | ||
uci set firewall.@zone[1].network='wwan wan wan6' | ||
uci commit firewall | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters