diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-11-29 16:39:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:35:45 -0500 |
commit | 02e37ba1298359baa123cf71ffa03d92abd259b2 (patch) | |
tree | 793af4434fafb347d03b870165661ac9bf6ef145 /drivers/net/wireless/p54/p54common.c | |
parent | b2023ddcfa6b79f26ef459867324f3d32b91aa07 (diff) |
p54: per-device names
This patch replaces the static "p54:" strings in front of most printk's
with their corresponding per-device names.
It was always a bit of a hassle to check which device was
generating all the messages.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.c')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 06c8321f4e3e..89968a5bff84 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -158,21 +158,21 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) | |||
158 | priv->fw_interface = be32_to_cpup((__be32 *) | 158 | priv->fw_interface = be32_to_cpup((__be32 *) |
159 | bootrec->data); | 159 | bootrec->data); |
160 | switch (priv->fw_interface) { | 160 | switch (priv->fw_interface) { |
161 | case FW_FMAC: | ||
162 | printk(KERN_INFO "p54: FreeMAC firmware\n"); | ||
163 | break; | ||
164 | case FW_LM20: | ||
165 | printk(KERN_INFO "p54: LM20 firmware\n"); | ||
166 | break; | ||
167 | case FW_LM86: | 161 | case FW_LM86: |
168 | printk(KERN_INFO "p54: LM86 firmware\n"); | 162 | case FW_LM20: |
169 | break; | 163 | case FW_LM87: { |
170 | case FW_LM87: | 164 | char *iftype = (char *)bootrec->data; |
171 | printk(KERN_INFO "p54: LM87 firmware\n"); | 165 | printk(KERN_INFO "%s: p54 detected a LM%c%c " |
166 | "firmware\n", | ||
167 | wiphy_name(dev->wiphy), | ||
168 | iftype[2], iftype[3]); | ||
172 | break; | 169 | break; |
170 | } | ||
171 | case FW_FMAC: | ||
173 | default: | 172 | default: |
174 | printk(KERN_INFO "p54: unknown firmware\n"); | 173 | printk(KERN_ERR "%s: unsupported firmware\n", |
175 | break; | 174 | wiphy_name(dev->wiphy)); |
175 | return -ENODEV; | ||
176 | } | 176 | } |
177 | break; | 177 | break; |
178 | case BR_CODE_COMPONENT_VERSION: | 178 | case BR_CODE_COMPONENT_VERSION: |
@@ -216,13 +216,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) | |||
216 | } | 216 | } |
217 | 217 | ||
218 | if (fw_version) | 218 | if (fw_version) |
219 | printk(KERN_INFO "p54: FW rev %s - Softmac protocol %x.%x\n", | 219 | printk(KERN_INFO "%s: FW rev %s - Softmac protocol %x.%x\n", |
220 | fw_version, priv->fw_var >> 8, priv->fw_var & 0xff); | 220 | wiphy_name(dev->wiphy), fw_version, |
221 | priv->fw_var >> 8, priv->fw_var & 0xff); | ||
221 | 222 | ||
222 | if (priv->fw_var < 0x500) | 223 | if (priv->fw_var < 0x500) |
223 | printk(KERN_INFO "p54: you are using an obsolete firmware. " | 224 | printk(KERN_INFO "%s: you are using an obsolete firmware. " |
224 | "visit http://wireless.kernel.org/en/users/Drivers/p54 " | 225 | "visit http://wireless.kernel.org/en/users/Drivers/p54 " |
225 | "and grab one for \"kernel >= 2.6.28\"!\n"); | 226 | "and grab one for \"kernel >= 2.6.28\"!\n", |
227 | wiphy_name(dev->wiphy)); | ||
226 | 228 | ||
227 | if (priv->fw_var >= 0x300) { | 229 | if (priv->fw_var >= 0x300) { |
228 | /* Firmware supports QoS, use it! */ | 230 | /* Firmware supports QoS, use it! */ |
@@ -399,8 +401,9 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
399 | err = p54_convert_rev1(dev, curve_data); | 401 | err = p54_convert_rev1(dev, curve_data); |
400 | break; | 402 | break; |
401 | default: | 403 | default: |
402 | printk(KERN_ERR "p54: unknown curve data " | 404 | printk(KERN_ERR "%s: unknown curve data " |
403 | "revision %d\n", | 405 | "revision %d\n", |
406 | wiphy_name(dev->wiphy), | ||
404 | curve_data->cal_method_rev); | 407 | curve_data->cal_method_rev); |
405 | err = -ENODEV; | 408 | err = -ENODEV; |
406 | break; | 409 | break; |
@@ -460,7 +463,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
460 | case PDR_PER_CHANNEL_BASEBAND_REGISTERS: | 463 | case PDR_PER_CHANNEL_BASEBAND_REGISTERS: |
461 | break; | 464 | break; |
462 | default: | 465 | default: |
463 | printk(KERN_INFO "p54: unknown eeprom code : 0x%x\n", | 466 | printk(KERN_INFO "%s: unknown eeprom code : 0x%x\n", |
467 | wiphy_name(dev->wiphy), | ||
464 | le16_to_cpu(entry->code)); | 468 | le16_to_cpu(entry->code)); |
465 | break; | 469 | break; |
466 | } | 470 | } |
@@ -470,7 +474,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
470 | 474 | ||
471 | if (!synth || !priv->iq_autocal || !priv->output_limit || | 475 | if (!synth || !priv->iq_autocal || !priv->output_limit || |
472 | !priv->curve_data) { | 476 | !priv->curve_data) { |
473 | printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); | 477 | printk(KERN_ERR "%s: not all required entries found in eeprom!\n", |
478 | wiphy_name(dev->wiphy)); | ||
474 | err = -EINVAL; | 479 | err = -EINVAL; |
475 | goto err; | 480 | goto err; |
476 | } | 481 | } |
@@ -515,7 +520,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) | |||
515 | priv->curve_data = NULL; | 520 | priv->curve_data = NULL; |
516 | } | 521 | } |
517 | 522 | ||
518 | printk(KERN_ERR "p54: eeprom parse failed!\n"); | 523 | printk(KERN_ERR "%s: eeprom parse failed!\n", |
524 | wiphy_name(dev->wiphy)); | ||
519 | return err; | 525 | return err; |
520 | } | 526 | } |
521 | 527 | ||
@@ -1573,28 +1579,23 @@ static int p54_beacon_tim(struct sk_buff *skb) | |||
1573 | struct ieee80211_mgmt *mgmt = (void *)skb->data; | 1579 | struct ieee80211_mgmt *mgmt = (void *)skb->data; |
1574 | u8 *pos, *end; | 1580 | u8 *pos, *end; |
1575 | 1581 | ||
1576 | if (skb->len <= sizeof(mgmt)) { | 1582 | if (skb->len <= sizeof(mgmt)) |
1577 | printk(KERN_ERR "p54: beacon is too short!\n"); | ||
1578 | return -EINVAL; | 1583 | return -EINVAL; |
1579 | } | ||
1580 | 1584 | ||
1581 | pos = (u8 *)mgmt->u.beacon.variable; | 1585 | pos = (u8 *)mgmt->u.beacon.variable; |
1582 | end = skb->data + skb->len; | 1586 | end = skb->data + skb->len; |
1583 | while (pos < end) { | 1587 | while (pos < end) { |
1584 | if (pos + 2 + pos[1] > end) { | 1588 | if (pos + 2 + pos[1] > end) |
1585 | printk(KERN_ERR "p54: parsing beacon failed\n"); | ||
1586 | return -EINVAL; | 1589 | return -EINVAL; |
1587 | } | ||
1588 | 1590 | ||
1589 | if (pos[0] == WLAN_EID_TIM) { | 1591 | if (pos[0] == WLAN_EID_TIM) { |
1590 | u8 dtim_len = pos[1]; | 1592 | u8 dtim_len = pos[1]; |
1591 | u8 dtim_period = pos[3]; | 1593 | u8 dtim_period = pos[3]; |
1592 | u8 *next = pos + 2 + dtim_len; | 1594 | u8 *next = pos + 2 + dtim_len; |
1593 | 1595 | ||
1594 | if (dtim_len < 3) { | 1596 | if (dtim_len < 3) |
1595 | printk(KERN_ERR "p54: invalid dtim len!\n"); | ||
1596 | return -EINVAL; | 1597 | return -EINVAL; |
1597 | } | 1598 | |
1598 | memmove(pos, next, end - next); | 1599 | memmove(pos, next, end - next); |
1599 | 1600 | ||
1600 | if (dtim_len > 3) | 1601 | if (dtim_len > 3) |