aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2012-07-26 02:16:01 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-08-06 15:01:55 -0400
commit2fdf8c54ea6ea161fa519a701188cbc56a3bb106 (patch)
tree2cfafeac03fd92d7e6e36a381f08ca4c0865f62c /drivers/net/wireless/b43/main.c
parent572d37a48557e7d38a5d9b5857627bc29f33a26c (diff)
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>
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c39
1 files changed, 34 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 724c771133cc..5efa77884704 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4277,6 +4277,35 @@ out:
4277 return err; 4277 return err;
4278} 4278}
4279 4279
4280static 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/* Get PHY and RADIO versioning numbers */ 4309/* Get PHY and RADIO versioning numbers */
4281static int b43_phy_versioning(struct b43_wldev *dev) 4310static int b43_phy_versioning(struct b43_wldev *dev)
4282{ 4311{
@@ -4337,13 +4366,13 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4337 unsupported = 1; 4366 unsupported = 1;
4338 } 4367 }
4339 if (unsupported) { 4368 if (unsupported) {
4340 b43err(dev->wl, "FOUND UNSUPPORTED PHY " 4369 b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %d (%s), Revision %u)\n",
4341 "(Analog %u, Type %u, Revision %u)\n", 4370 analog_type, phy_type, b43_phy_name(dev, phy_type),
4342 analog_type, phy_type, phy_rev); 4371 phy_rev);
4343 return -EOPNOTSUPP; 4372 return -EOPNOTSUPP;
4344 } 4373 }
4345 b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n", 4374 b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
4346 analog_type, phy_type, phy_rev); 4375 analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
4347 4376
4348 /* Get RADIO versioning */ 4377 /* Get RADIO versioning */
4349 if (dev->dev->core_rev >= 24) { 4378 if (dev->dev->core_rev >= 24) {