aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/net/wireless/libertas/cfg.c9
-rw-r--r--drivers/net/wireless/libertas/cmd.c42
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c32
-rw-r--r--drivers/net/wireless/libertas/debugfs.c7
-rw-r--r--drivers/net/wireless/libertas/if_cs.c15
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c19
-rw-r--r--drivers/net/wireless/libertas/if_spi.c57
-rw-r--r--drivers/net/wireless/libertas/if_usb.c11
-rw-r--r--drivers/net/wireless/libertas/main.c25
-rw-r--r--drivers/net/wireless/libertas/mesh.c4
-rw-r--r--drivers/net/wireless/libertas/rx.c2
11 files changed, 130 insertions, 93 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 73c5f54c9b42..a2e88498c096 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1324,7 +1324,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
1324 sme->ssid, sme->ssid_len, 1324 sme->ssid, sme->ssid_len,
1325 WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); 1325 WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
1326 if (!bss) { 1326 if (!bss) {
1327 pr_err("assoc: bss %pM not in scan results\n", sme->bssid); 1327 wiphy_err(wiphy, "assoc: bss %pM not in scan results\n",
1328 sme->bssid);
1328 ret = -ENOENT; 1329 ret = -ENOENT;
1329 goto done; 1330 goto done;
1330 } 1331 }
@@ -1381,8 +1382,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
1381 lbs_enable_rsn(priv, sme->crypto.cipher_group != 0); 1382 lbs_enable_rsn(priv, sme->crypto.cipher_group != 0);
1382 break; 1383 break;
1383 default: 1384 default:
1384 pr_err("unsupported cipher group 0x%x\n", 1385 wiphy_err(wiphy, "unsupported cipher group 0x%x\n",
1385 sme->crypto.cipher_group); 1386 sme->crypto.cipher_group);
1386 ret = -ENOTSUPP; 1387 ret = -ENOTSUPP;
1387 goto done; 1388 goto done;
1388 } 1389 }
@@ -1500,7 +1501,7 @@ static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev,
1500 params->key, params->key_len); 1501 params->key, params->key_len);
1501 break; 1502 break;
1502 default: 1503 default:
1503 pr_err("unhandled cipher 0x%x\n", params->cipher); 1504 wiphy_err(wiphy, "unhandled cipher 0x%x\n", params->cipher);
1504 ret = -ENOTSUPP; 1505 ret = -ENOTSUPP;
1505 break; 1506 break;
1506 } 1507 }
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index af8ef90a122a..6d59b4cf8fce 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -3,8 +3,6 @@
3 * It prepares command and sends it to firmware when it is ready. 3 * It prepares command and sends it to firmware when it is ready.
4 */ 4 */
5 5
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
7
8#include <linux/kfifo.h> 6#include <linux/kfifo.h>
9#include <linux/sched.h> 7#include <linux/sched.h>
10#include <linux/slab.h> 8#include <linux/slab.h>
@@ -112,7 +110,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
112 * CF card firmware 5.0.16p0: cap 0x00000303 110 * CF card firmware 5.0.16p0: cap 0x00000303
113 * USB dongle firmware 5.110.17p2: cap 0x00000303 111 * USB dongle firmware 5.110.17p2: cap 0x00000303
114 */ 112 */
115 pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n", 113 netdev_info(priv->dev, "%pM, fw %u.%u.%up%u, cap 0x%08x\n",
116 cmd.permanentaddr, 114 cmd.permanentaddr,
117 priv->fwrelease >> 24 & 0xff, 115 priv->fwrelease >> 24 & 0xff,
118 priv->fwrelease >> 16 & 0xff, 116 priv->fwrelease >> 16 & 0xff,
@@ -143,7 +141,8 @@ int lbs_update_hw_spec(struct lbs_private *priv)
143 /* if it's unidentified region code, use the default (USA) */ 141 /* if it's unidentified region code, use the default (USA) */
144 if (i >= MRVDRV_MAX_REGION_CODE) { 142 if (i >= MRVDRV_MAX_REGION_CODE) {
145 priv->regioncode = 0x10; 143 priv->regioncode = 0x10;
146 pr_info("unidentified region code; using the default (USA)\n"); 144 netdev_info(priv->dev,
145 "unidentified region code; using the default (USA)\n");
147 } 146 }
148 147
149 if (priv->current_addr[0] == 0xff) 148 if (priv->current_addr[0] == 0xff)
@@ -213,7 +212,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
213 (uint8_t *)&cmd_config.wol_conf, 212 (uint8_t *)&cmd_config.wol_conf,
214 sizeof(struct wol_config)); 213 sizeof(struct wol_config));
215 } else { 214 } else {
216 pr_info("HOST_SLEEP_CFG failed %d\n", ret); 215 netdev_info(priv->dev, "HOST_SLEEP_CFG failed %d\n", ret);
217 } 216 }
218 217
219 return ret; 218 return ret;
@@ -316,7 +315,7 @@ static int lbs_wait_for_ds_awake(struct lbs_private *priv)
316 if (priv->is_deep_sleep) { 315 if (priv->is_deep_sleep) {
317 if (!wait_event_interruptible_timeout(priv->ds_awake_q, 316 if (!wait_event_interruptible_timeout(priv->ds_awake_q,
318 !priv->is_deep_sleep, (10 * HZ))) { 317 !priv->is_deep_sleep, (10 * HZ))) {
319 pr_err("ds_awake_q: timer expired\n"); 318 netdev_err(priv->dev, "ds_awake_q: timer expired\n");
320 ret = -1; 319 ret = -1;
321 } 320 }
322 } 321 }
@@ -341,7 +340,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
341 netif_carrier_off(priv->dev); 340 netif_carrier_off(priv->dev);
342 } 341 }
343 } else { 342 } else {
344 pr_err("deep sleep: already enabled\n"); 343 netdev_err(priv->dev, "deep sleep: already enabled\n");
345 } 344 }
346 } else { 345 } else {
347 if (priv->is_deep_sleep) { 346 if (priv->is_deep_sleep) {
@@ -351,7 +350,8 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
351 if (!ret) { 350 if (!ret) {
352 ret = lbs_wait_for_ds_awake(priv); 351 ret = lbs_wait_for_ds_awake(priv);
353 if (ret) 352 if (ret)
354 pr_err("deep sleep: wakeup failed\n"); 353 netdev_err(priv->dev,
354 "deep sleep: wakeup failed\n");
355 } 355 }
356 } 356 }
357 } 357 }
@@ -385,8 +385,9 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
385 ret = lbs_host_sleep_cfg(priv, priv->wol_criteria, 385 ret = lbs_host_sleep_cfg(priv, priv->wol_criteria,
386 (struct wol_config *)NULL); 386 (struct wol_config *)NULL);
387 if (ret) { 387 if (ret) {
388 pr_info("Host sleep configuration failed: %d\n", 388 netdev_info(priv->dev,
389 ret); 389 "Host sleep configuration failed: %d\n",
390 ret);
390 return ret; 391 return ret;
391 } 392 }
392 if (priv->psstate == PS_STATE_FULL_POWER) { 393 if (priv->psstate == PS_STATE_FULL_POWER) {
@@ -396,19 +397,21 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
396 sizeof(cmd), 397 sizeof(cmd),
397 lbs_ret_host_sleep_activate, 0); 398 lbs_ret_host_sleep_activate, 0);
398 if (ret) 399 if (ret)
399 pr_info("HOST_SLEEP_ACTIVATE failed: %d\n", 400 netdev_info(priv->dev,
400 ret); 401 "HOST_SLEEP_ACTIVATE failed: %d\n",
402 ret);
401 } 403 }
402 404
403 if (!wait_event_interruptible_timeout( 405 if (!wait_event_interruptible_timeout(
404 priv->host_sleep_q, 406 priv->host_sleep_q,
405 priv->is_host_sleep_activated, 407 priv->is_host_sleep_activated,
406 (10 * HZ))) { 408 (10 * HZ))) {
407 pr_err("host_sleep_q: timer expired\n"); 409 netdev_err(priv->dev,
410 "host_sleep_q: timer expired\n");
408 ret = -1; 411 ret = -1;
409 } 412 }
410 } else { 413 } else {
411 pr_err("host sleep: already enabled\n"); 414 netdev_err(priv->dev, "host sleep: already enabled\n");
412 } 415 }
413 } else { 416 } else {
414 if (priv->is_host_sleep_activated) 417 if (priv->is_host_sleep_activated)
@@ -1008,7 +1011,8 @@ static void lbs_submit_command(struct lbs_private *priv,
1008 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize); 1011 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
1009 1012
1010 if (ret) { 1013 if (ret) {
1011 pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret); 1014 netdev_info(priv->dev, "DNLD_CMD: hw_host_to_card failed: %d\n",
1015 ret);
1012 /* Let the timer kick in and retry, and potentially reset 1016 /* Let the timer kick in and retry, and potentially reset
1013 the whole thing if the condition persists */ 1017 the whole thing if the condition persists */
1014 timeo = HZ/4; 1018 timeo = HZ/4;
@@ -1277,7 +1281,8 @@ int lbs_execute_next_command(struct lbs_private *priv)
1277 spin_lock_irqsave(&priv->driver_lock, flags); 1281 spin_lock_irqsave(&priv->driver_lock, flags);
1278 1282
1279 if (priv->cur_cmd) { 1283 if (priv->cur_cmd) {
1280 pr_alert( "EXEC_NEXT_CMD: already processing command!\n"); 1284 netdev_alert(priv->dev,
1285 "EXEC_NEXT_CMD: already processing command!\n");
1281 spin_unlock_irqrestore(&priv->driver_lock, flags); 1286 spin_unlock_irqrestore(&priv->driver_lock, flags);
1282 ret = -1; 1287 ret = -1;
1283 goto done; 1288 goto done;
@@ -1439,7 +1444,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
1439 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep, 1444 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep,
1440 sizeof(confirm_sleep)); 1445 sizeof(confirm_sleep));
1441 if (ret) { 1446 if (ret) {
1442 pr_alert("confirm_sleep failed\n"); 1447 netdev_alert(priv->dev, "confirm_sleep failed\n");
1443 goto out; 1448 goto out;
1444 } 1449 }
1445 1450
@@ -1665,7 +1670,8 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
1665 spin_lock_irqsave(&priv->driver_lock, flags); 1670 spin_lock_irqsave(&priv->driver_lock, flags);
1666 ret = cmdnode->result; 1671 ret = cmdnode->result;
1667 if (ret) 1672 if (ret)
1668 pr_info("PREP_CMD: command 0x%04x failed: %d\n", command, ret); 1673 netdev_info(priv->dev, "PREP_CMD: command 0x%04x failed: %d\n",
1674 command, ret);
1669 1675
1670 __lbs_cleanup_and_insert_cmd(priv, cmdnode); 1676 __lbs_cleanup_and_insert_cmd(priv, cmdnode);
1671 spin_unlock_irqrestore(&priv->driver_lock, flags); 1677 spin_unlock_irqrestore(&priv->driver_lock, flags);
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
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 0bd79c5f5b5b..23250f621761 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -1,5 +1,3 @@
1#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
2
3#include <linux/dcache.h> 1#include <linux/dcache.h>
4#include <linux/debugfs.h> 2#include <linux/debugfs.h>
5#include <linux/delay.h> 3#include <linux/delay.h>
@@ -153,13 +151,14 @@ static ssize_t lbs_host_sleep_write(struct file *file,
153 ret = lbs_set_host_sleep(priv, 0); 151 ret = lbs_set_host_sleep(priv, 0);
154 else if (host_sleep == 1) { 152 else if (host_sleep == 1) {
155 if (priv->wol_criteria == EHS_REMOVE_WAKEUP) { 153 if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
156 pr_info("wake parameters not configured\n"); 154 netdev_info(priv->dev,
155 "wake parameters not configured\n");
157 ret = -EINVAL; 156 ret = -EINVAL;
158 goto out_unlock; 157 goto out_unlock;
159 } 158 }
160 ret = lbs_set_host_sleep(priv, 1); 159 ret = lbs_set_host_sleep(priv, 1);
161 } else { 160 } else {
162 pr_err("invalid option\n"); 161 netdev_err(priv->dev, "invalid option\n");
163 ret = -EINVAL; 162 ret = -EINVAL;
164 } 163 }
165 164
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index f2d10115f5e5..63ed5798365c 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -364,7 +364,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb)
364 if (status & IF_CS_BIT_COMMAND) 364 if (status & IF_CS_BIT_COMMAND)
365 break; 365 break;
366 if (++loops > 100) { 366 if (++loops > 100) {
367 pr_err("card not ready for commands\n"); 367 netdev_err(priv->dev, "card not ready for commands\n");
368 goto done; 368 goto done;
369 } 369 }
370 mdelay(1); 370 mdelay(1);
@@ -434,14 +434,16 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len)
434 /* is hardware ready? */ 434 /* is hardware ready? */
435 status = if_cs_read16(priv->card, IF_CS_CARD_STATUS); 435 status = if_cs_read16(priv->card, IF_CS_CARD_STATUS);
436 if ((status & IF_CS_BIT_RESP) == 0) { 436 if ((status & IF_CS_BIT_RESP) == 0) {
437 pr_err("no cmd response in card\n"); 437 netdev_err(priv->dev, "no cmd response in card\n");
438 *len = 0; 438 *len = 0;
439 goto out; 439 goto out;
440 } 440 }
441 441
442 *len = if_cs_read16(priv->card, IF_CS_RESP_LEN); 442 *len = if_cs_read16(priv->card, IF_CS_RESP_LEN);
443 if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) { 443 if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) {
444 pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len); 444 netdev_err(priv->dev,
445 "card cmd buffer has invalid # of bytes (%d)\n",
446 *len);
445 goto out; 447 goto out;
446 } 448 }
447 449
@@ -475,7 +477,9 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv)
475 477
476 len = if_cs_read16(priv->card, IF_CS_READ_LEN); 478 len = if_cs_read16(priv->card, IF_CS_READ_LEN);
477 if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { 479 if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
478 pr_err("card data buffer has invalid # of bytes (%d)\n", len); 480 netdev_err(priv->dev,
481 "card data buffer has invalid # of bytes (%d)\n",
482 len);
479 priv->dev->stats.rx_dropped++; 483 priv->dev->stats.rx_dropped++;
480 goto dat_err; 484 goto dat_err;
481 } 485 }
@@ -761,7 +765,8 @@ static int if_cs_host_to_card(struct lbs_private *priv,
761 ret = if_cs_send_cmd(priv, buf, nb); 765 ret = if_cs_send_cmd(priv, buf, nb);
762 break; 766 break;
763 default: 767 default:
764 pr_err("%s: unsupported type %d\n", __func__, type); 768 netdev_err(priv->dev, "%s: unsupported type %d\n",
769 __func__, type);
765 } 770 }
766 771
767 lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); 772 lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index ab867795f542..a7b5cb0c2753 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -851,7 +851,7 @@ static int if_sdio_enter_deep_sleep(struct lbs_private *priv)
851 ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd), 851 ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd),
852 lbs_cmd_copyback, (unsigned long) &cmd); 852 lbs_cmd_copyback, (unsigned long) &cmd);
853 if (ret) 853 if (ret)
854 pr_err("DEEP_SLEEP cmd failed\n"); 854 netdev_err(priv->dev, "DEEP_SLEEP cmd failed\n");
855 855
856 mdelay(200); 856 mdelay(200);
857 return ret; 857 return ret;
@@ -867,7 +867,7 @@ static int if_sdio_exit_deep_sleep(struct lbs_private *priv)
867 867
868 sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret); 868 sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret);
869 if (ret) 869 if (ret)
870 pr_err("sdio_writeb failed!\n"); 870 netdev_err(priv->dev, "sdio_writeb failed!\n");
871 871
872 sdio_release_host(card->func); 872 sdio_release_host(card->func);
873 lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); 873 lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -884,7 +884,7 @@ static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv)
884 884
885 sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret); 885 sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret);
886 if (ret) 886 if (ret)
887 pr_err("sdio_writeb failed!\n"); 887 netdev_err(priv->dev, "sdio_writeb failed!\n");
888 888
889 sdio_release_host(card->func); 889 sdio_release_host(card->func);
890 lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); 890 lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
@@ -1103,7 +1103,7 @@ static int if_sdio_probe(struct sdio_func *func,
1103 lbs_deb_sdio("send function INIT command\n"); 1103 lbs_deb_sdio("send function INIT command\n");
1104 if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd), 1104 if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd),
1105 lbs_cmd_copyback, (unsigned long) &cmd)) 1105 lbs_cmd_copyback, (unsigned long) &cmd))
1106 pr_alert("CMD_FUNC_INIT cmd failed\n"); 1106 netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n");
1107 } 1107 }
1108 1108
1109 ret = lbs_start_card(priv); 1109 ret = lbs_start_card(priv);
@@ -1204,19 +1204,20 @@ static int if_sdio_suspend(struct device *dev)
1204 1204
1205 mmc_pm_flag_t flags = sdio_get_host_pm_caps(func); 1205 mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
1206 1206
1207 pr_info("%s: suspend: PM flags = 0x%x\n", sdio_func_id(func), flags); 1207 dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
1208 sdio_func_id(func), flags);
1208 1209
1209 /* If we aren't being asked to wake on anything, we should bail out 1210 /* If we aren't being asked to wake on anything, we should bail out
1210 * and let the SD stack power down the card. 1211 * and let the SD stack power down the card.
1211 */ 1212 */
1212 if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) { 1213 if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) {
1213 pr_info("Suspend without wake params -- powering down card\n"); 1214 dev_info(dev, "Suspend without wake params -- powering down card\n");
1214 return -ENOSYS; 1215 return -ENOSYS;
1215 } 1216 }
1216 1217
1217 if (!(flags & MMC_PM_KEEP_POWER)) { 1218 if (!(flags & MMC_PM_KEEP_POWER)) {
1218 pr_err("%s: cannot remain alive while host is suspended\n", 1219 dev_err(dev, "%s: cannot remain alive while host is suspended\n",
1219 sdio_func_id(func)); 1220 sdio_func_id(func));
1220 return -ENOSYS; 1221 return -ENOSYS;
1221 } 1222 }
1222 1223
@@ -1237,7 +1238,7 @@ static int if_sdio_resume(struct device *dev)
1237 struct if_sdio_card *card = sdio_get_drvdata(func); 1238 struct if_sdio_card *card = sdio_get_drvdata(func);
1238 int ret; 1239 int ret;
1239 1240
1240 pr_info("%s: resume: we're back\n", sdio_func_id(func)); 1241 dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
1241 1242
1242 ret = lbs_resume(card->priv); 1243 ret = lbs_resume(card->priv);
1243 1244
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 4d19b5726c15..463352c890d7 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -585,6 +585,7 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
585static int if_spi_prog_main_firmware(struct if_spi_card *card, 585static int if_spi_prog_main_firmware(struct if_spi_card *card,
586 const struct firmware *firmware) 586 const struct firmware *firmware)
587{ 587{
588 struct lbs_private *priv = card->priv;
588 int len, prev_len; 589 int len, prev_len;
589 int bytes, crc_err = 0, err = 0; 590 int bytes, crc_err = 0, err = 0;
590 const u8 *fw; 591 const u8 *fw;
@@ -598,8 +599,9 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
598 599
599 err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0); 600 err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0);
600 if (err) { 601 if (err) {
601 pr_err("%s: timed out waiting for initial scratch reg = 0\n", 602 netdev_err(priv->dev,
602 __func__); 603 "%s: timed out waiting for initial scratch reg = 0\n",
604 __func__);
603 goto out; 605 goto out;
604 } 606 }
605 607
@@ -617,7 +619,8 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
617 * If there are no more bytes left, we would normally 619 * If there are no more bytes left, we would normally
618 * expect to have terminated with len = 0 620 * expect to have terminated with len = 0
619 */ 621 */
620 pr_err("Firmware load wants more bytes than we have to offer.\n"); 622 netdev_err(priv->dev,
623 "Firmware load wants more bytes than we have to offer.\n");
621 break; 624 break;
622 } 625 }
623 if (crc_err) { 626 if (crc_err) {
@@ -706,12 +709,14 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
706 if (err) 709 if (err)
707 goto out; 710 goto out;
708 if (!len) { 711 if (!len) {
709 pr_err("%s: error: card has no data for host\n", __func__); 712 netdev_err(priv->dev, "%s: error: card has no data for host\n",
713 __func__);
710 err = -EINVAL; 714 err = -EINVAL;
711 goto out; 715 goto out;
712 } else if (len > IF_SPI_CMD_BUF_SIZE) { 716 } else if (len > IF_SPI_CMD_BUF_SIZE) {
713 pr_err("%s: error: response packet too large: %d bytes, but maximum is %d\n", 717 netdev_err(priv->dev,
714 __func__, len, IF_SPI_CMD_BUF_SIZE); 718 "%s: error: response packet too large: %d bytes, but maximum is %d\n",
719 __func__, len, IF_SPI_CMD_BUF_SIZE);
715 err = -EINVAL; 720 err = -EINVAL;
716 goto out; 721 goto out;
717 } 722 }
@@ -732,7 +737,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
732 737
733out: 738out:
734 if (err) 739 if (err)
735 pr_err("%s: err=%d\n", __func__, err); 740 netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
736 lbs_deb_leave(LBS_DEB_SPI); 741 lbs_deb_leave(LBS_DEB_SPI);
737 return err; 742 return err;
738} 743}
@@ -740,6 +745,7 @@ out:
740/* Move data from the card to the host */ 745/* Move data from the card to the host */
741static int if_spi_c2h_data(struct if_spi_card *card) 746static int if_spi_c2h_data(struct if_spi_card *card)
742{ 747{
748 struct lbs_private *priv = card->priv;
743 struct sk_buff *skb; 749 struct sk_buff *skb;
744 char *data; 750 char *data;
745 u16 len; 751 u16 len;
@@ -752,12 +758,14 @@ static int if_spi_c2h_data(struct if_spi_card *card)
752 if (err) 758 if (err)
753 goto out; 759 goto out;
754 if (!len) { 760 if (!len) {
755 pr_err("%s: error: card has no data for host\n", __func__); 761 netdev_err(priv->dev, "%s: error: card has no data for host\n",
762 __func__);
756 err = -EINVAL; 763 err = -EINVAL;
757 goto out; 764 goto out;
758 } else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { 765 } else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
759 pr_err("%s: error: card has %d bytes of data, but our maximum skb size is %zu\n", 766 netdev_err(priv->dev,
760 __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); 767 "%s: error: card has %d bytes of data, but our maximum skb size is %zu\n",
768 __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
761 err = -EINVAL; 769 err = -EINVAL;
762 goto out; 770 goto out;
763 } 771 }
@@ -788,7 +796,7 @@ free_skb:
788 dev_kfree_skb(skb); 796 dev_kfree_skb(skb);
789out: 797out:
790 if (err) 798 if (err)
791 pr_err("%s: err=%d\n", __func__, err); 799 netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
792 lbs_deb_leave(LBS_DEB_SPI); 800 lbs_deb_leave(LBS_DEB_SPI);
793 return err; 801 return err;
794} 802}
@@ -797,6 +805,7 @@ out:
797static void if_spi_h2c(struct if_spi_card *card, 805static void if_spi_h2c(struct if_spi_card *card,
798 struct if_spi_packet *packet, int type) 806 struct if_spi_packet *packet, int type)
799{ 807{
808 struct lbs_private *priv = card->priv;
800 int err = 0; 809 int err = 0;
801 u16 int_type, port_reg; 810 u16 int_type, port_reg;
802 811
@@ -810,7 +819,8 @@ static void if_spi_h2c(struct if_spi_card *card,
810 port_reg = IF_SPI_CMD_RDWRPORT_REG; 819 port_reg = IF_SPI_CMD_RDWRPORT_REG;
811 break; 820 break;
812 default: 821 default:
813 pr_err("can't transfer buffer of type %d\n", type); 822 netdev_err(priv->dev, "can't transfer buffer of type %d\n",
823 type);
814 err = -EINVAL; 824 err = -EINVAL;
815 goto out; 825 goto out;
816 } 826 }
@@ -824,7 +834,7 @@ out:
824 kfree(packet); 834 kfree(packet);
825 835
826 if (err) 836 if (err)
827 pr_err("%s: error %d\n", __func__, err); 837 netdev_err(priv->dev, "%s: error %d\n", __func__, err);
828} 838}
829 839
830/* Inform the host about a card event */ 840/* Inform the host about a card event */
@@ -848,7 +858,7 @@ static void if_spi_e2h(struct if_spi_card *card)
848 lbs_queue_event(priv, cause & 0xff); 858 lbs_queue_event(priv, cause & 0xff);
849out: 859out:
850 if (err) 860 if (err)
851 pr_err("%s: error %d\n", __func__, err); 861 netdev_err(priv->dev, "%s: error %d\n", __func__, err);
852} 862}
853 863
854static void if_spi_host_to_card_worker(struct work_struct *work) 864static void if_spi_host_to_card_worker(struct work_struct *work)
@@ -858,8 +868,10 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
858 u16 hiStatus; 868 u16 hiStatus;
859 unsigned long flags; 869 unsigned long flags;
860 struct if_spi_packet *packet; 870 struct if_spi_packet *packet;
871 struct lbs_private *priv;
861 872
862 card = container_of(work, struct if_spi_card, packet_work); 873 card = container_of(work, struct if_spi_card, packet_work);
874 priv = card->priv;
863 875
864 lbs_deb_enter(LBS_DEB_SPI); 876 lbs_deb_enter(LBS_DEB_SPI);
865 877
@@ -870,7 +882,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
870 err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG, 882 err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG,
871 &hiStatus); 883 &hiStatus);
872 if (err) { 884 if (err) {
873 pr_err("I/O error\n"); 885 netdev_err(priv->dev, "I/O error\n");
874 goto err; 886 goto err;
875 } 887 }
876 888
@@ -933,7 +945,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
933 945
934err: 946err:
935 if (err) 947 if (err)
936 pr_err("%s: got error %d\n", __func__, err); 948 netdev_err(priv->dev, "%s: got error %d\n", __func__, err);
937 949
938 lbs_deb_leave(LBS_DEB_SPI); 950 lbs_deb_leave(LBS_DEB_SPI);
939} 951}
@@ -956,7 +968,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
956 lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb); 968 lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb);
957 969
958 if (nb == 0) { 970 if (nb == 0) {
959 pr_err("%s: invalid size requested: %d\n", __func__, nb); 971 netdev_err(priv->dev, "%s: invalid size requested: %d\n",
972 __func__, nb);
960 err = -EINVAL; 973 err = -EINVAL;
961 goto out; 974 goto out;
962 } 975 }
@@ -984,7 +997,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
984 spin_unlock_irqrestore(&card->buffer_lock, flags); 997 spin_unlock_irqrestore(&card->buffer_lock, flags);
985 break; 998 break;
986 default: 999 default:
987 pr_err("can't transfer buffer of type %d\n", type); 1000 netdev_err(priv->dev, "can't transfer buffer of type %d\n",
1001 type);
988 err = -EINVAL; 1002 err = -EINVAL;
989 break; 1003 break;
990 } 1004 }
@@ -1017,6 +1031,7 @@ static irqreturn_t if_spi_host_interrupt(int irq, void *dev_id)
1017 1031
1018static int if_spi_init_card(struct if_spi_card *card) 1032static int if_spi_init_card(struct if_spi_card *card)
1019{ 1033{
1034 struct lbs_private *priv = card->priv;
1020 struct spi_device *spi = card->spi; 1035 struct spi_device *spi = card->spi;
1021 int err, i; 1036 int err, i;
1022 u32 scratch; 1037 u32 scratch;
@@ -1045,7 +1060,8 @@ static int if_spi_init_card(struct if_spi_card *card)
1045 break; 1060 break;
1046 } 1061 }
1047 if (i == ARRAY_SIZE(fw_table)) { 1062 if (i == ARRAY_SIZE(fw_table)) {
1048 pr_err("Unsupported chip_id: 0x%02x\n", card->card_id); 1063 netdev_err(priv->dev, "Unsupported chip_id: 0x%02x\n",
1064 card->card_id);
1049 err = -ENODEV; 1065 err = -ENODEV;
1050 goto out; 1066 goto out;
1051 } 1067 }
@@ -1054,7 +1070,8 @@ static int if_spi_init_card(struct if_spi_card *card)
1054 card->card_id, &fw_table[0], &helper, 1070 card->card_id, &fw_table[0], &helper,
1055 &mainfw); 1071 &mainfw);
1056 if (err) { 1072 if (err) {
1057 pr_err("failed to find firmware (%d)\n", err); 1073 netdev_err(priv->dev, "failed to find firmware (%d)\n",
1074 err);
1058 goto out; 1075 goto out;
1059 } 1076 }
1060 1077
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index b68e162bc323..b5acc393a65a 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -206,7 +206,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
206 wake_method.hdr.size = cpu_to_le16(sizeof(wake_method)); 206 wake_method.hdr.size = cpu_to_le16(sizeof(wake_method));
207 wake_method.action = cpu_to_le16(CMD_ACT_GET); 207 wake_method.action = cpu_to_le16(CMD_ACT_GET);
208 if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) { 208 if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) {
209 pr_info("Firmware does not seem to support PS mode\n"); 209 netdev_info(priv->dev, "Firmware does not seem to support PS mode\n");
210 priv->fwcapinfo &= ~FW_CAPINFO_PS; 210 priv->fwcapinfo &= ~FW_CAPINFO_PS;
211 } else { 211 } else {
212 if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) { 212 if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) {
@@ -215,7 +215,8 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
215 /* The versions which boot up this way don't seem to 215 /* The versions which boot up this way don't seem to
216 work even if we set it to the command interrupt */ 216 work even if we set it to the command interrupt */
217 priv->fwcapinfo &= ~FW_CAPINFO_PS; 217 priv->fwcapinfo &= ~FW_CAPINFO_PS;
218 pr_info("Firmware doesn't wake via command interrupt; disabling PS mode\n"); 218 netdev_info(priv->dev,
219 "Firmware doesn't wake via command interrupt; disabling PS mode\n");
219 } 220 }
220 } 221 }
221} 222}
@@ -351,10 +352,12 @@ static int if_usb_probe(struct usb_interface *intf,
351 usb_set_intfdata(intf, cardp); 352 usb_set_intfdata(intf, cardp);
352 353
353 if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw)) 354 if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw))
354 pr_err("cannot register lbs_flash_fw attribute\n"); 355 netdev_err(priv->dev,
356 "cannot register lbs_flash_fw attribute\n");
355 357
356 if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2)) 358 if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2))
357 pr_err("cannot register lbs_flash_boot2 attribute\n"); 359 netdev_err(priv->dev,
360 "cannot register lbs_flash_boot2 attribute\n");
358 361
359 /* 362 /*
360 * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware. 363 * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware.
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 1144afddd5eb..84d05a765b5b 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -444,8 +444,8 @@ static int lbs_thread(void *data)
444 if (priv->cmd_timed_out && priv->cur_cmd) { 444 if (priv->cmd_timed_out && priv->cur_cmd) {
445 struct cmd_ctrl_node *cmdnode = priv->cur_cmd; 445 struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
446 446
447 pr_info("Timeout submitting command 0x%04x\n", 447 netdev_info(dev, "Timeout submitting command 0x%04x\n",
448 le16_to_cpu(cmdnode->cmdbuf->command)); 448 le16_to_cpu(cmdnode->cmdbuf->command));
449 lbs_complete_command(priv, cmdnode, -ETIMEDOUT); 449 lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
450 if (priv->reset_card) 450 if (priv->reset_card)
451 priv->reset_card(priv); 451 priv->reset_card(priv);
@@ -472,7 +472,8 @@ static int lbs_thread(void *data)
472 * after firmware fixes it 472 * after firmware fixes it
473 */ 473 */
474 priv->psstate = PS_STATE_AWAKE; 474 priv->psstate = PS_STATE_AWAKE;
475 pr_alert("ignore PS_SleepConfirm in non-connected state\n"); 475 netdev_alert(dev,
476 "ignore PS_SleepConfirm in non-connected state\n");
476 } 477 }
477 } 478 }
478 479
@@ -566,7 +567,8 @@ int lbs_suspend(struct lbs_private *priv)
566 if (priv->is_deep_sleep) { 567 if (priv->is_deep_sleep) {
567 ret = lbs_set_deep_sleep(priv, 0); 568 ret = lbs_set_deep_sleep(priv, 0);
568 if (ret) { 569 if (ret) {
569 pr_err("deep sleep cancellation failed: %d\n", ret); 570 netdev_err(priv->dev,
571 "deep sleep cancellation failed: %d\n", ret);
570 return ret; 572 return ret;
571 } 573 }
572 priv->deep_sleep_required = 1; 574 priv->deep_sleep_required = 1;
@@ -599,7 +601,8 @@ int lbs_resume(struct lbs_private *priv)
599 priv->deep_sleep_required = 0; 601 priv->deep_sleep_required = 0;
600 ret = lbs_set_deep_sleep(priv, 1); 602 ret = lbs_set_deep_sleep(priv, 1);
601 if (ret) 603 if (ret)
602 pr_err("deep sleep activation failed: %d\n", ret); 604 netdev_err(priv->dev,
605 "deep sleep activation failed: %d\n", ret);
603 } 606 }
604 607
605 if (priv->setup_fw_on_resume) 608 if (priv->setup_fw_on_resume)
@@ -627,8 +630,8 @@ static void lbs_cmd_timeout_handler(unsigned long data)
627 if (!priv->cur_cmd) 630 if (!priv->cur_cmd)
628 goto out; 631 goto out;
629 632
630 pr_info("command 0x%04x timed out\n", 633 netdev_info(priv->dev, "command 0x%04x timed out\n",
631 le16_to_cpu(priv->cur_cmd->cmdbuf->command)); 634 le16_to_cpu(priv->cur_cmd->cmdbuf->command));
632 635
633 priv->cmd_timed_out = 1; 636 priv->cmd_timed_out = 1;
634 wake_up_interruptible(&priv->waitq); 637 wake_up_interruptible(&priv->waitq);
@@ -945,7 +948,7 @@ int lbs_start_card(struct lbs_private *priv)
945 948
946 lbs_debugfs_init_one(priv, dev); 949 lbs_debugfs_init_one(priv, dev);
947 950
948 pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); 951 netdev_info(dev, "Marvell WLAN 802.11 adapter\n");
949 952
950 ret = 0; 953 ret = 0;
951 954
@@ -1072,14 +1075,16 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
1072 if (user_helper) { 1075 if (user_helper) {
1073 ret = request_firmware(helper, user_helper, dev); 1076 ret = request_firmware(helper, user_helper, dev);
1074 if (ret) { 1077 if (ret) {
1075 pr_err("couldn't find helper firmware %s", user_helper); 1078 dev_err(dev, "couldn't find helper firmware %s\n",
1079 user_helper);
1076 goto fail; 1080 goto fail;
1077 } 1081 }
1078 } 1082 }
1079 if (user_mainfw) { 1083 if (user_mainfw) {
1080 ret = request_firmware(mainfw, user_mainfw, dev); 1084 ret = request_firmware(mainfw, user_mainfw, dev);
1081 if (ret) { 1085 if (ret) {
1082 pr_err("couldn't find main firmware %s", user_mainfw); 1086 dev_err(dev, "couldn't find main firmware %s\n",
1087 user_mainfw);
1083 goto fail; 1088 goto fail;
1084 } 1089 }
1085 } 1090 }
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index 054ac07862fd..24cf06680c6b 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -269,7 +269,7 @@ int lbs_init_mesh(struct lbs_private *priv)
269 lbs_add_mesh(priv); 269 lbs_add_mesh(priv);
270 270
271 if (device_create_file(&dev->dev, &dev_attr_lbs_mesh)) 271 if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
272 pr_err("cannot register lbs_mesh attribute\n"); 272 netdev_err(dev, "cannot register lbs_mesh attribute\n");
273 273
274 ret = 1; 274 ret = 1;
275 } 275 }
@@ -975,7 +975,7 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
975 return ret; 975 return ret;
976 976
977 if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) { 977 if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) {
978 pr_err("inconsistent mesh ID length\n"); 978 dev_err(dev, "inconsistent mesh ID length\n");
979 defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN; 979 defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN;
980 } 980 }
981 981
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 24a12daa7c67..fdb0448301a0 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -251,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
251 /* add space for the new radio header */ 251 /* add space for the new radio header */
252 if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) && 252 if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
253 pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) { 253 pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) {
254 pr_alert("%s: couldn't pskb_expand_head\n", __func__); 254 netdev_alert(dev, "%s: couldn't pskb_expand_head\n", __func__);
255 ret = -ENOMEM; 255 ret = -ENOMEM;
256 kfree_skb(skb); 256 kfree_skb(skb);
257 goto done; 257 goto done;