Commit 2fdf8c54 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

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: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 572d37a4
...@@ -417,6 +417,8 @@ enum { ...@@ -417,6 +417,8 @@ enum {
#define B43_PHYTYPE_HT 0x07 #define B43_PHYTYPE_HT 0x07
#define B43_PHYTYPE_LCN 0x08 #define B43_PHYTYPE_LCN 0x08
#define B43_PHYTYPE_LCNXN 0x09 #define B43_PHYTYPE_LCNXN 0x09
#define B43_PHYTYPE_LCN40 0x0a
#define B43_PHYTYPE_AC 0x0b
/* PHYRegisters */ /* PHYRegisters */
#define B43_PHY_ILT_A_CTRL 0x0072 #define B43_PHY_ILT_A_CTRL 0x0072
......
...@@ -4277,6 +4277,35 @@ static int b43_wireless_core_start(struct b43_wldev *dev) ...@@ -4277,6 +4277,35 @@ static int b43_wireless_core_start(struct b43_wldev *dev)
return err; return err;
} }
static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
{
switch (phy_type) {
case B43_PHYTYPE_A:
return "A";
case B43_PHYTYPE_B:
return "B";
case B43_PHYTYPE_G:
return "G";
case B43_PHYTYPE_N:
return "N";
case B43_PHYTYPE_LP:
return "LP";
case B43_PHYTYPE_SSLPN:
return "SSLPN";
case B43_PHYTYPE_HT:
return "HT";
case B43_PHYTYPE_LCN:
return "LCN";
case B43_PHYTYPE_LCNXN:
return "LCNXN";
case B43_PHYTYPE_LCN40:
return "LCN40";
case B43_PHYTYPE_AC:
return "AC";
}
return "UNKNOWN";
}
/* Get PHY and RADIO versioning numbers */ /* Get PHY and RADIO versioning numbers */
static int b43_phy_versioning(struct b43_wldev *dev) static int b43_phy_versioning(struct b43_wldev *dev)
{ {
...@@ -4337,13 +4366,13 @@ static int b43_phy_versioning(struct b43_wldev *dev) ...@@ -4337,13 +4366,13 @@ static int b43_phy_versioning(struct b43_wldev *dev)
unsupported = 1; unsupported = 1;
} }
if (unsupported) { if (unsupported) {
b43err(dev->wl, "FOUND UNSUPPORTED PHY " b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %d (%s), Revision %u)\n",
"(Analog %u, Type %u, Revision %u)\n", analog_type, phy_type, b43_phy_name(dev, phy_type),
analog_type, phy_type, phy_rev); phy_rev);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n", b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
analog_type, phy_type, phy_rev); analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
/* Get RADIO versioning */ /* Get RADIO versioning */
if (dev->dev->core_rev >= 24) { if (dev->dev->core_rev >= 24) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment