Commit 2fdf8c54ea6ea161fa519a701188cbc56a3bb106
Committed by
John W. Linville
1 parent
572d37a485
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
b43: be more user friendly with PHY info
First of all, use PHY names instead of magic numbers. It should make configuring kernel easier in case of not enabled PHY type support. Secondly, always print info about PHY. This is really basic info about hardware and quite important for the support level. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Showing 2 changed files with 36 additions and 5 deletions Side-by-side Diff
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/main.c
... | ... | @@ -4277,6 +4277,35 @@ |
4277 | 4277 | return err; |
4278 | 4278 | } |
4279 | 4279 | |
4280 | +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type) | |
4281 | +{ | |
4282 | + switch (phy_type) { | |
4283 | + case B43_PHYTYPE_A: | |
4284 | + return "A"; | |
4285 | + case B43_PHYTYPE_B: | |
4286 | + return "B"; | |
4287 | + case B43_PHYTYPE_G: | |
4288 | + return "G"; | |
4289 | + case B43_PHYTYPE_N: | |
4290 | + return "N"; | |
4291 | + case B43_PHYTYPE_LP: | |
4292 | + return "LP"; | |
4293 | + case B43_PHYTYPE_SSLPN: | |
4294 | + return "SSLPN"; | |
4295 | + case B43_PHYTYPE_HT: | |
4296 | + return "HT"; | |
4297 | + case B43_PHYTYPE_LCN: | |
4298 | + return "LCN"; | |
4299 | + case B43_PHYTYPE_LCNXN: | |
4300 | + return "LCNXN"; | |
4301 | + case B43_PHYTYPE_LCN40: | |
4302 | + return "LCN40"; | |
4303 | + case B43_PHYTYPE_AC: | |
4304 | + return "AC"; | |
4305 | + } | |
4306 | + return "UNKNOWN"; | |
4307 | +} | |
4308 | + | |
4280 | 4309 | /* Get PHY and RADIO versioning numbers */ |
4281 | 4310 | static int b43_phy_versioning(struct b43_wldev *dev) |
4282 | 4311 | { |
4283 | 4312 | |
... | ... | @@ -4337,13 +4366,13 @@ |
4337 | 4366 | unsupported = 1; |
4338 | 4367 | } |
4339 | 4368 | if (unsupported) { |
4340 | - b43err(dev->wl, "FOUND UNSUPPORTED PHY " | |
4341 | - "(Analog %u, Type %u, Revision %u)\n", | |
4342 | - analog_type, phy_type, phy_rev); | |
4369 | + b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %d (%s), Revision %u)\n", | |
4370 | + analog_type, phy_type, b43_phy_name(dev, phy_type), | |
4371 | + phy_rev); | |
4343 | 4372 | return -EOPNOTSUPP; |
4344 | 4373 | } |
4345 | - b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n", | |
4346 | - analog_type, phy_type, phy_rev); | |
4374 | + b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n", | |
4375 | + analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev); | |
4347 | 4376 | |
4348 | 4377 | /* Get RADIO versioning */ |
4349 | 4378 | if (dev->dev->core_rev >= 24) { |