Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a parser to parse the phy name for fixing issue #1048(Bugfix) #1099

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions providers/resource/jobs/resource.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ _description:
Job listing STA supported 802.11 protocols per interfaces.
command:
# shellcheck disable=SC2046
for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo "$i""_ac: supported" || echo "$i""_ac: unsupported"; done
for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy $(iw phy | grep -m 1 -oP '^Wiphy\s+\K\D+')$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo "$i""_ac: supported" || echo "$i""_ac: unsupported"; done
# MCS 10 and 11 if present support the ax only 1024-QAM
# shellcheck disable=SC2046
for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'MCS 0-11' && echo "$i""_ax: supported" || echo "$i""_ax: unsupported"; done
for i in $(iw dev | grep -oP 'Interface\s+\K\w+'); do iw phy $(iw phy | grep -m 1 -oP '^Wiphy\s+\K\D+')$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'MCS 0-11' && echo "$i""_ax: supported" || echo "$i""_ax: unsupported"; done
estimated_duration: 0.5
flags: preserve-locale

Expand Down Expand Up @@ -371,7 +371,8 @@ category_id: information_gathering
command:
# shellcheck disable=SC2046
for i in $(iw dev | grep -oP 'Interface\s+\K\w+');
do iw phy phy$(iw dev "$i" info | grep -oP 'wiphy\s+\K\d+') info |
do iw phy $(iw phy | grep -m 1 -oP '^Wiphy\s+\K\D+')$(iw dev "$i" info |
grep -oP 'wiphy\s+\K\d+') info |
grep -Pzo '(?s)Supported interface modes:\n\K(\s+\*\s.*?\n)+' |
sed "s/.*\* \(.*\)/""$i""_\1: supported/" | tr -d '\000';
done
Expand Down
Loading