Add width support to the width of the wifi channel#2
Add width support to the width of the wifi channel#2guysoft wants to merge 3 commits intoalexitx:masterfrom
Conversation
There was a problem hiding this comment.
Thanks for the addition and sorry for the delay, but there are a couple of issues.
According to line #420 in https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git/tree/interface.c#n420 the width may not always be present. This can be handled by wrapping it in non-capturing optional group. Then the width key returned by match.groupdict() needs to be checked if it is None before casting to int.
The test cases for IwDeviceParser in tests/test_iw_device_parser.py also need to be updated by adding a width key with a corresponding value in the expected_data dict since the data returned by IwDeviceParser.parse() is changed.
Co-authored-by: Alexander <alexander@alexitx.com>
Co-authored-by: Alexander <alexander@alexitx.com>
|
Hey, |
|
huh, looks like the tests failed - is it comparing to a dict without the width? |
|
Yes, the tests need to be updated as well. I mentioned it in my comment above because GitHub doesn't support suggesting changes in unmodified files. |
Add width support to the width of the wifi channel
Tested on my laptop and OpenWRT Linksys I have now