Skip to content

Commit

Permalink
mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
aep committed Mar 23, 2021
1 parent 6ea46e6 commit 89553d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doopenwrt.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ cp -a target/gen target/c/ target/make/ target/release ~/proj/captif/openwrt/pac

cd ~/proj/captif/openwrt/
make V=s CONFIG_DEBUG=y -j20 package/devguard/genesis/{clean,compile}
scp ~/proj/captif/openwrt/build_dir/target-mips_24kc_musl/genesis-0.13/genesis [email protected].246:/tmp/genesis
scp ~/proj/captif/openwrt/build_dir/target-mips_24kc_musl/genesis-0.13/genesis [email protected].117:/tmp/genesis

2 changes: 2 additions & 0 deletions src/ast.zz
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ pub enum WifiMode @json::from() {
ap,
sta,
monitor,
mesh,
}

export struct WifiInterface @json::from() {
WifiMode mode;
slice::Slice ssid;
slice::Slice mesh_id;
slice::Slice key;
WifiAuth auth;
}
Expand Down
6 changes: 6 additions & 0 deletions src/openwrt.zz
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ pub fn emit(ast::Genesis *gst, bool notify_openwrt)
if iff->wifi != 0 {
static_attest(safe(iff->wifi));
switch iff->wifi->mode {
ast::WifiMode::mesh => {
fprintf(fo, " option mode 'mesh'\n");
}
ast::WifiMode::ap => {
fprintf(fo, " option mode 'ap'\n");
}
Expand All @@ -279,6 +282,9 @@ pub fn emit(ast::Genesis *gst, bool notify_openwrt)
fprintf(fo, " option mode 'monitor'\n");
}
}
if iff->wifi->mesh_id.mem != 0 {
fprintf(fo, " option mesh_id '%.*s'\n", (int)iff->wifi->mesh_id.size, iff->wifi->mesh_id.mem);
}
if iff->wifi->ssid.mem != 0 {
fprintf(fo, " option ssid '%.*s'\n", (int)iff->wifi->ssid.size, iff->wifi->ssid.mem);
}
Expand Down

0 comments on commit 89553d9

Please sign in to comment.