Skip to content

Commit

Permalink
Merge pull request #1428 from RaspAP/fix/dev-capabilities
Browse files Browse the repository at this point in the history
Fix: More robust method to parse phy from selected interface
  • Loading branch information
billz authored Oct 23, 2023
2 parents c393510 + 42ff260 commit e85e403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ajax/networking/get_frequencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$flags = 0;

// get physical device for selected interface
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
exec("iw dev | awk -v iface=".$iface." '/^phy#/ { phy = $0 } $1 == \"Interface\" { interface = $2 } interface == iface { print phy }'", $return);
$phy = $return[0];

// get frequencies supported by device
Expand Down

0 comments on commit e85e403

Please sign in to comment.