aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-02 19:49:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 13:06:02 -0400
commitf3a57fd148a4afd3c38f558c5b44972cb29ea8ba (patch)
tree7c1d553f33e2ed0d58c4a978ddd6be68ba592eb3 /drivers/net/wireless/libertas/cmdresp.c
parent0e4e06ae5e895864b4a4bca7eec2e3015fddca98 (diff)
libertas: Use netdev_<level> or dev_<level> where possible
Using the more descriptive logging styles gives a bit more information about the device being operated on. Makes the object trivially smaller too. $ size drivers/net/wireless/libertas/built-in.o.* 187730 2973 38488 229191 37f47 drivers/net/wireless/libertas/built-in.o.new 188195 2973 38488 229656 38118 drivers/net/wireless/libertas/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 45291a4c2a9f..207fc361db84 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -3,8 +3,6 @@
3 * responses as well as events generated by firmware. 3 * responses as well as events generated by firmware.
4 */ 4 */
5 5
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
7
8#include <linux/slab.h> 6#include <linux/slab.h>
9#include <linux/delay.h> 7#include <linux/delay.h>
10#include <linux/sched.h> 8#include <linux/sched.h>
@@ -88,17 +86,18 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
88 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len); 86 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len);
89 87
90 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) { 88 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
91 pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n", 89 netdev_info(priv->dev,
92 le16_to_cpu(resp->seqnum), 90 "Received CMD_RESP with invalid sequence %d (expected %d)\n",
93 le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum)); 91 le16_to_cpu(resp->seqnum),
92 le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
94 spin_unlock_irqrestore(&priv->driver_lock, flags); 93 spin_unlock_irqrestore(&priv->driver_lock, flags);
95 ret = -1; 94 ret = -1;
96 goto done; 95 goto done;
97 } 96 }
98 if (respcmd != CMD_RET(curcmd) && 97 if (respcmd != CMD_RET(curcmd) &&
99 respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) { 98 respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
100 pr_info("Invalid CMD_RESP %x to command %x!\n", 99 netdev_info(priv->dev, "Invalid CMD_RESP %x to command %x!\n",
101 respcmd, curcmd); 100 respcmd, curcmd);
102 spin_unlock_irqrestore(&priv->driver_lock, flags); 101 spin_unlock_irqrestore(&priv->driver_lock, flags);
103 ret = -1; 102 ret = -1;
104 goto done; 103 goto done;
@@ -107,8 +106,9 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
107 if (resp->result == cpu_to_le16(0x0004)) { 106 if (resp->result == cpu_to_le16(0x0004)) {
108 /* 0x0004 means -EAGAIN. Drop the response, let it time out 107 /* 0x0004 means -EAGAIN. Drop the response, let it time out
109 and be resubmitted */ 108 and be resubmitted */
110 pr_info("Firmware returns DEFER to command %x. Will let it time out...\n", 109 netdev_info(priv->dev,
111 le16_to_cpu(resp->command)); 110 "Firmware returns DEFER to command %x. Will let it time out...\n",
111 le16_to_cpu(resp->command));
112 spin_unlock_irqrestore(&priv->driver_lock, flags); 112 spin_unlock_irqrestore(&priv->driver_lock, flags);
113 ret = -1; 113 ret = -1;
114 goto done; 114 goto done;
@@ -319,28 +319,28 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
319 lbs_deb_cmd("EVENT: ADHOC beacon lost\n"); 319 lbs_deb_cmd("EVENT: ADHOC beacon lost\n");
320 break; 320 break;
321 case MACREG_INT_CODE_RSSI_LOW: 321 case MACREG_INT_CODE_RSSI_LOW:
322 pr_alert("EVENT: rssi low\n"); 322 netdev_alert(priv->dev, "EVENT: rssi low\n");
323 break; 323 break;
324 case MACREG_INT_CODE_SNR_LOW: 324 case MACREG_INT_CODE_SNR_LOW:
325 pr_alert("EVENT: snr low\n"); 325 netdev_alert(priv->dev, "EVENT: snr low\n");
326 break; 326 break;
327 case MACREG_INT_CODE_MAX_FAIL: 327 case MACREG_INT_CODE_MAX_FAIL:
328 pr_alert("EVENT: max fail\n"); 328 netdev_alert(priv->dev, "EVENT: max fail\n");
329 break; 329 break;
330 case MACREG_INT_CODE_RSSI_HIGH: 330 case MACREG_INT_CODE_RSSI_HIGH:
331 pr_alert("EVENT: rssi high\n"); 331 netdev_alert(priv->dev, "EVENT: rssi high\n");
332 break; 332 break;
333 case MACREG_INT_CODE_SNR_HIGH: 333 case MACREG_INT_CODE_SNR_HIGH:
334 pr_alert("EVENT: snr high\n"); 334 netdev_alert(priv->dev, "EVENT: snr high\n");
335 break; 335 break;
336 336
337 case MACREG_INT_CODE_MESH_AUTO_STARTED: 337 case MACREG_INT_CODE_MESH_AUTO_STARTED:
338 /* Ignore spurious autostart events */ 338 /* Ignore spurious autostart events */
339 pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n"); 339 netdev_info(priv->dev, "EVENT: MESH_AUTO_STARTED (ignoring)\n");
340 break; 340 break;
341 341
342 default: 342 default:
343 pr_alert("EVENT: unknown event id %d\n", event); 343 netdev_alert(priv->dev, "EVENT: unknown event id %d\n", event);
344 break; 344 break;
345 } 345 }
346 346