[PW_SID:1030712] device: Improve errors when station not present#485
[PW_SID:1030712] device: Improve errors when station not present#485IWDTestBot wants to merge 11 commits intoworkflowfrom
Conversation
This is taken care of by the individual cache items and if none exist, tar fails.
When a user attempts to use station commands (scan, get-networks, connect, disconnect, show) on a device that does not have a station interface available, iwctl currently displays the generic error message "No station on device: 'wlan0'". This message is quite broad and does not really help users understand why the station interface is unavailable. The station interface can be unavailable for several distinct reasons: 1. The device does not exist (invalid device name) 2. The device is not in station mode (device is in AP mode or ad-hoc mode instead) 3. The device is rfkilled (either hardware rfkill via physical button or software rfkill via rfkill utility) 4. The device is not powered for other reasons (manual ifdown, driver issues, etc.) The current implementation simply checks if the station interface exists and displays the same generic message for all of these cases, which is particularly confusing when the device is rfkilled, as users may not immediately understand that "No station on device" means the device is rfkilled. This commit improves the error messages by checking the device state and providing specific error messages for each scenario.
|
Fetch PR Prep - Setup ELL Make Distcheck Output: Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches |
|
Fetch PR GitLint Prep - Setup ELL Make Distcheck Output: Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches Autotest Runner Output: Clang Build |
34cec50 to
720e28a
Compare
720e28a to
d0811d4
Compare
When a user attempts to use station commands (scan, get-networks,
connect, disconnect, show) on a device that does not have a station
interface available, iwctl currently displays the generic error message
"No station on device: 'wlan0'". This message is quite broad and does
not really help users understand why the station interface is
unavailable.
The station interface can be unavailable for several distinct reasons:
mode instead)
software rfkill via rfkill utility)
issues, etc.)
The current implementation simply checks if the station interface exists
and displays the same generic message for all of these cases, which is
particularly confusing when the device is rfkilled, as users may not
immediately understand that "No station on device" means the device is
rfkilled.
This commit improves the error messages by checking the device state and
providing specific error messages for each scenario.
client/adapter.c | 12 ++++++++++++
client/adapter.h | 25 +++++++++++++++++++++++++
client/device.c | 31 +++++++++++++++++++++++++++++++
client/device.h | 2 ++
client/station.c | 18 +++++++++++++-----
5 files changed, 83 insertions(+), 5 deletions(-)
create mode 100644 client/adapter.h